Compare commits

...

No commits in common. "c8" and "c9s" have entirely different histories.
c8 ... c9s

7 changed files with 209 additions and 72 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
SOURCES/v4.0.0.tar.gz
/v4.1.0.tar.gz
/intel-cmt-cat-23.11.tar.gz

View File

@ -1 +1 @@
429fa1c3fe32bb33030c98135fc259f57a4566e2 SOURCES/v4.0.0.tar.gz
77a458ff99c6b1e8a7da76522a14f4311fbdf70f intel-cmt-cat-23.11.tar.gz

View File

@ -0,0 +1,64 @@
Description: Hard code in hardening options
Forwarded: not-needed
Author: Colin Ian King <colin.i.king@gmail.com>
Index: intel-cmt-cat-23.11/lib/Makefile
===================================================================
--- intel-cmt-cat-23.11.orig/lib/Makefile 2023-11-01 14:00:13.000000000 +0100
+++ intel-cmt-cat-23.11/lib/Makefile 2024-02-21 08:55:18.864718246 +0100
@@ -37,8 +37,8 @@
VERSION = 5.0.0
SO_VERSION = 5
SHARED ?= y
-LDFLAGS = -L. -lpthread -z noexecstack -z relro -z now
-CFLAGS = -pthread -I./ -D_GNU_SOURCE \
+LDFLAGS += -L. -lpthread -z noexecstack -z relro -z now
+CFLAGS += -pthread -I./ -D_GNU_SOURCE \
-W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wold-style-definition -Wpointer-arith \
-Wcast-qual -Wundef -Wwrite-strings \
Index: intel-cmt-cat-23.11/pqos/Makefile
===================================================================
--- intel-cmt-cat-23.11.orig/pqos/Makefile 2023-11-01 14:00:13.000000000 +0100
+++ intel-cmt-cat-23.11/pqos/Makefile 2024-02-21 08:55:18.865718244 +0100
@@ -36,9 +36,9 @@
OBJDIR = obj
LIBDIR ?= ../lib
-LDFLAGS = -L$(LIBDIR) -pie -z noexecstack -z relro -z now
+LDFLAGS += -L$(LIBDIR) -pie -z noexecstack -z relro -z now
LDLIBS = -lpqos -lpthread
-CFLAGS = -I$(LIBDIR) \
+CFLAGS += -I$(LIBDIR) \
-W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wold-style-definition -Wpointer-arith \
-Wcast-qual -Wundef -Wwrite-strings \
Index: intel-cmt-cat-23.11/rdtset/Makefile
===================================================================
--- intel-cmt-cat-23.11.orig/rdtset/Makefile 2023-11-01 14:00:13.000000000 +0100
+++ intel-cmt-cat-23.11/rdtset/Makefile 2024-02-21 08:55:18.866718241 +0100
@@ -35,9 +35,9 @@
###############################################################################
LIBDIR ?= ../lib
-LDFLAGS = -L$(LIBDIR) -pie -z noexecstack -z relro -z now
+LDFLAGS += -L$(LIBDIR) -pie -z noexecstack -z relro -z now
LDLIBS = -lpqos -lpthread
-CFLAGS = -I$(LIBDIR) \
+CFLAGS += -I$(LIBDIR) \
-W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wold-style-definition -Wpointer-arith \
-Wcast-qual -Wundef -Wwrite-strings \
Index: intel-cmt-cat-23.11/tools/membw/Makefile
===================================================================
--- intel-cmt-cat-23.11.orig/tools/membw/Makefile 2023-11-01 14:00:13.000000000 +0100
+++ intel-cmt-cat-23.11/tools/membw/Makefile 2024-02-21 08:55:18.866718241 +0100
@@ -42,7 +42,7 @@
BIN_DIR = $(PREFIX)/bin
MAN_DIR = $(PREFIX)/man/man8
-CFLAGS=-W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \
+CFLAGS += -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wold-style-definition -Wpointer-arith \
-Wcast-qual -Wundef -Wwrite-strings \
-Wformat -Wformat-security -fstack-protector -fPIE \

View File

@ -0,0 +1,68 @@
From 6546ae528c5dc50c5afceb16b946aaa949c90f87 Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Fri, 1 Mar 2024 15:24:36 +0100
Subject: [PATCH] Revert "lib: update detection of non-architectural L3CAT"
This reverts commit 25f5155ebb5051a18c8753719b8e9f2e4246d944.
---
lib/hw_cap.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/lib/hw_cap.c b/lib/hw_cap.c
index 2689865..ad5a96a 100644
--- a/lib/hw_cap.c
+++ b/lib/hw_cap.c
@@ -582,8 +582,12 @@ hw_cap_l3ca_brandstr(struct pqos_cap_l3ca *cap)
#define CPUID_LEAF_BRAND_NUM (CPUID_LEAF_BRAND_END - CPUID_LEAF_BRAND_START + 1)
#define MAX_BRAND_STRING_LEN (CPUID_LEAF_BRAND_NUM * 4 * sizeof(uint32_t))
static const char *const supported_brands[] = {
- "E5-2658 v3", "E5-2648L v3", "E5-2628L v3", "E5-2618L v3",
- "E5-2608L v3", "E5-2658A v3", "E3-1258L v4", "E3-1278L v4"};
+ "E5-2658 v3", "E5-2648L v3", "E5-2628L v3", "E5-2618L v3",
+ "E5-2608L v3", "E5-2658A v3", "E3-1258L v4", "E3-1278L v4",
+ /* Tiger Lake and Elkhart Lake brand strings */
+ "i3-1115GRE", "i5-1145GRE", "i7-1185GRE", "x6212RE", "x6414RE",
+ "x6425RE", "x6427FE", "x6200FE", "W-11865MRE", "W-11865MLE",
+ "W-11555MRE", "W-11555MLE", "W-11155MRE", "W-11155MLE"};
struct cpuid_out res;
int ret = PQOS_RETVAL_OK;
int match_found = 0;
@@ -633,6 +637,13 @@ hw_cap_l3ca_brandstr(struct pqos_cap_l3ca *cap)
LOG_WARN("Cache allocation not supported on model name '%s'!\n",
brand_str);
return PQOS_RETVAL_RESOURCE;
+ } else {
+ LOG_WARN(
+ "Detected model specific non-architectural features (L3 "
+ "CAT).\n Intel recommends validating that the feature "
+ "provides the\n performance necessary for your "
+ "use-case. Non-architectural\n features may not "
+ "behave as expected in all scenarios.\n");
}
/**
@@ -811,20 +822,9 @@ hw_cap_l3ca_discover(struct pqos_cap_l3ca *cap, const struct pqos_cpuinfo *cpu)
LOG_INFO("Probing msr....\n");
ret = hw_cap_l3ca_probe(cap, cpu);
}
- if (ret == PQOS_RETVAL_OK) {
+ if (ret == PQOS_RETVAL_OK)
ret =
get_cache_info(&cpu->l3, &cap->num_ways, &l3_size);
-
- LOG_WARN("Detected model specific non-architectural "
- "features (L3 "
- "CAT).\n Intel recommends validating "
- "that the feature "
- "provides the\n performance necessary "
- "for your "
- "use-case. Non-architectural\n features "
- "may not "
- "behave as expected in all scenarios.\n");
- }
}
if (cap->num_ways > 0)
--
2.13.6

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}

View File

@ -24,7 +24,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%global githubname intel-cmt-cat
%global githubver 4.0.0
%global githubver 23.11
%if %{defined githubsubver}
%global githubfull %{githubname}-%{githubver}.%{githubsubver}
@ -38,16 +38,20 @@
Summary: Provides command line interface to CMT, MBM, CAT, CDP and MBA technologies
Name: %{githubname}
Release: 0%{?dist}
Release: 2%{?dist}
Version: %{githubver}
License: BSD
License: BSD-3-Clause
ExclusiveArch: x86_64 i686 i586
%if %{defined githubsubver}
Source: https://github.com/01org/%{githubname}/archive/v%{githubver}.%{githubsubver}.tar.gz
Source: https://github.com/intel/%{githubname}/archive/%{githubname}-%{githubver}.%{githubsubver}.tar.gz
%else
Source: https://github.com/01org/%{githubname}/archive/v%{githubver}.tar.gz
Source: https://github.com/intel/%{githubname}/archive/%{githubname}-%{githubver}.tar.gz
%endif
URL: https://github.com/01org/%{githubname}
Patch0001: 0001-allow-debian-flags-to-be-added.patch
Patch0002: 0002-Revert-lib-update-detection-of-non-architectural-L3C.patch
URL: https://github.com/intel/%{githubname}
BuildRequires: gcc, make
%description
@ -78,19 +82,23 @@ and Code Data Prioratization (CDP).
The package includes library, header file and sample code.
For additional information please refer to:
https://github.com/01org/%{githubname}
https://github.com/intel/%{githubname}
%prep
%autosetup -n %{githubfull}
%autosetup -p1 -n %{githubfull}
%ldconfig_scriptlets
%build
make %{?_smp_mflags}
# RHEL 9's baseline is HSW/HSX, which has neither AVX-512 nor CLWB
make %{?_smp_mflags} HAS_AVX512=0 HAS_CLWB=0
%install
# Not doing make install as it strips the symbols.
# Using files from the build directory.
# pqos-* and rdtest are in %{_sbin} in Fedora now, but they are in %{_bin}
# in RHEL 9 originally, so, preserving it
install -d %{buildroot}/%{_bindir}
install -s %{_builddir}/%{githubfull}/pqos/pqos %{buildroot}/%{_bindir}
install %{_builddir}/%{githubfull}/pqos/pqos-os %{buildroot}/%{_bindir}
@ -99,8 +107,8 @@ sed -i "1s/.*/\#!\/usr\/bin\/bash/" %{buildroot}/%{_bindir}/pqos-*
install -d %{buildroot}/%{_mandir}/man8
install -m 0644 %{_builddir}/%{githubfull}/pqos/pqos.8 %{buildroot}/%{_mandir}/man8
ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-os.8
ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-msr.8
ln -sf pqos.8 %{buildroot}/%{_mandir}/man8/pqos-os.8
ln -sf pqos.8 %{buildroot}/%{_mandir}/man8/pqos-msr.8
install -d %{buildroot}/%{_bindir}
install -s %{_builddir}/%{githubfull}/rdtset/rdtset %{buildroot}/%{_bindir}
@ -108,14 +116,22 @@ install -s %{_builddir}/%{githubfull}/rdtset/rdtset %{buildroot}/%{_bindir}
install -d %{buildroot}/%{_mandir}/man8
install -m 0644 %{_builddir}/%{githubfull}/rdtset/rdtset.8 %{buildroot}/%{_mandir}/man8
install -d %{buildroot}/%{_licensedir}/%{name}-%{version}
install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_licensedir}/%{name}-%{version}
# membw is istalled in %{_bindir} in Fedora, but the man page
# is in the section 8
install -d %{buildroot}/%{_bindir}
install -s %{_builddir}/%{githubfull}/tools/membw/membw %{buildroot}/%{_bindir}
install -d %{buildroot}/%{_mandir}/man8
install -m 0644 %{_builddir}/%{githubfull}/tools/membw/membw.8 %{buildroot}/%{_mandir}/man8
install -d %{buildroot}/%{_licensedir}/%{name}
install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_licensedir}/%{name}
# Install the library
install -d %{buildroot}/%{_libdir}
install -s %{_builddir}/%{githubfull}/lib/libpqos.so.* %{buildroot}/%{_libdir}
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so %{buildroot}/%{_libdir}
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so.4 %{buildroot}/%{_libdir}
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so.5 %{buildroot}/%{_libdir}
# Install the header file
install -d %{buildroot}/%{_includedir}
@ -129,6 +145,7 @@ install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/Makefile %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/README %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/reset_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l2cat.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l3cat.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
@ -137,8 +154,18 @@ install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/association_app.c
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/Makefile %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/README %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/monitor_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK
install -m 0644 %{_builddir}/%{githubfull}/examples/c/PSEUDO_LOCK/Makefile %{buildroot}/%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK
install -m 0644 %{_builddir}/%{githubfull}/examples/c/PSEUDO_LOCK/README %{buildroot}/%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK
install -m 0644 %{_builddir}/%{githubfull}/examples/c/PSEUDO_LOCK/dlock.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK
install -m 0644 %{_builddir}/%{githubfull}/examples/c/PSEUDO_LOCK/dlock.h %{buildroot}/%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK
install -m 0644 %{_builddir}/%{githubfull}/examples/c/PSEUDO_LOCK/pseudo_lock.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK
install -m 0644 %{_builddir}/%{githubfull}/examples/c/PSEUDO_LOCK/tsc.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK
install -m 0644 %{_builddir}/%{githubfull}/examples/c/PSEUDO_LOCK/tsc.h %{buildroot}/%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK
%files
%{_bindir}/pqos
%{_bindir}/pqos-os
@ -148,81 +175,51 @@ install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/monitor_app.c %{bu
%{_mandir}/man8/pqos-msr.8.gz
%{_bindir}/rdtset
%{_mandir}/man8/rdtset.8.gz
%{_bindir}/membw
%{_mandir}/man8/membw.8.gz
%{_libdir}/libpqos.so.*
%{!?_licensedir:%global license %%doc}
%license %{_licensedir}/%{name}-%{version}/LICENSE
%doc ChangeLog README
%license %{_licensedir}/%{name}/LICENSE
%doc ChangeLog README.md
%files -n intel-cmt-cat-devel
%{_libdir}/libpqos.so
%{_libdir}/libpqos.so.4
%{_libdir}/libpqos.so.5
%{_includedir}/pqos.h
%{_usrsrc}/%{githubfull}/c/CAT_MBA/Makefile
%{_usrsrc}/%{githubfull}/c/CAT_MBA/README
%{_usrsrc}/%{githubfull}/c/CAT_MBA/reset_app.c
%{_usrsrc}/%{githubfull}/c/CAT_MBA/association_app.c
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l2cat.c
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l3cat.c
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_mba.c
%{_usrsrc}/%{githubfull}/c/CMT_MBM/Makefile
%{_usrsrc}/%{githubfull}/c/CMT_MBM/README
%{_usrsrc}/%{githubfull}/c/CMT_MBM/monitor_app.c
%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK/Makefile
%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK/README
%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK/dlock.c
%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK/dlock.h
%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK/pseudo_lock.c
%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK/tsc.c
%{_usrsrc}/%{githubfull}/c/PSEUDO_LOCK/tsc.h
%doc %{_usrsrc}/%{githubfull}/LICENSE
%changelog
* Mon Oct 12 2020 Jiri Olsa <jolsa@redhat.com> - 4.0.0-0
- New release 4.0.0
* Fri Mar 01 2024 Eugene Syromiatnikov <esyr@redhat.com> - 23.11-2
- Revert commit "lib: update detection of non-architectural L3CAT" that removed
L3CAT detection support on Tiger Lake and Erkhart Lake CPUs (RHEL-22729)
* Thu Jun 11 2020 Martin Cermak <mcermak@redhat.com> - 2.0.0-3
- NVR bump and rebuild because of CI gating.
Related: #1682388
* Mon Feb 12 2024 Eugene Syromiatnikov <esyr@redhat.com> - 23.11-1
- Rebase to 23.11 (RHEL-22729, RHEL-25781)
* Mon Oct 08 2018 Jiri Olsa <jolsa@redhat.com> - 2.0.0-2
- New release 2.0.0-2
- passing distro CFLAGS/LDFLAGS
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.1.0-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Jun 28 2018 Marcel cornu <marcel.d.cornu@intel.com>, Michal Aleksinski <michalx.aleksinski@intel.com> - 2.0.0-1
- New release 2.0.0
* Wed Jun 09 2021 Martin Cermak <mcermak@redhat.com> - 4.1.0-2
- CI gating related NVR bump and rebuild
* Thu Mar 08 2018 Marcel cornu <marcel.d.cornu@intel.com>, Michal Aleksinski <michalx.aleksinski@intel.com> - 1.2.0-3
- Updated spec file with BuildRequires tag
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Nov 29 2017 Marcel Cornu <marcel.d.cornu@intel.com>, Wojciech Andralojc <wojciechx.andralojc@intel.com> 1.2.0-1
- New release 1.2.0
* Thu Aug 3 2017 Aaron Hetherington <aaron.hetherington@intel.com>, Marcel Cornu <marcel.d.cornu@intel.com> 1.1.0-1
- New release 1.1.0
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Wed Jun 21 2017 Aaron Hetherington <aaron.hetherington@intel.com>, Marcel Cornu <marcel.d.cornu@intel.com> 1.0.1-1
- Spec file bug fixes
* Wed Jun 07 2017 Aaron Hetherington <aaron.hetherington@intel.com>, Marcel Cornu <marcel.d.cornu@intel.com> 1.0.1-1
- new release
- bug fixes
* Fri May 19 2017 Aaron Hetherington <aaron.hetherington@intel.com>, Michal Aleksinski <michalx.aleksinski@intel.com> 1.0.0-1
- new release
* Tue Feb 14 2017 Aaron Hetherington <aaron.hetherington@intel.com> 0.1.5-1
- new release
* Mon Oct 17 2016 Aaron Hetherington <aaron.hetherington@intel.com> 0.1.5
- new release
* Tue Apr 19 2016 Tomasz Kantecki <tomasz.kantecki@intel.com> 0.1.4-3
- global typo fix
- small edits in the description
* Mon Apr 18 2016 Tomasz Kantecki <tomasz.kantecki@intel.com> 0.1.4-2
- LICENSE file added to the package
* Thu Apr 7 2016 Tomasz Kantecki <tomasz.kantecki@intel.com> 0.1.4-1
- initial version of the package
* Sun May 02 2021 Jiri Olsa <jolsa@kernel.org> - 4.1.0-1
- RHEL9 release 4.1.0, copied from fedora

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (intel-cmt-cat-23.11.tar.gz) = 049fddab412a117b485c7dc41675ce27f4b77df3118e9783688ee59deae4ac087f373def0cace09e515f3ee4cc695fc974dfcaa6c20022fa455eb3a8d45c4f2e