summaryrefslogtreecommitdiffstats
path: root/patch-5.14.0-redhat.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-5.14.0-redhat.patch')
-rw-r--r--patch-5.14.0-redhat.patch106
1 files changed, 15 insertions, 91 deletions
diff --git a/patch-5.14.0-redhat.patch b/patch-5.14.0-redhat.patch
index 19e27ad2b..ee008a1dd 100644
--- a/patch-5.14.0-redhat.patch
+++ b/patch-5.14.0-redhat.patch
@@ -1,4 +1,3 @@
- Documentation/admin-guide/kdump/kdump.rst | 12 +
Documentation/admin-guide/kernel-parameters.txt | 9 +
Kconfig | 2 +
Kconfig.redhat | 17 +
@@ -61,7 +60,6 @@
init/Kconfig | 2 +-
kernel/Makefile | 1 +
kernel/bpf/syscall.c | 24 +
- kernel/crash_core.c | 28 +-
kernel/module.c | 2 +
kernel/module_signing.c | 9 +-
kernel/panic.c | 14 +
@@ -74,6 +72,7 @@
security/lockdown/Kconfig | 13 +
security/lockdown/lockdown.c | 1 +
security/security.c | 6 +
+ tools/perf/Makefile.perf | 2 +-
tools/testing/selftests/bpf/Makefile | 1 -
.../selftests/bpf/prog_tests/linked_funcs.c | 42 --
.../testing/selftests/bpf/prog_tests/linked_maps.c | 30 --
@@ -87,31 +86,8 @@
tools/testing/selftests/bpf/progs/linked_maps2.c | 76 ---
tools/testing/selftests/bpf/progs/linked_vars1.c | 54 --
tools/testing/selftests/bpf/progs/linked_vars2.c | 55 ---
- 89 files changed, 1225 insertions(+), 1501 deletions(-)
-
-diff --git a/Documentation/admin-guide/kdump/kdump.rst b/Documentation/admin-guide/kdump/kdump.rst
-index cb30ca3df27c..951ad3ad6aee 100644
---- a/Documentation/admin-guide/kdump/kdump.rst
-+++ b/Documentation/admin-guide/kdump/kdump.rst
-@@ -317,6 +317,18 @@ crashkernel syntax
- 2) if the RAM size is between 512M and 2G (exclusive), then reserve 64M
- 3) if the RAM size is larger than 2G, then reserve 128M
-
-+ Or you can use crashkernel=auto if you have enough memory. The threshold
-+ is 2G on x86_64, arm64, ppc64 and ppc64le. The threshold is 4G for s390x.
-+ If your system memory is less than the threshold crashkernel=auto will not
-+ reserve memory.
-+
-+ The automatically reserved memory size varies based on architecture.
-+ The size changes according to system memory size like below:
-+ x86_64: 1G-64G:160M,64G-1T:256M,1T-:512M
-+ s390x: 4G-64G:160M,64G-1T:256M,1T-:512M
-+ arm64: 2G-:512M
-+ ppc64: 2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G
-+
- 3) crashkernel=size,high and crashkernel=size,low
+ 88 files changed, 1188 insertions(+), 1500 deletions(-)
- If memory above 4G is preferred, crashkernel=size,high can be used to
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index bdb22006f713..61a3a4a4730b 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
@@ -2510,71 +2486,6 @@ index e343f158e556..840c5ecd4fc6 100644
err = bpf_check_uarg_tail_zero(uattr, sizeof(attr), size);
if (err)
return err;
-diff --git a/kernel/crash_core.c b/kernel/crash_core.c
-index da449c1cdca7..fbf5e6ef1bab 100644
---- a/kernel/crash_core.c
-+++ b/kernel/crash_core.c
-@@ -7,6 +7,7 @@
- #include <linux/crash_core.h>
- #include <linux/utsname.h>
- #include <linux/vmalloc.h>
-+#include <linux/sizes.h>
-
- #include <asm/page.h>
- #include <asm/sections.h>
-@@ -41,6 +42,15 @@ static int __init parse_crashkernel_mem(char *cmdline,
- unsigned long long *crash_base)
- {
- char *cur = cmdline, *tmp;
-+ unsigned long long total_mem = system_ram;
-+
-+ /*
-+ * Firmware sometimes reserves some memory regions for it's own use.
-+ * so we get less than actual system memory size.
-+ * Workaround this by round up the total size to 128M which is
-+ * enough for most test cases.
-+ */
-+ total_mem = roundup(total_mem, SZ_128M);
-
- /* for each entry of the comma-separated list */
- do {
-@@ -85,13 +95,13 @@ static int __init parse_crashkernel_mem(char *cmdline,
- return -EINVAL;
- }
- cur = tmp;
-- if (size >= system_ram) {
-+ if (size >= total_mem) {
- pr_warn("crashkernel: invalid size\n");
- return -EINVAL;
- }
-
- /* match ? */
-- if (system_ram >= start && system_ram < end) {
-+ if (total_mem >= start && total_mem < end) {
- *crash_size = size;
- break;
- }
-@@ -250,6 +260,20 @@ static int __init __parse_crashkernel(char *cmdline,
- if (suffix)
- return parse_crashkernel_suffix(ck_cmdline, crash_size,
- suffix);
-+
-+ if (strncmp(ck_cmdline, "auto", 4) == 0) {
-+#ifdef CONFIG_X86_64
-+ ck_cmdline = "1G-64G:160M,64G-1T:256M,1T-:512M";
-+#elif defined(CONFIG_S390)
-+ ck_cmdline = "4G-64G:160M,64G-1T:256M,1T-:512M";
-+#elif defined(CONFIG_ARM64)
-+ ck_cmdline = "2G-:512M";
-+#elif defined(CONFIG_PPC64)
-+ ck_cmdline = "2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G";
-+#endif
-+ pr_info("Using crashkernel=auto, the size chosen is a best effort estimation.\n");
-+ }
-+
- /*
- * if the commandline contains a ':', then that's the extended
- * syntax -- if not, it must be the classic syntax
diff --git a/kernel/module.c b/kernel/module.c
index 927d46cb8eb9..387e08c31633 100644
--- a/kernel/module.c
@@ -2907,6 +2818,19 @@ index 09533cbb7221..d36675494753 100644
#ifdef CONFIG_PERF_EVENTS
int security_perf_event_open(struct perf_event_attr *attr, int type)
{
+diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
+index c9e0de5b00c1..a1b9be78a1e0 100644
+--- a/tools/perf/Makefile.perf
++++ b/tools/perf/Makefile.perf
+@@ -923,7 +923,7 @@ install-tools: all install-gtk
+ $(call QUIET_INSTALL, binaries) \
+ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \
+ $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)'; \
+- $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf' '$(DESTDIR_SQ)$(dir_SQ)/trace'; \
++ $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf' '$(DESTDIR_SQ)$(bindir_SQ)/trace'; \
+ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(includedir_SQ)/perf'; \
+ $(INSTALL) util/perf_dlfilter.h -t '$(DESTDIR_SQ)$(includedir_SQ)/perf'
+ ifndef NO_PERF_READ_VDSO32
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index f405b20c1e6c..a8e298a22709 100644
--- a/tools/testing/selftests/bpf/Makefile