diff options
-rw-r--r-- | 0001-crypto-asym_tpm-correct-zero-out-potential-secrets.patch | 28 | ||||
-rw-r--r-- | 0001-platform-x86-intel_pmc_core-do-not-create-a-static-s.patch | 86 | ||||
-rw-r--r-- | 0001-readfile-implement-readfile-syscall.patch | 11 | ||||
-rw-r--r-- | 0002-arch-wire-up-the-readfile-syscall.patch | 199 | ||||
-rw-r--r-- | 0003-selftests-add-readfile-2-selftests.patch | 37 | ||||
-rw-r--r-- | 0004-readfile.2-new-page-describing-readfile-2.patch | 10 | ||||
-rw-r--r-- | copying.patch | 23 | ||||
-rw-r--r-- | qlcnic_sysfs.patch | 20 | ||||
-rw-r--r-- | series | 3 | ||||
-rw-r--r-- | spdxcheck-print-out-files-without-any-spdx-lines.patch | 2 |
10 files changed, 158 insertions, 261 deletions
diff --git a/0001-crypto-asym_tpm-correct-zero-out-potential-secrets.patch b/0001-crypto-asym_tpm-correct-zero-out-potential-secrets.patch new file mode 100644 index 00000000000000..922cc3233f9768 --- /dev/null +++ b/0001-crypto-asym_tpm-correct-zero-out-potential-secrets.patch @@ -0,0 +1,28 @@ +From 5c228ea4d119be44cf78cb9e36590f2b3fdc4f1e Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Date: Fri, 4 Dec 2020 08:57:41 +0100 +Subject: [PATCH] crypto: asym_tpm: correct zero out potential secrets + +The function derive_pub_key() should be calling memzero_explicit() +instead of memset() in case the complier decides to optimize away the +call to memset() because it "knows" no one is going to touch the memory +anymore. + +Reported-by: Ilil Blum Shem-Tov <ilil.blum.shem-tov@intel.com> +Tested-by: Ilil Blum Shem-Tov <ilil.blum.shem-tov@intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + crypto/asymmetric_keys/asym_tpm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/crypto/asymmetric_keys/asym_tpm.c ++++ b/crypto/asymmetric_keys/asym_tpm.c +@@ -354,7 +354,7 @@ static uint32_t derive_pub_key(const voi + memcpy(cur, e, sizeof(e)); + cur += sizeof(e); + /* Zero parameters to satisfy set_pub_key ABI. */ +- memset(cur, 0, SETKEY_PARAMS_SIZE); ++ memzero_explicit(cur, SETKEY_PARAMS_SIZE); + + return cur - buf; + } diff --git a/0001-platform-x86-intel_pmc_core-do-not-create-a-static-s.patch b/0001-platform-x86-intel_pmc_core-do-not-create-a-static-s.patch deleted file mode 100644 index 23aedf2a6d4a3e..00000000000000 --- a/0001-platform-x86-intel_pmc_core-do-not-create-a-static-s.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 6dd3bc8cf1a83f09ff2ad10750e55140a32eb881 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Wed, 23 Sep 2020 20:44:20 +0200 -Subject: [PATCH] platform/x86: intel_pmc_core: do not create a static struct - device - -A struct device is a dynamic structure, with reference counting. -"Tricking" the kernel to make a dynamic structure static, by working -around the driver core release detection logic, is not nice. - -Because of this, this code has been used as an example for others on -"how to do things", which is just about the worst thing possible to have -happen. - -Fix this all up by making the platform device dynamic and providing a -real release function. - -Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> -Cc: Vishwanath Somayaji <vishwanath.somayaji@intel.com> -Cc: Darren Hart <dvhart@infradead.org> -Cc: Andy Shevchenko <andy@infradead.org> -Cc: Rajat Jain <rajatja@google.com> -Cc: platform-driver-x86@vger.kernel.org -Cc: linux-kernel@vger.kernel.org -Reported-by: Maximilian Luz <luzmaximilian@gmail.com> -Fixes: b02f6a2ef0a1 ("platform/x86: intel_pmc_core: Attach using APCI HID "INT33A1"") -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/platform/x86/intel_pmc_core_pltdrv.c | 26 +++++++++++++++++--------- - 1 file changed, 17 insertions(+), 9 deletions(-) - ---- a/drivers/platform/x86/intel_pmc_core_pltdrv.c -+++ b/drivers/platform/x86/intel_pmc_core_pltdrv.c -@@ -20,15 +20,10 @@ - - static void intel_pmc_core_release(struct device *dev) - { -- /* Nothing to do. */ -+ kfree(dev); - } - --static struct platform_device pmc_core_device = { -- .name = "intel_pmc_core", -- .dev = { -- .release = intel_pmc_core_release, -- }, --}; -+static struct platform_device *pmc_core_device; - - /* - * intel_pmc_core_platform_ids is the list of platforms where we want to -@@ -52,6 +47,8 @@ MODULE_DEVICE_TABLE(x86cpu, intel_pmc_co - - static int __init pmc_core_platform_init(void) - { -+ int retval; -+ - /* Skip creating the platform device if ACPI already has a device */ - if (acpi_dev_present("INT33A1", NULL, -1)) - return -ENODEV; -@@ -59,12 +56,23 @@ static int __init pmc_core_platform_init - if (!x86_match_cpu(intel_pmc_core_platform_ids)) - return -ENODEV; - -- return platform_device_register(&pmc_core_device); -+ pmc_core_device = kzalloc(sizeof(*pmc_core_device), GFP_KERNEL); -+ if (!pmc_core_device) -+ return -ENOMEM; -+ -+ pmc_core_device->name = "intel_pmc_core"; -+ pmc_core_device->dev.release = intel_pmc_core_release; -+ -+ retval = platform_device_register(pmc_core_device); -+ if (retval) -+ kfree(pmc_core_device); -+ -+ return retval; - } - - static void __exit pmc_core_platform_exit(void) - { -- platform_device_unregister(&pmc_core_device); -+ platform_device_unregister(pmc_core_device); - } - - module_init(pmc_core_platform_init); diff --git a/0001-readfile-implement-readfile-syscall.patch b/0001-readfile-implement-readfile-syscall.patch index bf966a945243fd..3c231178ee635e 100644 --- a/0001-readfile-implement-readfile-syscall.patch +++ b/0001-readfile-implement-readfile-syscall.patch @@ -1,4 +1,4 @@ -From 0b91def003b129b2f80bb374ad0a5aaf391bff03 Mon Sep 17 00:00:00 2001 +From 81ede03c890891a967dad69370fcf821c4c283fc Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Sun, 24 May 2020 12:37:15 +0200 Subject: [PATCH 1/4] readfile: implement readfile syscall @@ -15,14 +15,12 @@ overhead. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- - fs/open.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ + fs/open.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) -diff --git a/fs/open.c b/fs/open.c -index 9af548fb841b..b411c2b3ebd6 100644 --- a/fs/open.c +++ b/fs/open.c -@@ -1381,3 +1381,53 @@ int stream_open(struct inode *inode, struct file *filp) +@@ -1385,3 +1385,53 @@ int stream_open(struct inode *inode, str } EXPORT_SYMBOL(stream_open); @@ -76,6 +74,3 @@ index 9af548fb841b..b411c2b3ebd6 100644 + + return retval; +} --- -2.29.2 - diff --git a/0002-arch-wire-up-the-readfile-syscall.patch b/0002-arch-wire-up-the-readfile-syscall.patch index d1b4a3b933d9b2..489a85ce3b4c68 100644 --- a/0002-arch-wire-up-the-readfile-syscall.patch +++ b/0002-arch-wire-up-the-readfile-syscall.patch @@ -1,4 +1,4 @@ -From 39b066fa7c6b33fffe445e2201f19a6740b4fbc2 Mon Sep 17 00:00:00 2001 +From 7cb89db31b533823719673c881acb19d6b879f98 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Sun, 24 May 2020 12:36:21 +0200 Subject: [PATCH 2/4] arch: wire up the readfile syscall @@ -7,192 +7,156 @@ This wires up the readfile syscall for all architectures Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- - arch/alpha/kernel/syscalls/syscall.tbl | 1 + - arch/arm/tools/syscall.tbl | 1 + - arch/arm64/include/asm/unistd32.h | 2 ++ - arch/ia64/kernel/syscalls/syscall.tbl | 1 + - arch/m68k/kernel/syscalls/syscall.tbl | 1 + - arch/microblaze/kernel/syscalls/syscall.tbl | 1 + - arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + - arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + - arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + - arch/parisc/kernel/syscalls/syscall.tbl | 1 + - arch/powerpc/kernel/syscalls/syscall.tbl | 1 + - arch/s390/kernel/syscalls/syscall.tbl | 1 + - arch/sh/kernel/syscalls/syscall.tbl | 1 + - arch/sparc/kernel/syscalls/syscall.tbl | 1 + - arch/x86/entry/syscalls/syscall_32.tbl | 1 + - arch/x86/entry/syscalls/syscall_64.tbl | 1 + - arch/xtensa/kernel/syscalls/syscall.tbl | 1 + - include/linux/syscalls.h | 2 ++ - include/uapi/asm-generic/unistd.h | 4 +++- + arch/alpha/kernel/syscalls/syscall.tbl | 1 + + arch/arm/tools/syscall.tbl | 1 + + arch/arm64/include/asm/unistd32.h | 2 ++ + arch/ia64/kernel/syscalls/syscall.tbl | 1 + + arch/m68k/kernel/syscalls/syscall.tbl | 1 + + arch/microblaze/kernel/syscalls/syscall.tbl | 1 + + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + + arch/parisc/kernel/syscalls/syscall.tbl | 1 + + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + + arch/s390/kernel/syscalls/syscall.tbl | 1 + + arch/sh/kernel/syscalls/syscall.tbl | 1 + + arch/sparc/kernel/syscalls/syscall.tbl | 1 + + arch/x86/entry/syscalls/syscall_32.tbl | 1 + + arch/x86/entry/syscalls/syscall_64.tbl | 1 + + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + + include/linux/syscalls.h | 2 ++ + include/uapi/asm-generic/unistd.h | 4 +++- 19 files changed, 23 insertions(+), 1 deletion(-) -diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl -index ee7b01bb7346..9665012486e7 100644 --- a/arch/alpha/kernel/syscalls/syscall.tbl +++ b/arch/alpha/kernel/syscalls/syscall.tbl -@@ -480,3 +480,4 @@ - 548 common pidfd_getfd sys_pidfd_getfd +@@ -481,3 +481,4 @@ 549 common faccessat2 sys_faccessat2 550 common process_madvise sys_process_madvise -+551 common readfile sys_readfile -diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl -index d056a548358e..88acc17373bb 100644 + 551 common epoll_pwait2 sys_epoll_pwait2 ++552 common readfile sys_readfile --- a/arch/arm/tools/syscall.tbl +++ b/arch/arm/tools/syscall.tbl -@@ -454,3 +454,4 @@ - 438 common pidfd_getfd sys_pidfd_getfd +@@ -455,3 +455,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise -+441 common readfile sys_readfile -diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h -index 107f08e03b9f..b92b3e3fac18 100644 + 441 common epoll_pwait2 sys_epoll_pwait2 ++442 common readfile sys_readfile --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h -@@ -889,6 +889,8 @@ __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd) - __SYSCALL(__NR_faccessat2, sys_faccessat2) - #define __NR_process_madvise 440 +@@ -891,6 +891,8 @@ __SYSCALL(__NR_faccessat2, sys_faccessat __SYSCALL(__NR_process_madvise, sys_process_madvise) -+#define __NR_readfile 441 + #define __NR_epoll_pwait2 441 + __SYSCALL(__NR_epoll_pwait2, compat_sys_epoll_pwait2) ++#define __NR_readfile 442 +__SYSCALL(__NR_readfile, sys_readfile) /* * Please add new compat syscalls above this comment and update -diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl -index b96ed8b8a508..ad5e62125858 100644 --- a/arch/ia64/kernel/syscalls/syscall.tbl +++ b/arch/ia64/kernel/syscalls/syscall.tbl -@@ -361,3 +361,4 @@ - 438 common pidfd_getfd sys_pidfd_getfd +@@ -362,3 +362,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise -+441 common readfile sys_readfile -diff --git a/arch/m68k/kernel/syscalls/syscall.tbl b/arch/m68k/kernel/syscalls/syscall.tbl -index 625fb6d32842..fbe539d66af9 100644 + 441 common epoll_pwait2 sys_epoll_pwait2 ++442 common readfile sys_readfile --- a/arch/m68k/kernel/syscalls/syscall.tbl +++ b/arch/m68k/kernel/syscalls/syscall.tbl -@@ -440,3 +440,4 @@ - 438 common pidfd_getfd sys_pidfd_getfd +@@ -441,3 +441,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise -+441 common readfile sys_readfile -diff --git a/arch/microblaze/kernel/syscalls/syscall.tbl b/arch/microblaze/kernel/syscalls/syscall.tbl -index aae729c95cf9..e0a7084f2128 100644 + 441 common epoll_pwait2 sys_epoll_pwait2 ++442 common readfile sys_readfile --- a/arch/microblaze/kernel/syscalls/syscall.tbl +++ b/arch/microblaze/kernel/syscalls/syscall.tbl -@@ -446,3 +446,4 @@ - 438 common pidfd_getfd sys_pidfd_getfd +@@ -447,3 +447,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise -+441 common readfile sys_readfile -diff --git a/arch/mips/kernel/syscalls/syscall_n32.tbl b/arch/mips/kernel/syscalls/syscall_n32.tbl -index 32817c954435..9e3bbd44e277 100644 + 441 common epoll_pwait2 sys_epoll_pwait2 ++442 common readfile sys_readfile --- a/arch/mips/kernel/syscalls/syscall_n32.tbl +++ b/arch/mips/kernel/syscalls/syscall_n32.tbl -@@ -379,3 +379,4 @@ - 438 n32 pidfd_getfd sys_pidfd_getfd +@@ -380,3 +380,4 @@ 439 n32 faccessat2 sys_faccessat2 440 n32 process_madvise sys_process_madvise -+441 n32 readfile sys_readfile -diff --git a/arch/mips/kernel/syscalls/syscall_n64.tbl b/arch/mips/kernel/syscalls/syscall_n64.tbl -index 9e4ea3c31b1c..efa890ff2d6d 100644 + 441 n32 epoll_pwait2 compat_sys_epoll_pwait2 ++442 n32 readfile sys_readfile --- a/arch/mips/kernel/syscalls/syscall_n64.tbl +++ b/arch/mips/kernel/syscalls/syscall_n64.tbl -@@ -355,3 +355,4 @@ - 438 n64 pidfd_getfd sys_pidfd_getfd +@@ -356,3 +356,4 @@ 439 n64 faccessat2 sys_faccessat2 440 n64 process_madvise sys_process_madvise -+441 n64 readfile sys_readfile -diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl -index 29f5f28cf5ce..68b48d230657 100644 + 441 n64 epoll_pwait2 sys_epoll_pwait2 ++442 n64 readfile sys_readfile --- a/arch/mips/kernel/syscalls/syscall_o32.tbl +++ b/arch/mips/kernel/syscalls/syscall_o32.tbl -@@ -428,3 +428,4 @@ - 438 o32 pidfd_getfd sys_pidfd_getfd +@@ -429,3 +429,4 @@ 439 o32 faccessat2 sys_faccessat2 440 o32 process_madvise sys_process_madvise -+441 o32 readfile sys_readfile -diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl -index f375ea528e59..ea0b323b9af3 100644 + 441 o32 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 ++442 o32 readfile sys_readfile --- a/arch/parisc/kernel/syscalls/syscall.tbl +++ b/arch/parisc/kernel/syscalls/syscall.tbl -@@ -438,3 +438,4 @@ - 438 common pidfd_getfd sys_pidfd_getfd +@@ -439,3 +439,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise -+441 common readfile sys_readfile -diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl b/arch/powerpc/kernel/syscalls/syscall.tbl -index 1275daec7fec..15ace3e8e99c 100644 + 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 ++442 common readfile sys_readfile --- a/arch/powerpc/kernel/syscalls/syscall.tbl +++ b/arch/powerpc/kernel/syscalls/syscall.tbl -@@ -530,3 +530,4 @@ - 438 common pidfd_getfd sys_pidfd_getfd +@@ -531,3 +531,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise -+441 common readfile sys_readfile -diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl -index 28c168000483..7e80ef92ef96 100644 + 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 ++442 common readfile sys_readfile --- a/arch/s390/kernel/syscalls/syscall.tbl +++ b/arch/s390/kernel/syscalls/syscall.tbl -@@ -443,3 +443,4 @@ - 438 common pidfd_getfd sys_pidfd_getfd sys_pidfd_getfd +@@ -444,3 +444,4 @@ 439 common faccessat2 sys_faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise sys_process_madvise -+441 common readfile sys_readfile sys_readfile -diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl -index 783738448ff5..56a6b3030733 100644 + 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 ++442 common readfile sys_readfile sys_readfile --- a/arch/sh/kernel/syscalls/syscall.tbl +++ b/arch/sh/kernel/syscalls/syscall.tbl -@@ -443,3 +443,4 @@ - 438 common pidfd_getfd sys_pidfd_getfd +@@ -444,3 +444,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise -+441 common readfile sys_readfile -diff --git a/arch/sparc/kernel/syscalls/syscall.tbl b/arch/sparc/kernel/syscalls/syscall.tbl -index 78160260991b..a14c1690fae5 100644 + 441 common epoll_pwait2 sys_epoll_pwait2 ++442 common readfile sys_readfile --- a/arch/sparc/kernel/syscalls/syscall.tbl +++ b/arch/sparc/kernel/syscalls/syscall.tbl -@@ -486,3 +486,4 @@ - 438 common pidfd_getfd sys_pidfd_getfd +@@ -487,3 +487,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise -+441 common readfile sys_readfile -diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl -index 0d0667a9fbd7..c50df8220baf 100644 + 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 ++442 common readfile sys_readfile --- a/arch/x86/entry/syscalls/syscall_32.tbl +++ b/arch/x86/entry/syscalls/syscall_32.tbl -@@ -445,3 +445,4 @@ - 438 i386 pidfd_getfd sys_pidfd_getfd +@@ -446,3 +446,4 @@ 439 i386 faccessat2 sys_faccessat2 440 i386 process_madvise sys_process_madvise -+441 i386 readfile sys_readfile -diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl -index 379819244b91..c2d57fca0bd8 100644 + 441 i386 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 ++442 i386 readfile sys_readfile --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl -@@ -362,6 +362,7 @@ - 438 common pidfd_getfd sys_pidfd_getfd +@@ -363,6 +363,7 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise -+441 common readfile sys_readfile + 441 common epoll_pwait2 sys_epoll_pwait2 ++442 common readfile sys_readfile # # Due to a historical design error, certain syscalls are numbered differently -diff --git a/arch/xtensa/kernel/syscalls/syscall.tbl b/arch/xtensa/kernel/syscalls/syscall.tbl -index b070f272995d..db4a5e18ecc8 100644 --- a/arch/xtensa/kernel/syscalls/syscall.tbl +++ b/arch/xtensa/kernel/syscalls/syscall.tbl -@@ -411,3 +411,4 @@ - 438 common pidfd_getfd sys_pidfd_getfd +@@ -412,3 +412,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise -+441 common readfile sys_readfile -diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h -index 37bea07c12f2..653d3a3ad1c4 100644 + 441 common epoll_pwait2 sys_epoll_pwait2 ++442 common readfile sys_readfile --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h -@@ -1008,6 +1008,8 @@ asmlinkage long sys_pidfd_send_signal(int pidfd, int sig, +@@ -1013,6 +1013,8 @@ asmlinkage long sys_pidfd_send_signal(in siginfo_t __user *info, unsigned int flags); asmlinkage long sys_pidfd_getfd(int pidfd, int fd, unsigned int flags); @@ -201,23 +165,18 @@ index 37bea07c12f2..653d3a3ad1c4 100644 /* * Architecture-specific system calls -diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h -index 2056318988f7..7a0bee36e0a7 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h -@@ -859,9 +859,11 @@ __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd) - __SYSCALL(__NR_faccessat2, sys_faccessat2) - #define __NR_process_madvise 440 +@@ -861,9 +861,11 @@ __SYSCALL(__NR_faccessat2, sys_faccessat __SYSCALL(__NR_process_madvise, sys_process_madvise) -+#define __NR_readfile 441 + #define __NR_epoll_pwait2 441 + __SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2) ++#define __NR_readfile 442 +__SYSCALL(__NR_readfile, sys_readfile) #undef __NR_syscalls --#define __NR_syscalls 441 -+#define __NR_syscalls 442 +-#define __NR_syscalls 442 ++#define __NR_syscalls 443 /* * 32 bit systems traditionally used different --- -2.29.2 - diff --git a/0003-selftests-add-readfile-2-selftests.patch b/0003-selftests-add-readfile-2-selftests.patch index ae8e89b2a020a3..0c6d99157d82c6 100644 --- a/0003-selftests-add-readfile-2-selftests.patch +++ b/0003-selftests-add-readfile-2-selftests.patch @@ -1,4 +1,4 @@ -From 3e95be22367650a45fcbfd8c8da95e8a6db7a8f7 Mon Sep 17 00:00:00 2001 +From 0a72e28bbec2bca34b98823313a03145c4ed507c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Sun, 8 Mar 2020 09:54:45 +0100 Subject: [PATCH 3/4] selftests: add readfile(2) selftests @@ -10,41 +10,33 @@ instead of using open()/read()/close(). Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- - tools/testing/selftests/Makefile | 1 + - tools/testing/selftests/readfile/.gitignore | 3 + - tools/testing/selftests/readfile/Makefile | 7 + - tools/testing/selftests/readfile/readfile.c | 285 +++++++++++++++++ - .../selftests/readfile/readfile_speed.c | 301 ++++++++++++++++++ + tools/testing/selftests/Makefile | 1 + tools/testing/selftests/readfile/.gitignore | 3 + tools/testing/selftests/readfile/Makefile | 7 + tools/testing/selftests/readfile/readfile.c | 285 ++++++++++++++++++++ + tools/testing/selftests/readfile/readfile_speed.c | 301 ++++++++++++++++++++++ 5 files changed, 597 insertions(+) create mode 100644 tools/testing/selftests/readfile/.gitignore create mode 100644 tools/testing/selftests/readfile/Makefile create mode 100644 tools/testing/selftests/readfile/readfile.c create mode 100644 tools/testing/selftests/readfile/readfile_speed.c -diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile -index d9c283503159..0788bf87408f 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile -@@ -49,6 +49,7 @@ TARGETS += ptrace +@@ -48,6 +48,7 @@ TARGETS += ptrace TARGETS += openat2 TARGETS += rseq TARGETS += rtc +TARGETS += readfile TARGETS += seccomp + TARGETS += sgx TARGETS += sigaltstack - TARGETS += size -diff --git a/tools/testing/selftests/readfile/.gitignore b/tools/testing/selftests/readfile/.gitignore -new file mode 100644 -index 000000000000..f0e758d437e4 --- /dev/null +++ b/tools/testing/selftests/readfile/.gitignore @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 +readfile +readfile_speed -diff --git a/tools/testing/selftests/readfile/Makefile b/tools/testing/selftests/readfile/Makefile -new file mode 100644 -index 000000000000..1bf1bdec40f8 --- /dev/null +++ b/tools/testing/selftests/readfile/Makefile @@ -0,0 +1,7 @@ @@ -55,9 +47,6 @@ index 000000000000..1bf1bdec40f8 +TEST_GEN_PROGS := readfile readfile_speed + +include ../lib.mk -diff --git a/tools/testing/selftests/readfile/readfile.c b/tools/testing/selftests/readfile/readfile.c -new file mode 100644 -index 000000000000..ddaf57896b2f --- /dev/null +++ b/tools/testing/selftests/readfile/readfile.c @@ -0,0 +1,285 @@ @@ -85,7 +74,7 @@ index 000000000000..ddaf57896b2f +//#define __NR_readfile -1 +//#endif + -+#define __NR_readfile 441 ++#define __NR_readfile 442 + +#define TEST_FILE1 "/sys/devices/system/cpu/vulnerabilities/meltdown" +#define TEST_FILE2 "/sys/devices/system/cpu/vulnerabilities/spectre_v1" @@ -346,9 +335,6 @@ index 000000000000..ddaf57896b2f + return ksft_exit_pass(); +} + -diff --git a/tools/testing/selftests/readfile/readfile_speed.c b/tools/testing/selftests/readfile/readfile_speed.c -new file mode 100644 -index 000000000000..a9c6badf67a2 --- /dev/null +++ b/tools/testing/selftests/readfile/readfile_speed.c @@ -0,0 +1,301 @@ @@ -397,7 +383,7 @@ index 000000000000..a9c6badf67a2 +//#ifndef __NR_readfile +//#define __NR_readfile -1 +//#endif -+#define __NR_readfile 441 ++#define __NR_readfile 440 + +static int sys_readfile(int fd, const char *filename, unsigned char *buffer, + size_t bufsize, int flags) @@ -653,6 +639,3 @@ index 000000000000..a9c6badf67a2 + + return do_read_file_test(loops, test_type, filename); +} --- -2.29.2 - diff --git a/0004-readfile.2-new-page-describing-readfile-2.patch b/0004-readfile.2-new-page-describing-readfile-2.patch index 27d828412fc8df..aabf15fb3262d1 100644 --- a/0004-readfile.2-new-page-describing-readfile-2.patch +++ b/0004-readfile.2-new-page-describing-readfile-2.patch @@ -1,4 +1,4 @@ -From 66476698b6ee9695a1f22870c768575bcb3bde27 Mon Sep 17 00:00:00 2001 +From 4fe70751742eb5c27d82d5a9c641f9003111c2cd Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Fri, 12 Jun 2020 12:11:39 +0200 Subject: [PATCH 4/4] readfile.2: new page describing readfile(2) @@ -9,13 +9,10 @@ sysfs. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- - man2/readfile.2 | 159 ++++++++++++++++++++++++++++++++++++++++++++++++ + man2/readfile.2 | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 man2/readfile.2 -diff --git a/man2/readfile.2 b/man2/readfile.2 -new file mode 100644 -index 000000000000..449e722c3442 --- /dev/null +++ b/man2/readfile.2 @@ -0,0 +1,159 @@ @@ -178,6 +175,3 @@ index 000000000000..449e722c3442 +.BR openat (2), +.BR read (2), +.BR fread (3) --- -2.29.2 - diff --git a/copying.patch b/copying.patch new file mode 100644 index 00000000000000..b7960e3d147dcf --- /dev/null +++ b/copying.patch @@ -0,0 +1,23 @@ + +Attempt to provide some "clarity" about the UAPI .h files. + +Not the correct wording at all, but something to start the conversation. +Lawyers like to have conversations :) + +--- + COPYING | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/COPYING ++++ b/COPYING +@@ -11,6 +11,10 @@ With an explicit syscall exception, as s + + LICENSES/exceptions/Linux-syscall-note + ++The syscall exception only applies to the User API headers (UAPI) which are ++required to build user space applications which can interact with the Linux ++kernel. ++ + In addition, other licenses may also apply. Please see: + + Documentation/process/license-rules.rst diff --git a/qlcnic_sysfs.patch b/qlcnic_sysfs.patch index d9ef05c4062d07..a3c5a94e529c1e 100644 --- a/qlcnic_sysfs.patch +++ b/qlcnic_sysfs.patch @@ -4,7 +4,7 @@ --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c -@@ -33,9 +33,9 @@ int qlcnicvf_config_led(struct qlcnic_ad +@@ -32,9 +32,9 @@ int qlcnicvf_config_led(struct qlcnic_ad return -EOPNOTSUPP; } @@ -17,7 +17,7 @@ { struct qlcnic_adapter *adapter = dev_get_drvdata(dev); unsigned long new; -@@ -57,9 +57,8 @@ err_out: +@@ -56,9 +56,8 @@ err_out: return ret; } @@ -29,7 +29,7 @@ { struct qlcnic_adapter *adapter = dev_get_drvdata(dev); int bridged_mode = 0; -@@ -69,10 +68,11 @@ static ssize_t qlcnic_show_bridged_mode( +@@ -68,10 +67,11 @@ static ssize_t qlcnic_show_bridged_mode( return sprintf(buf, "%d\n", bridged_mode); } @@ -44,7 +44,7 @@ { struct qlcnic_adapter *adapter = dev_get_drvdata(dev); unsigned long new; -@@ -86,12 +86,13 @@ static ssize_t qlcnic_store_diag_mode(st +@@ -85,12 +85,13 @@ static ssize_t qlcnic_store_diag_mode(st return len; } @@ -60,7 +60,7 @@ static int qlcnic_validate_beacon(struct qlcnic_adapter *adapter, u16 beacon, u8 *state, u8 *rate) -@@ -212,9 +213,8 @@ out: +@@ -211,9 +212,8 @@ out: return err; } @@ -72,7 +72,7 @@ { struct qlcnic_adapter *adapter = dev_get_drvdata(dev); int err = 0; -@@ -235,8 +235,8 @@ static ssize_t qlcnic_store_beacon(struc +@@ -234,8 +234,8 @@ static ssize_t qlcnic_store_beacon(struc return err; } @@ -83,7 +83,7 @@ { struct qlcnic_adapter *adapter = dev_get_drvdata(dev); -@@ -264,6 +264,7 @@ static int qlcnic_sysfs_validate_crb(str +@@ -263,6 +263,7 @@ static int qlcnic_sysfs_validate_crb(str return 0; } @@ -91,7 +91,7 @@ static ssize_t qlcnic_sysfs_read_crb(struct file *filp, struct kobject *kobj, struct bin_attribute *attr, char *buf, -@@ -1176,24 +1177,6 @@ static ssize_t qlcnic_83xx_sysfs_flash_w +@@ -1175,24 +1176,6 @@ static ssize_t qlcnic_83xx_sysfs_flash_w return size; } @@ -116,7 +116,7 @@ static const struct bin_attribute bin_attr_crb = { .attr = { .name = "crb", .mode = 0644 }, .size = 0, -@@ -1319,6 +1302,24 @@ void qlcnic_unregister_hwmon_dev(struct +@@ -1318,6 +1301,24 @@ void qlcnic_unregister_hwmon_dev(struct } #endif @@ -141,7 +141,7 @@ void qlcnic_create_sysfs_entries(struct qlcnic_adapter *adapter) { struct device *dev = &adapter->pdev->dev; -@@ -1332,6 +1333,11 @@ void qlcnic_create_sysfs_entries(struct +@@ -1331,6 +1332,11 @@ void qlcnic_create_sysfs_entries(struct void qlcnic_remove_sysfs_entries(struct qlcnic_adapter *adapter) { struct device *dev = &adapter->pdev->dev; @@ -1,5 +1,6 @@ # -0001-platform-x86-intel_pmc_core-do-not-create-a-static-s.patch +copying.patch +0001-crypto-asym_tpm-correct-zero-out-potential-secrets.patch 0001-readfile-implement-readfile-syscall.patch 0002-arch-wire-up-the-readfile-syscall.patch 0003-selftests-add-readfile-2-selftests.patch diff --git a/spdxcheck-print-out-files-without-any-spdx-lines.patch b/spdxcheck-print-out-files-without-any-spdx-lines.patch index cc9b4a28b2fdbb..681db818c4f978 100644 --- a/spdxcheck-print-out-files-without-any-spdx-lines.patch +++ b/spdxcheck-print-out-files-without-any-spdx-lines.patch @@ -14,7 +14,7 @@ Just a hack to make it easy to see what still needs to be converted. --- a/scripts/spdxcheck.py +++ b/scripts/spdxcheck.py -@@ -211,7 +211,10 @@ def scan_git_tree(tree): +@@ -214,7 +214,10 @@ def scan_git_tree(tree): if not os.path.isfile(el.path): continue with open(el.path, 'rb') as fd: |