[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-08-21 Thread Mike Pagano
commit: e6bb58bd953cb5e5e6168c1e1c5bce5383c507a7
Author: Mike Pagano  gentoo  org>
AuthorDate: Sun Aug 21 16:54:12 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sun Aug 21 16:54:12 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=e6bb58bd

Linux patch 5.18.19

Signed-off-by: Mike Pagano  gentoo.org>

 _README  |   4 +
 1018_linux-5.18.19.patch | 331 +++
 2 files changed, 335 insertions(+)

diff --git a/_README b/_README
index c9212ac7..b8b0f1ff 100644
--- a/_README
+++ b/_README
@@ -115,6 +115,10 @@ Patch:  1017_linux-5.18.18.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.18.18
 
+Patch:  1018_linux-5.18.19.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.18.19
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1018_linux-5.18.19.patch b/1018_linux-5.18.19.patch
new file mode 100644
index ..bb0c4371
--- /dev/null
+++ b/1018_linux-5.18.19.patch
@@ -0,0 +1,331 @@
+diff --git a/Makefile b/Makefile
+index 23162e2bdf140..fc7efcdab0a27 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 18
+-SUBLEVEL = 18
++SUBLEVEL = 19
+ EXTRAVERSION =
+ NAME = Superb Owl
+ 
+diff --git a/arch/arm64/kernel/kexec_image.c b/arch/arm64/kernel/kexec_image.c
+index 9ec34690e2551..5ed6a585f21fd 100644
+--- a/arch/arm64/kernel/kexec_image.c
 b/arch/arm64/kernel/kexec_image.c
+@@ -14,7 +14,6 @@
+ #include 
+ #include 
+ #include 
+-#include 
+ #include 
+ #include 
+ #include 
+@@ -130,18 +129,10 @@ static void *image_load(struct kimage *image,
+   return NULL;
+ }
+ 
+-#ifdef CONFIG_KEXEC_IMAGE_VERIFY_SIG
+-static int image_verify_sig(const char *kernel, unsigned long kernel_len)
+-{
+-  return verify_pefile_signature(kernel, kernel_len, NULL,
+- VERIFYING_KEXEC_PE_SIGNATURE);
+-}
+-#endif
+-
+ const struct kexec_file_ops kexec_image_ops = {
+   .probe = image_probe,
+   .load = image_load,
+ #ifdef CONFIG_KEXEC_IMAGE_VERIFY_SIG
+-  .verify_sig = image_verify_sig,
++  .verify_sig = kexec_kernel_verify_pe_sig,
+ #endif
+ };
+diff --git a/arch/x86/kernel/kexec-bzimage64.c 
b/arch/x86/kernel/kexec-bzimage64.c
+index 170d0fd68b1f4..f299b48f9c9f0 100644
+--- a/arch/x86/kernel/kexec-bzimage64.c
 b/arch/x86/kernel/kexec-bzimage64.c
+@@ -17,7 +17,6 @@
+ #include 
+ #include 
+ #include 
+-#include 
+ 
+ #include 
+ #include 
+@@ -528,28 +527,11 @@ static int bzImage64_cleanup(void *loader_data)
+   return 0;
+ }
+ 
+-#ifdef CONFIG_KEXEC_BZIMAGE_VERIFY_SIG
+-static int bzImage64_verify_sig(const char *kernel, unsigned long kernel_len)
+-{
+-  int ret;
+-
+-  ret = verify_pefile_signature(kernel, kernel_len,
+-VERIFY_USE_SECONDARY_KEYRING,
+-VERIFYING_KEXEC_PE_SIGNATURE);
+-  if (ret == -ENOKEY && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) {
+-  ret = verify_pefile_signature(kernel, kernel_len,
+-VERIFY_USE_PLATFORM_KEYRING,
+-VERIFYING_KEXEC_PE_SIGNATURE);
+-  }
+-  return ret;
+-}
+-#endif
+-
+ const struct kexec_file_ops kexec_bzImage64_ops = {
+   .probe = bzImage64_probe,
+   .load = bzImage64_load,
+   .cleanup = bzImage64_cleanup,
+ #ifdef CONFIG_KEXEC_BZIMAGE_VERIFY_SIG
+-  .verify_sig = bzImage64_verify_sig,
++  .verify_sig = kexec_kernel_verify_pe_sig,
+ #endif
+ };
+diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c
+index f31e29e8f1cac..b55d4c733fa8a 100644
+--- a/drivers/tee/tee_shm.c
 b/drivers/tee/tee_shm.c
+@@ -311,6 +311,9 @@ struct tee_shm *tee_shm_register_user_buf(struct 
tee_context *ctx,
+   void *ret;
+   int id;
+ 
++  if (!access_ok((void __user *)addr, length))
++  return ERR_PTR(-EFAULT);
++
+   mutex_lock(>mutex);
+   id = idr_alloc(>idr, NULL, 1, 0, GFP_KERNEL);
+   mutex_unlock(>mutex);
+diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
+index 0e239a4c3b264..39c4c513bf979 100644
+--- a/fs/btrfs/raid56.c
 b/fs/btrfs/raid56.c
+@@ -323,6 +323,9 @@ static void merge_rbio(struct btrfs_raid_bio *dest,
+ {
+   bio_list_merge(>bio_list, >bio_list);
+   dest->bio_list_bytes += victim->bio_list_bytes;
++  /* Also inherit the bitmaps from @victim. */
++  bitmap_or(dest->dbitmap, victim->dbitmap, dest->dbitmap,
++dest->stripe_npages);
+   dest->generic_bio_cnt += victim->generic_bio_cnt;
+   bio_list_init(>bio_list);
+ }
+@@ -864,6 +867,12 @@ static void rbio_orig_end_io(struct btrfs_raid_bio *rbio, 
blk_status_t err)
+ 
+   if (rbio->generic_bio_cnt)
+   btrfs_bio_counter_sub(rbio->bioc->fs_info, 

[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-08-11 Thread Mike Pagano
commit: 7aaaf24efa9606d739c15aa28d8118b093cc315e
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Aug 11 12:32:45 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Aug 11 12:32:45 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=7aaaf24e

Linux patch 5.18.17

Signed-off-by: Mike Pagano  gentoo.org>

 _README  |4 +
 1016_linux-5.18.17.patch | 1418 ++
 2 files changed, 1422 insertions(+)

diff --git a/_README b/_README
index efa0b25e..e0f23579 100644
--- a/_README
+++ b/_README
@@ -107,6 +107,10 @@ Patch:  1015_linux-5.18.16.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.18.16
 
+Patch:  1016_linux-5.18.17.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.18.17
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1016_linux-5.18.17.patch b/1016_linux-5.18.17.patch
new file mode 100644
index ..94fc8829
--- /dev/null
+++ b/1016_linux-5.18.17.patch
@@ -0,0 +1,1418 @@
+diff --git a/Documentation/admin-guide/hw-vuln/spectre.rst 
b/Documentation/admin-guide/hw-vuln/spectre.rst
+index 9e9556826450b..2ce2a38cdd556 100644
+--- a/Documentation/admin-guide/hw-vuln/spectre.rst
 b/Documentation/admin-guide/hw-vuln/spectre.rst
+@@ -422,6 +422,14 @@ The possible values in this file are:
+   'RSB filling'   Protection of RSB on context switch enabled
+   =   ===
+ 
++  - EIBRS Post-barrier Return Stack Buffer (PBRSB) protection status:
++
++  ===  
===
++  'PBRSB-eIBRS: SW sequence'   CPU is affected and protection of RSB on 
VMEXIT enabled
++  'PBRSB-eIBRS: Vulnerable'CPU is vulnerable
++  'PBRSB-eIBRS: Not affected'  CPU is not affected by PBRSB
++  ===  
===
++
+ Full mitigation might require a microcode update from the CPU
+ vendor. When the necessary microcode is not available, the kernel will
+ report vulnerability.
+diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml 
b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
+index 5aac094fd2172..58ecafc1b7f90 100644
+--- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
 b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
+@@ -23,6 +23,7 @@ properties:
+   - brcm,bcm4345c5
+   - brcm,bcm43540-bt
+   - brcm,bcm4335a0
++  - brcm,bcm4349-bt
+ 
+   shutdown-gpios:
+ maxItems: 1
+diff --git a/Makefile b/Makefile
+index 18bcbcd037f0a..ef8c18e5c161c 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 18
+-SUBLEVEL = 16
++SUBLEVEL = 17
+ EXTRAVERSION =
+ NAME = Superb Owl
+ 
+diff --git a/arch/arm64/crypto/poly1305-glue.c 
b/arch/arm64/crypto/poly1305-glue.c
+index 9c3d86e397bf3..1fae18ba11ed1 100644
+--- a/arch/arm64/crypto/poly1305-glue.c
 b/arch/arm64/crypto/poly1305-glue.c
+@@ -52,7 +52,7 @@ static void neon_poly1305_blocks(struct poly1305_desc_ctx 
*dctx, const u8 *src,
+ {
+   if (unlikely(!dctx->sset)) {
+   if (!dctx->rset) {
+-  poly1305_init_arch(dctx, src);
++  poly1305_init_arm64(>h, src);
+   src += POLY1305_BLOCK_SIZE;
+   len -= POLY1305_BLOCK_SIZE;
+   dctx->rset = 1;
+diff --git a/arch/arm64/include/asm/kernel-pgtable.h 
b/arch/arm64/include/asm/kernel-pgtable.h
+index 96dc0f7da258d..a971d462f531c 100644
+--- a/arch/arm64/include/asm/kernel-pgtable.h
 b/arch/arm64/include/asm/kernel-pgtable.h
+@@ -103,8 +103,8 @@
+ /*
+  * Initial memory map attributes.
+  */
+-#define SWAPPER_PTE_FLAGS (PTE_TYPE_PAGE | PTE_AF | PTE_SHARED)
+-#define SWAPPER_PMD_FLAGS (PMD_TYPE_SECT | PMD_SECT_AF | PMD_SECT_S)
++#define SWAPPER_PTE_FLAGS (PTE_TYPE_PAGE | PTE_AF | PTE_SHARED | PTE_UXN)
++#define SWAPPER_PMD_FLAGS (PMD_TYPE_SECT | PMD_SECT_AF | PMD_SECT_S | 
PMD_SECT_UXN)
+ 
+ #if ARM64_KERNEL_USES_PMD_MAPS
+ #define SWAPPER_MM_MMUFLAGS   (PMD_ATTRINDX(MT_NORMAL) | SWAPPER_PMD_FLAGS)
+diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
+index 6a98f1a38c29a..8a93a0a7489b2 100644
+--- a/arch/arm64/kernel/head.S
 b/arch/arm64/kernel/head.S
+@@ -285,7 +285,7 @@ SYM_FUNC_START_LOCAL(__create_page_tables)
+   subsx1, x1, #64
+   b.ne1b
+ 
+-  mov x7, SWAPPER_MM_MMUFLAGS
++  mov_q   x7, SWAPPER_MM_MMUFLAGS
+ 
+   /*
+* Create the identity mapping.
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index 4d1d87f76a74f..ce1f5a876cfea 100644
+--- a/arch/x86/Kconfig
 b/arch/x86/Kconfig
+@@ -2469,7 +2469,7 @@ config RETPOLINE
+ config RETHUNK
+   bool "Enable 

[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-08-03 Thread Alice Ferrazzi
commit: 2fa036fe7ac5f3ac44227817160b9a6f4608e626
Author: Alice Ferrazzi  gentoo  org>
AuthorDate: Wed Aug  3 14:08:37 2022 +
Commit: Alice Ferrazzi  gentoo  org>
CommitDate: Wed Aug  3 14:08:46 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=2fa036fe

Linux patch 5.18.16

Signed-off-by: Alice Ferrazzi  gentoo.org>

 _README  |4 +
 1015_linux-5.18.16.patch | 3168 ++
 2 files changed, 3172 insertions(+)

diff --git a/_README b/_README
index 7c448f23..efa0b25e 100644
--- a/_README
+++ b/_README
@@ -103,6 +103,10 @@ Patch:  1014_linux-5.18.15.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.18.15
 
+Patch:  1015_linux-5.18.16.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.18.16
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1015_linux-5.18.16.patch b/1015_linux-5.18.16.patch
new file mode 100644
index ..79bc2313
--- /dev/null
+++ b/1015_linux-5.18.16.patch
@@ -0,0 +1,3168 @@
+diff --git a/Documentation/admin-guide/kernel-parameters.txt 
b/Documentation/admin-guide/kernel-parameters.txt
+index eb92195ca0155..334544c893ddf 100644
+--- a/Documentation/admin-guide/kernel-parameters.txt
 b/Documentation/admin-guide/kernel-parameters.txt
+@@ -3106,6 +3106,7 @@
+  no_entry_flush [PPC]
+  no_uaccess_flush [PPC]
+  mmio_stale_data=off [X86]
++ retbleed=off [X86]
+ 
+   Exceptions:
+  This does not have any effect on
+@@ -3128,6 +3129,7 @@
+  mds=full,nosmt [X86]
+  tsx_async_abort=full,nosmt [X86]
+  mmio_stale_data=full,nosmt [X86]
++ retbleed=auto,nosmt [X86]
+ 
+   mminit_loglevel=
+   [KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this
+diff --git a/Documentation/networking/ip-sysctl.rst 
b/Documentation/networking/ip-sysctl.rst
+index 8899b474edbfd..e29017d4d7a25 100644
+--- a/Documentation/networking/ip-sysctl.rst
 b/Documentation/networking/ip-sysctl.rst
+@@ -2848,7 +2848,14 @@ sctp_rmem - vector of 3 INTEGERs: min, default, max
+   Default: 4K
+ 
+ sctp_wmem  - vector of 3 INTEGERs: min, default, max
+-  Currently this tunable has no effect.
++  Only the first value ("min") is used, "default" and "max" are
++  ignored.
++
++  min: Minimum size of send buffer that can be used by SCTP sockets.
++  It is guaranteed to each SCTP socket (but not association) even
++  under moderate memory pressure.
++
++  Default: 4K
+ 
+ addr_scope_policy - INTEGER
+   Control IPv4 address scoping - draft-stewart-tsvwg-sctp-ipv4-00
+diff --git a/Makefile b/Makefile
+index 5957afa296922..18bcbcd037f0a 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 18
+-SUBLEVEL = 15
++SUBLEVEL = 16
+ EXTRAVERSION =
+ NAME = Superb Owl
+ 
+diff --git a/arch/arm/boot/dts/lan966x.dtsi b/arch/arm/boot/dts/lan966x.dtsi
+index 5e9cbc8cdcbce..a99ffb4cfb8a6 100644
+--- a/arch/arm/boot/dts/lan966x.dtsi
 b/arch/arm/boot/dts/lan966x.dtsi
+@@ -38,7 +38,7 @@
+   sys_clk: sys_clk {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+-  clock-frequency = <16250>;
++  clock-frequency = <165625000>;
+   };
+ 
+   cpu_clk: cpu_clk {
+diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
+index a81dda65c5762..45180a2cc47cb 100644
+--- a/arch/arm/include/asm/dma.h
 b/arch/arm/include/asm/dma.h
+@@ -10,7 +10,7 @@
+ #else
+ #define MAX_DMA_ADDRESS   ({ \
+   extern phys_addr_t arm_dma_zone_size; \
+-  arm_dma_zone_size && arm_dma_zone_size < (0x1000 - PAGE_OFFSET) ? \
++  arm_dma_zone_size && arm_dma_zone_size < (0x1ULL - PAGE_OFFSET) 
? \
+   (PAGE_OFFSET + arm_dma_zone_size) : 0xUL; })
+ #endif
+ 
+diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
+index 44659fbc37bab..036f3aacd0e19 100644
+--- a/arch/arm/mach-pxa/corgi.c
 b/arch/arm/mach-pxa/corgi.c
+@@ -531,7 +531,7 @@ static struct pxa2xx_spi_controller corgi_spi_info = {
+ };
+ 
+ static struct gpiod_lookup_table corgi_spi_gpio_table = {
+-  .dev_id = "pxa2xx-spi.1",
++  .dev_id = "spi1",
+   .table = {
+   GPIO_LOOKUP_IDX("gpio-pxa", CORGI_GPIO_ADS7846_CS, "cs", 0, 
GPIO_ACTIVE_LOW),
+   GPIO_LOOKUP_IDX("gpio-pxa", CORGI_GPIO_LCDCON_CS, "cs", 1, 

[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-07-22 Thread Mike Pagano
commit: e83956c00f3c9876c87a60a248d151aecf71c5d8
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Jul 22 11:10:40 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Jul 22 11:10:40 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=e83956c0

Remove redundant patch: 1950_workaround_negprot_bug.patch

Signed-off-by: Mike Pagano  gentoo.org>

 _README   |  4 ---
 1950_workaround_negprot_bug.patch | 56 ---
 2 files changed, 60 deletions(-)

diff --git a/_README b/_README
index a7d6578d..b6f81e34 100644
--- a/_README
+++ b/_README
@@ -107,10 +107,6 @@ Patch:  1700_sparc-address-warray-bound-warnings.patch
 From:  https://github.com/KSPP/linux/issues/109
 Desc:  Address -Warray-bounds warnings 
 
-Patch:  1950_workaround_negprot_bug.patch 
-From:   
https://patchwork.kernel.org/project/cifs-client/patch/cah2r5mtun-yswt5vtbnpzj02fwihyoce2er8mcgrgre8qpk...@mail.gmail.com/
-Desc:   Fix mount fail to older Samba servers
-
 Patch:  2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch
 From:   
https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw
 Desc:   Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. 
See bug #686758

diff --git a/1950_workaround_negprot_bug.patch 
b/1950_workaround_negprot_bug.patch
deleted file mode 100644
index 9a38ed83..
--- a/1950_workaround_negprot_bug.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From a8d8532e4c335f0a31dd213abe4e31682f34647c Mon Sep 17 00:00:00 2001
-From: Steve French 
-Date: Tue, 12 Jul 2022 00:11:42 -0500
-Subject: [PATCH] smb3: workaround negprot bug in some Samba servers
-
-Mount can now fail to older Samba servers due to a server
-bug handling padding at the end of the last negotiate
-contexts (negotiate contexts typically round up to 8 byte
-lengths by adding padding if needed). This server bug can
-be avoided by switching the order of negotiate contexts,
-placing a negotiate context at the end that does not
-require padding (prior to the recent netname context fix
-this was the case on the client).
-
-Fixes: 73130a7b1ac9 ("smb3: fix empty netname context on secondary channels")
-Reported-by: Julian Sikorski 
-Signed-off-by: Steve French 

- fs/cifs/smb2pdu.c | 13 +++--
- 1 file changed, 7 insertions(+), 6 deletions(-)
-
-diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
-index 12b4dddaedb0..c705de32e225 100644
 a/fs/cifs/smb2pdu.c
-+++ b/fs/cifs/smb2pdu.c
-@@ -571,10 +571,6 @@ assemble_neg_contexts(struct smb2_negotiate_req *req,
-   *total_len += ctxt_len;
-   pneg_ctxt += ctxt_len;
- 
--  build_posix_ctxt((struct smb2_posix_neg_context *)pneg_ctxt);
--  *total_len += sizeof(struct smb2_posix_neg_context);
--  pneg_ctxt += sizeof(struct smb2_posix_neg_context);
--
-   /*
-* secondary channels don't have the hostname field populated
-* use the hostname field in the primary channel instead
-@@ -586,9 +582,14 @@ assemble_neg_contexts(struct smb2_negotiate_req *req,
- hostname);
-   *total_len += ctxt_len;
-   pneg_ctxt += ctxt_len;
--  neg_context_count = 4;
--  } else /* second channels do not have a hostname */
-   neg_context_count = 3;
-+  } else
-+  neg_context_count = 2;
-+
-+  build_posix_ctxt((struct smb2_posix_neg_context *)pneg_ctxt);
-+  *total_len += sizeof(struct smb2_posix_neg_context);
-+  pneg_ctxt += sizeof(struct smb2_posix_neg_context);
-+  neg_context_count++;
- 
-   if (server->compress_algorithm) {
-   build_compression_ctxt((struct 
smb2_compression_capabilities_context *)
--- 
-2.34.1
-



[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-07-15 Thread Alice Ferrazzi
commit: ea1cc0f1b2e15fa74a13ebd795a6b677d4af9fc1
Author: Alice Ferrazzi  gentoo  org>
AuthorDate: Fri Jul 15 10:09:28 2022 +
Commit: Alice Ferrazzi  gentoo  org>
CommitDate: Fri Jul 15 10:09:35 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ea1cc0f1

Linux patch 5.18.12

Signed-off-by: Alice Ferrazzi  gentoo.org>

 _README  |  4 
 1011_linux-5.18.12.patch | 26 ++
 2 files changed, 30 insertions(+)

diff --git a/_README b/_README
index 764c25c9..2ad9190a 100644
--- a/_README
+++ b/_README
@@ -87,6 +87,10 @@ Patch:  1010_linux-5.18.11.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.18.11
 
+Patch:  1011_linux-5.18.12.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.18.12
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1011_linux-5.18.12.patch b/1011_linux-5.18.12.patch
new file mode 100644
index ..33801d1a
--- /dev/null
+++ b/1011_linux-5.18.12.patch
@@ -0,0 +1,26 @@
+diff --git a/Makefile b/Makefile
+index 323032d60ac34..f8e2445b60447 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 18
+-SUBLEVEL = 11
++SUBLEVEL = 12
+ EXTRAVERSION =
+ NAME = Superb Owl
+ 
+diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c 
b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
+index 375529b7d12e3..44b14c9dc9a73 100644
+--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
 b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
+@@ -695,7 +695,7 @@ static int gpmi_nfc_compute_timings(struct gpmi_nand_data 
*this,
+   hw->timing0 = BF_GPMI_TIMING0_ADDRESS_SETUP(addr_setup_cycles) |
+ BF_GPMI_TIMING0_DATA_HOLD(data_hold_cycles) |
+ BF_GPMI_TIMING0_DATA_SETUP(data_setup_cycles);
+-  hw->timing1 = 
BF_GPMI_TIMING1_BUSY_TIMEOUT(DIV_ROUND_UP(busy_timeout_cycles, 4096));
++  hw->timing1 = BF_GPMI_TIMING1_BUSY_TIMEOUT(busy_timeout_cycles * 4096);
+ 
+   /*
+* Derive NFC ideal delay from {3}:



[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-07-15 Thread Alice Ferrazzi
commit: ce587fbdb043f9ed6e28155265f2e2530d756a78
Author: Alice Ferrazzi  gentoo  org>
AuthorDate: Fri Jul 15 08:56:36 2022 +
Commit: Alice Ferrazzi  gentoo  org>
CommitDate: Fri Jul 15 08:57:31 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ce587fbd

Add 1950_workaround_negprot_bug.patch

Fix incompatibility with older samba server

Signed-off-by: Alice Ferrazzi  gentoo.org>

 _README   |  4 +++
 1950_workaround_negprot_bug.patch | 56 +++
 2 files changed, 60 insertions(+)

diff --git a/_README b/_README
index be72894f..764c25c9 100644
--- a/_README
+++ b/_README
@@ -99,6 +99,10 @@ Patch:  1700_sparc-address-warray-bound-warnings.patch
 From:  https://github.com/KSPP/linux/issues/109
 Desc:  Address -Warray-bounds warnings 
 
+Patch:  1950_workaround_negprot_bug.patch 
+From:   
https://patchwork.kernel.org/project/cifs-client/patch/cah2r5mtun-yswt5vtbnpzj02fwihyoce2er8mcgrgre8qpk...@mail.gmail.com/
+Desc:   Fix mount fail to older Samba servers
+
 Patch:  2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch
 From:   
https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw
 Desc:   Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. 
See bug #686758

diff --git a/1950_workaround_negprot_bug.patch 
b/1950_workaround_negprot_bug.patch
new file mode 100644
index ..9a38ed83
--- /dev/null
+++ b/1950_workaround_negprot_bug.patch
@@ -0,0 +1,56 @@
+From a8d8532e4c335f0a31dd213abe4e31682f34647c Mon Sep 17 00:00:00 2001
+From: Steve French 
+Date: Tue, 12 Jul 2022 00:11:42 -0500
+Subject: [PATCH] smb3: workaround negprot bug in some Samba servers
+
+Mount can now fail to older Samba servers due to a server
+bug handling padding at the end of the last negotiate
+contexts (negotiate contexts typically round up to 8 byte
+lengths by adding padding if needed). This server bug can
+be avoided by switching the order of negotiate contexts,
+placing a negotiate context at the end that does not
+require padding (prior to the recent netname context fix
+this was the case on the client).
+
+Fixes: 73130a7b1ac9 ("smb3: fix empty netname context on secondary channels")
+Reported-by: Julian Sikorski 
+Signed-off-by: Steve French 
+---
+ fs/cifs/smb2pdu.c | 13 +++--
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
+index 12b4dddaedb0..c705de32e225 100644
+--- a/fs/cifs/smb2pdu.c
 b/fs/cifs/smb2pdu.c
+@@ -571,10 +571,6 @@ assemble_neg_contexts(struct smb2_negotiate_req *req,
+   *total_len += ctxt_len;
+   pneg_ctxt += ctxt_len;
+ 
+-  build_posix_ctxt((struct smb2_posix_neg_context *)pneg_ctxt);
+-  *total_len += sizeof(struct smb2_posix_neg_context);
+-  pneg_ctxt += sizeof(struct smb2_posix_neg_context);
+-
+   /*
+* secondary channels don't have the hostname field populated
+* use the hostname field in the primary channel instead
+@@ -586,9 +582,14 @@ assemble_neg_contexts(struct smb2_negotiate_req *req,
+ hostname);
+   *total_len += ctxt_len;
+   pneg_ctxt += ctxt_len;
+-  neg_context_count = 4;
+-  } else /* second channels do not have a hostname */
+   neg_context_count = 3;
++  } else
++  neg_context_count = 2;
++
++  build_posix_ctxt((struct smb2_posix_neg_context *)pneg_ctxt);
++  *total_len += sizeof(struct smb2_posix_neg_context);
++  pneg_ctxt += sizeof(struct smb2_posix_neg_context);
++  neg_context_count++;
+ 
+   if (server->compress_algorithm) {
+   build_compression_ctxt((struct 
smb2_compression_capabilities_context *)
+-- 
+2.34.1
+



[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-07-07 Thread Mike Pagano
commit: 72d4da40b59f7f9b0c3e8c862379301f1c2b5a4a
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Jul  7 17:29:17 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Jul  7 17:29:17 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=72d4da40

Removal of redundant patch, minor clean-up for BMQ defaults

Removed:
1950_cifs-fix-minor-compile-warning.patch

Signed-off-by: Mike Pagano  gentoo.org>

 _README   |  4 
 1950_cifs-fix-minor-compile-warning.patch | 33 ---
 5021_BMQ-and-PDS-gentoo-defaults.patch|  9 +
 3 files changed, 5 insertions(+), 41 deletions(-)

diff --git a/_README b/_README
index 557264e1..30a7b58d 100644
--- a/_README
+++ b/_README
@@ -95,10 +95,6 @@ Patch:  1700_sparc-address-warray-bound-warnings.patch
 From:  https://github.com/KSPP/linux/issues/109
 Desc:  Address -Warray-bounds warnings 
 
-Patch:  1950_cifs-fix-minor-compile-warning.patch
-From:   https://git.kernel.org/
-Desc:   cifs: fix minor compile warning
-
 Patch:  2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch
 From:   
https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw
 Desc:   Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. 
See bug #686758

diff --git a/1950_cifs-fix-minor-compile-warning.patch 
b/1950_cifs-fix-minor-compile-warning.patch
deleted file mode 100644
index 65787238..
--- a/1950_cifs-fix-minor-compile-warning.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 93ed91c020aa4f021600a633f1f87790a5e50b91 Mon Sep 17 00:00:00 2001
-From: Steve French 
-Date: Sun, 22 May 2022 21:25:24 -0500
-Subject: cifs: fix minor compile warning
-
-Add ifdef around nodfs variable from patch:
-  "cifs: don't call cifs_dfs_query_info_nonascii_quirk() if nodfs was set"
-which is unused when CONFIG_DFS_UPCALL is not set.
-
-Signed-off-by: Steve French 

- fs/cifs/connect.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-(limited to 'fs/cifs/connect.c')
-
-diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
-index 44dc66f21d832..0b08693d1af8f 100644
 a/fs/cifs/connect.c
-+++ b/fs/cifs/connect.c
-@@ -3433,7 +3433,9 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
-   struct cifs_tcon *tcon = mnt_ctx->tcon;
-   struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;
-   char *full_path;
-+#ifdef CONFIG_CIFS_DFS_UPCALL
-   bool nodfs = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS;
-+#endif
- 
-   if (!server->ops->is_path_accessible)
-   return -EOPNOTSUPP;
--- 
-cgit 1.2.3-1.el7
-

diff --git a/5021_BMQ-and-PDS-gentoo-defaults.patch 
b/5021_BMQ-and-PDS-gentoo-defaults.patch
index 7a71c6b6..6b2049da 100644
--- a/5021_BMQ-and-PDS-gentoo-defaults.patch
+++ b/5021_BMQ-and-PDS-gentoo-defaults.patch
@@ -1,7 +1,7 @@
 a/init/Kconfig 2021-04-27 07:38:30.556467045 -0400
-+++ b/init/Kconfig 2021-04-27 07:39:32.956412800 -0400
-@@ -780,8 +780,9 @@ config GENERIC_SCHED_CLOCK
- menu "Scheduler features"
+--- a/init/Kconfig 2022-07-07 13:22:00.698439887 -0400
 b/init/Kconfig 2022-07-07 13:23:45.152333576 -0400
+@@ -874,8 +874,9 @@ config UCLAMP_BUCKETS_COUNT
+ If in doubt, use the default value.
  
  menuconfig SCHED_ALT
 +  depends on X86_64
@@ -10,3 +10,4 @@
 +  default n
help
  This feature enable alternative CPU scheduler"
+ 



[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-07-07 Thread Mike Pagano
commit: cfcdf3b0507246ef8ff1a4291c90feedb92166f9
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Jul  7 16:26:00 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Jul  7 16:26:00 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=cfcdf3b0

Linux patch 5.18.10

Signed-off-by: Mike Pagano  gentoo.org>

 _README  |4 +
 1009_linux-5.18.10.patch | 3905 ++
 2 files changed, 3909 insertions(+)

diff --git a/_README b/_README
index e3668eda..557264e1 100644
--- a/_README
+++ b/_README
@@ -79,6 +79,10 @@ Patch:  1008_linux-5.18.9.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.18.9
 
+Patch:  1009_linux-5.18.10.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.18.10
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1009_linux-5.18.10.patch b/1009_linux-5.18.10.patch
new file mode 100644
index ..064488e3
--- /dev/null
+++ b/1009_linux-5.18.10.patch
@@ -0,0 +1,3905 @@
+diff --git a/Makefile b/Makefile
+index 751cfd786c8c0..088b84f99203c 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 18
+-SUBLEVEL = 9
++SUBLEVEL = 10
+ EXTRAVERSION =
+ NAME = Superb Owl
+ 
+diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c
+index 84a1cea1f43b9..309648c17f486 100644
+--- a/arch/arm/xen/p2m.c
 b/arch/arm/xen/p2m.c
+@@ -63,11 +63,12 @@ out:
+ 
+ unsigned long __pfn_to_mfn(unsigned long pfn)
+ {
+-  struct rb_node *n = phys_to_mach.rb_node;
++  struct rb_node *n;
+   struct xen_p2m_entry *entry;
+   unsigned long irqflags;
+ 
+   read_lock_irqsave(_lock, irqflags);
++  n = phys_to_mach.rb_node;
+   while (n) {
+   entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys);
+   if (entry->pfn <= pfn &&
+@@ -152,10 +153,11 @@ bool __set_phys_to_machine_multi(unsigned long pfn,
+   int rc;
+   unsigned long irqflags;
+   struct xen_p2m_entry *p2m_entry;
+-  struct rb_node *n = phys_to_mach.rb_node;
++  struct rb_node *n;
+ 
+   if (mfn == INVALID_P2M_ENTRY) {
+   write_lock_irqsave(_lock, irqflags);
++  n = phys_to_mach.rb_node;
+   while (n) {
+   p2m_entry = rb_entry(n, struct xen_p2m_entry, 
rbnode_phys);
+   if (p2m_entry->pfn <= pfn &&
+diff --git a/arch/parisc/kernel/asm-offsets.c 
b/arch/parisc/kernel/asm-offsets.c
+index 2673d57eeb008..94652e13c2603 100644
+--- a/arch/parisc/kernel/asm-offsets.c
 b/arch/parisc/kernel/asm-offsets.c
+@@ -224,8 +224,13 @@ int main(void)
+   BLANK();
+   DEFINE(ASM_SIGFRAME_SIZE, PARISC_RT_SIGFRAME_SIZE);
+   DEFINE(SIGFRAME_CONTEXT_REGS, offsetof(struct rt_sigframe, 
uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE);
++#ifdef CONFIG_64BIT
+   DEFINE(ASM_SIGFRAME_SIZE32, PARISC_RT_SIGFRAME_SIZE32);
+   DEFINE(SIGFRAME_CONTEXT_REGS32, offsetof(struct compat_rt_sigframe, 
uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE32);
++#else
++  DEFINE(ASM_SIGFRAME_SIZE32, PARISC_RT_SIGFRAME_SIZE);
++  DEFINE(SIGFRAME_CONTEXT_REGS32, offsetof(struct rt_sigframe, 
uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE);
++#endif
+   BLANK();
+   DEFINE(ICACHE_BASE, offsetof(struct pdc_cache_info, ic_base));
+   DEFINE(ICACHE_STRIDE, offsetof(struct pdc_cache_info, ic_stride));
+diff --git a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c
+index ed1e88a74dc42..bac581b5ecfc5 100644
+--- a/arch/parisc/kernel/unaligned.c
 b/arch/parisc/kernel/unaligned.c
+@@ -146,7 +146,7 @@ static int emulate_ldw(struct pt_regs *regs, int toreg, 
int flop)
+ " depw%%r0,31,2,%4\n"
+ "1:   ldw 0(%%sr1,%4),%0\n"
+ "2:   ldw 4(%%sr1,%4),%3\n"
+-" subi32,%4,%2\n"
++" subi32,%2,%2\n"
+ " mtctl   %2,11\n"
+ " vshd%0,%3,%0\n"
+ "3:   \n"
+diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
+index 500f2a0831ef8..45e471516c3c3 100644
+--- a/arch/powerpc/Kconfig
 b/arch/powerpc/Kconfig
+@@ -358,6 +358,10 @@ config ARCH_SUSPEND_NONZERO_CPU
+   def_bool y
+   depends on PPC_POWERNV || PPC_PSERIES
+ 
++config ARCH_HAS_ADD_PAGES
++  def_bool y
++  depends on ARCH_ENABLE_MEMORY_HOTPLUG
++
+ config PPC_DCR_NATIVE
+   bool
+ 
+diff --git a/arch/powerpc/include/asm/bpf_perf_event.h 
b/arch/powerpc/include/asm/bpf_perf_event.h
+new file mode 100644
+index 0..e8a7b4ffb58c2
+--- /dev/null
 b/arch/powerpc/include/asm/bpf_perf_event.h
+@@ -0,0 +1,9 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++#ifndef _ASM_POWERPC_BPF_PERF_EVENT_H
++#define _ASM_POWERPC_BPF_PERF_EVENT_H
++
++#include 
++
++typedef struct user_pt_regs bpf_user_pt_regs_t;
++
++#endif /* _ASM_POWERPC_BPF_PERF_EVENT_H */
+diff --git a/arch/powerpc/include/uapi/asm/bpf_perf_event.h 

[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-07-02 Thread Mike Pagano
commit: d89b7b70ccefe56028a258075397ad66e474e665
Author: Mike Pagano  gentoo  org>
AuthorDate: Sat Jul  2 16:12:04 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sat Jul  2 16:12:04 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=d89b7b70

Linux patch 5.18.9

Signed-off-by: Mike Pagano  gentoo.org>

 _README |   4 +
 1008_linux-5.18.9.patch | 283 
 2 files changed, 287 insertions(+)

diff --git a/_README b/_README
index b676cc58..e3668eda 100644
--- a/_README
+++ b/_README
@@ -75,6 +75,10 @@ Patch:  1007_linux-5.18.8.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.18.8
 
+Patch:  1008_linux-5.18.9.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.18.9
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1008_linux-5.18.9.patch b/1008_linux-5.18.9.patch
new file mode 100644
index ..0716a3e2
--- /dev/null
+++ b/1008_linux-5.18.9.patch
@@ -0,0 +1,283 @@
+diff --git a/Makefile b/Makefile
+index 6ac3335f65aff..751cfd786c8c0 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 18
+-SUBLEVEL = 8
++SUBLEVEL = 9
+ EXTRAVERSION =
+ NAME = Superb Owl
+ 
+diff --git a/arch/powerpc/include/asm/ftrace.h 
b/arch/powerpc/include/asm/ftrace.h
+index d83758acd1c7c..44a37a2b6a1cf 100644
+--- a/arch/powerpc/include/asm/ftrace.h
 b/arch/powerpc/include/asm/ftrace.h
+@@ -86,7 +86,7 @@ static inline bool arch_syscall_match_sym_name(const char 
*sym, const char *name
+ #endif /* PPC64_ELF_ABI_v1 */
+ #endif /* CONFIG_FTRACE_SYSCALLS */
+ 
+-#ifdef CONFIG_PPC64
++#if defined(CONFIG_PPC64) && defined(CONFIG_FUNCTION_TRACER)
+ #include 
+ 
+ static inline void this_cpu_disable_ftrace(void)
+@@ -110,11 +110,13 @@ static inline u8 this_cpu_get_ftrace_enabled(void)
+   return get_paca()->ftrace_enabled;
+ }
+ 
++void ftrace_free_init_tramp(void);
+ #else /* CONFIG_PPC64 */
+ static inline void this_cpu_disable_ftrace(void) { }
+ static inline void this_cpu_enable_ftrace(void) { }
+ static inline void this_cpu_set_ftrace_enabled(u8 ftrace_enabled) { }
+ static inline u8 this_cpu_get_ftrace_enabled(void) { return 1; }
++static inline void ftrace_free_init_tramp(void) { }
+ #endif /* CONFIG_PPC64 */
+ #endif /* !__ASSEMBLY__ */
+ 
+diff --git a/arch/powerpc/kernel/trace/ftrace.c 
b/arch/powerpc/kernel/trace/ftrace.c
+index 4ee04aacf9f13..a778f2ae1f3f5 100644
+--- a/arch/powerpc/kernel/trace/ftrace.c
 b/arch/powerpc/kernel/trace/ftrace.c
+@@ -306,9 +306,7 @@ static int setup_mcount_compiler_tramp(unsigned long tramp)
+ 
+   /* Is this a known long jump tramp? */
+   for (i = 0; i < NUM_FTRACE_TRAMPS; i++)
+-  if (!ftrace_tramps[i])
+-  break;
+-  else if (ftrace_tramps[i] == tramp)
++  if (ftrace_tramps[i] == tramp)
+   return 0;
+ 
+   /* Is this a known plt tramp? */
+@@ -863,6 +861,17 @@ void arch_ftrace_update_code(int command)
+ 
+ extern unsigned int ftrace_tramp_text[], ftrace_tramp_init[];
+ 
++void ftrace_free_init_tramp(void)
++{
++  int i;
++
++  for (i = 0; i < NUM_FTRACE_TRAMPS && ftrace_tramps[i]; i++)
++  if (ftrace_tramps[i] == (unsigned long)ftrace_tramp_init) {
++  ftrace_tramps[i] = 0;
++  return;
++  }
++}
++
+ int __init ftrace_dyn_arch_init(void)
+ {
+   int i;
+diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
+index 4d221d033804e..149635e5c1653 100644
+--- a/arch/powerpc/mm/mem.c
 b/arch/powerpc/mm/mem.c
+@@ -22,6 +22,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #include 
+ 
+@@ -312,6 +313,7 @@ void free_initmem(void)
+   ppc_md.progress = ppc_printk_progress;
+   mark_initmem_nx();
+   free_initmem_default(POISON_FREE_INITMEM);
++  ftrace_free_init_tramp();
+ }
+ 
+ /*
+diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
+index 1589ae7d5abb6..8182ff2d12fe1 100644
+--- a/drivers/clocksource/Kconfig
 b/drivers/clocksource/Kconfig
+@@ -80,7 +80,7 @@ config IXP4XX_TIMER
+   bool "Intel XScale IXP4xx timer driver" if COMPILE_TEST
+   depends on HAS_IOMEM
+   select CLKSRC_MMIO
+-  select TIMER_OF if OF
++  select TIMER_OF
+   help
+ Enables support for the Intel XScale IXP4xx SoC timer.
+ 
+diff --git a/drivers/clocksource/timer-ixp4xx.c 
b/drivers/clocksource/timer-ixp4xx.c
+index cbb184953510b..720ed70a2964f 100644
+--- a/drivers/clocksource/timer-ixp4xx.c
 b/drivers/clocksource/timer-ixp4xx.c
+@@ -19,8 +19,6 @@
+ #include 
+ #include 
+ #include 
+-/* Goes away with OF conversion */
+-#include 
+ 
+ /*
+  * Constants to make it easy to access Timer Control/Status registers
+@@ -263,28 +261,6 @@ static struct 

[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-06-26 Thread Mike Pagano
commit: 9ae3c38079c69dc3335f4e20816987575a5ea5c7
Author: Mike Pagano  gentoo  org>
AuthorDate: Sun Jun 26 21:51:26 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sun Jun 26 21:51:26 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=9ae3c380

Updated BMQ Schedular patch to r2

Signed-off-by: Mike Pagano  gentoo.org>

 _README|  2 +-
 ...=> 5020_BMQ-and-PDS-io-scheduler-v5.18-r2.patch | 55 +++---
 2 files changed, 19 insertions(+), 38 deletions(-)

diff --git a/_README b/_README
index 17ef0755..728697d0 100644
--- a/_README
+++ b/_README
@@ -111,7 +111,7 @@ Patch:  5010_enable-cpu-optimizations-universal.patch
 From:   https://github.com/graysky2/kernel_compiler_patch
 Desc:   Kernel >= 5.15 patch enables gcc = v11.1+ optimizations for additional 
CPUs.
 
-Patch:  5020_BMQ-and-PDS-io-scheduler-v5.18-r1.patch
+Patch:  5020_BMQ-and-PDS-io-scheduler-v5.18-r2.patch
 From:   https://gitlab.com/alfredchen/linux-prjc
 Desc:   BMQ(BitMap Queue) Scheduler. A new CPU scheduler developed from 
PDS(incld). Inspired by the scheduler in zircon.
 

diff --git a/5020_BMQ-and-PDS-io-scheduler-v5.18-r1.patch 
b/5020_BMQ-and-PDS-io-scheduler-v5.18-r2.patch
similarity index 99%
rename from 5020_BMQ-and-PDS-io-scheduler-v5.18-r1.patch
rename to 5020_BMQ-and-PDS-io-scheduler-v5.18-r2.patch
index a130157e..cf13d856 100644
--- a/5020_BMQ-and-PDS-io-scheduler-v5.18-r1.patch
+++ b/5020_BMQ-and-PDS-io-scheduler-v5.18-r2.patch
@@ -632,10 +632,10 @@ index 976092b7bd45..31d587c16ec1 100644
  obj-y += build_utility.o
 diff --git a/kernel/sched/alt_core.c b/kernel/sched/alt_core.c
 new file mode 100644
-index ..189332cd6f99
+index ..b8e67d568e17
 --- /dev/null
 +++ b/kernel/sched/alt_core.c
-@@ -0,0 +1,7768 @@
+@@ -0,0 +1,7750 @@
 +/*
 + *  kernel/sched/alt_core.c
 + *
@@ -705,7 +705,7 @@ index ..189332cd6f99
 +#define sched_feat(x) (0)
 +#endif /* CONFIG_SCHED_DEBUG */
 +
-+#define ALT_SCHED_VERSION "v5.18-r1"
++#define ALT_SCHED_VERSION "v5.18-r2"
 +
 +/* rt_prio(prio) defined in include/linux/sched/rt.h */
 +#define rt_task(p)rt_prio((p)->prio)
@@ -785,14 +785,14 @@ index ..189332cd6f99
 +#ifdef CONFIG_SCHED_SMT
 +static cpumask_t sched_sg_idle_mask cacheline_aligned_in_smp;
 +#endif
-+static cpumask_t sched_rq_watermark[SCHED_BITS] cacheline_aligned_in_smp;
++static cpumask_t sched_rq_watermark[SCHED_QUEUE_BITS] 
cacheline_aligned_in_smp;
 +
 +/* sched_queue related functions */
 +static inline void sched_queue_init(struct sched_queue *q)
 +{
 +  int i;
 +
-+  bitmap_zero(q->bitmap, SCHED_BITS);
++  bitmap_zero(q->bitmap, SCHED_QUEUE_BITS);
 +  for(i = 0; i < SCHED_BITS; i++)
 +  INIT_LIST_HEAD(>heads[i]);
 +}
@@ -824,7 +824,7 @@ index ..189332cd6f99
 +  cpu = cpu_of(rq);
 +  if (watermark < last_wm) {
 +  for (i = last_wm; i > watermark; i--)
-+  cpumask_clear_cpu(cpu, sched_rq_watermark + SCHED_BITS 
- 1 - i);
++  cpumask_clear_cpu(cpu, sched_rq_watermark + 
SCHED_QUEUE_BITS - i);
 +#ifdef CONFIG_SCHED_SMT
 +  if (static_branch_likely(_smt_present) &&
 +  IDLE_TASK_SCHED_PRIO == last_wm)
@@ -835,7 +835,7 @@ index ..189332cd6f99
 +  }
 +  /* last_wm < watermark */
 +  for (i = watermark; i > last_wm; i--)
-+  cpumask_set_cpu(cpu, sched_rq_watermark + SCHED_BITS - 1 - i);
++  cpumask_set_cpu(cpu, sched_rq_watermark + SCHED_QUEUE_BITS - i);
 +#ifdef CONFIG_SCHED_SMT
 +  if (static_branch_likely(_smt_present) &&
 +  IDLE_TASK_SCHED_PRIO == watermark) {
@@ -2543,7 +2543,7 @@ index ..189332cd6f99
 +#endif
 +  cpumask_and(, _mask, sched_rq_watermark) ||
 +  cpumask_and(, _mask,
-+  sched_rq_watermark + SCHED_BITS - task_sched_prio(p)))
++  sched_rq_watermark + SCHED_QUEUE_BITS - 1 - 
task_sched_prio(p)))
 +  return best_mask_cpu(task_cpu(p), );
 +
 +  return best_mask_cpu(task_cpu(p), _mask);
@@ -4334,24 +4334,6 @@ index ..189332cd6f99
 + */
 +void sched_exec(void)
 +{
-+  struct task_struct *p = current;
-+  unsigned long flags;
-+  int dest_cpu;
-+
-+  raw_spin_lock_irqsave(>pi_lock, flags);
-+  dest_cpu = cpumask_any(p->cpus_ptr);
-+  if (dest_cpu == smp_processor_id())
-+  goto unlock;
-+
-+  if (likely(cpu_active(dest_cpu))) {
-+  struct migration_arg arg = { p, dest_cpu };
-+
-+  raw_spin_unlock_irqrestore(>pi_lock, flags);
-+  stop_one_cpu(task_cpu(p), migration_cpu_stop, );
-+  return;
-+  }
-+unlock:
-+  raw_spin_unlock_irqrestore(>pi_lock, flags);
 +}
 +
 +#endif
@@ -4519,7 +4501,7 @@ index ..189332cd6f99
 +}
 +
 +#ifdef CONFIG_SCHED_SMT
-+static 

[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-06-25 Thread Mike Pagano
commit: 94c6ca333405e69c23dd1c0a2ccc86236f50e833
Author: Mike Pagano  gentoo  org>
AuthorDate: Sat Jun 25 19:42:33 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sat Jun 25 19:42:33 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=94c6ca33

Linux patch 5.18.7

Signed-off-by: Mike Pagano  gentoo.org>

 _README |   4 +
 1006_linux-5.18.7.patch | 779 
 2 files changed, 783 insertions(+)

diff --git a/_README b/_README
index 84b72755..17ef0755 100644
--- a/_README
+++ b/_README
@@ -67,6 +67,10 @@ Patch:  1005_linux-5.18.6.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.18.6
 
+Patch:  1006_linux-5.18.7.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.18.7
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1006_linux-5.18.7.patch b/1006_linux-5.18.7.patch
new file mode 100644
index ..ec6938d8
--- /dev/null
+++ b/1006_linux-5.18.7.patch
@@ -0,0 +1,779 @@
+diff --git a/Documentation/devicetree/bindings/nvmem/fsl,layerscape-sfp.yaml 
b/Documentation/devicetree/bindings/nvmem/fsl,layerscape-sfp.yaml
+index 80914b93638e4..24c5e38584528 100644
+--- a/Documentation/devicetree/bindings/nvmem/fsl,layerscape-sfp.yaml
 b/Documentation/devicetree/bindings/nvmem/fsl,layerscape-sfp.yaml
+@@ -24,15 +24,29 @@ properties:
+   reg:
+ maxItems: 1
+ 
++  clocks:
++maxItems: 1
++description:
++  The SFP clock. Typically, this is the platform clock divided by 4.
++
++  clock-names:
++const: sfp
++
+ required:
+   - compatible
+   - reg
++  - clock-names
++  - clocks
+ 
+ unevaluatedProperties: false
+ 
+ examples:
+   - |
++#include 
+ efuse@1e8 {
+ compatible = "fsl,ls1028a-sfp";
+ reg = <0x1e8 0x8000>;
++clocks = < QORIQ_CLK_PLATFORM_PLL
++QORIQ_CLK_PLL_DIV(4)>;
++clock-names = "sfp";
+ };
+diff --git a/Makefile b/Makefile
+index 27850d452d652..61d63068553c8 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 18
+-SUBLEVEL = 6
++SUBLEVEL = 7
+ EXTRAVERSION =
+ NAME = Superb Owl
+ 
+diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
+index 697df02362af1..4909dcd762e8c 100644
+--- a/arch/s390/mm/pgtable.c
 b/arch/s390/mm/pgtable.c
+@@ -748,7 +748,7 @@ void ptep_zap_key(struct mm_struct *mm, unsigned long 
addr, pte_t *ptep)
+   pgste_val(pgste) |= PGSTE_GR_BIT | PGSTE_GC_BIT;
+   ptev = pte_val(*ptep);
+   if (!(ptev & _PAGE_INVALID) && (ptev & _PAGE_WRITE))
+-  page_set_storage_key(ptev & PAGE_MASK, PAGE_DEFAULT_KEY, 1);
++  page_set_storage_key(ptev & PAGE_MASK, PAGE_DEFAULT_KEY, 0);
+   pgste_set_unlock(ptep, pgste);
+   preempt_enable();
+ }
+diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
+index 34c9dbb6a47d6..686a9d75a0e41 100644
+--- a/arch/x86/boot/boot.h
 b/arch/x86/boot/boot.h
+@@ -110,66 +110,78 @@ typedef unsigned int addr_t;
+ 
+ static inline u8 rdfs8(addr_t addr)
+ {
++  u8 *ptr = (u8 *)absolute_pointer(addr);
+   u8 v;
+-  asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr));
++  asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*ptr));
+   return v;
+ }
+ static inline u16 rdfs16(addr_t addr)
+ {
++  u16 *ptr = (u16 *)absolute_pointer(addr);
+   u16 v;
+-  asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
++  asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*ptr));
+   return v;
+ }
+ static inline u32 rdfs32(addr_t addr)
+ {
++  u32 *ptr = (u32 *)absolute_pointer(addr);
+   u32 v;
+-  asm volatile("movl %%fs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
++  asm volatile("movl %%fs:%1,%0" : "=r" (v) : "m" (*ptr));
+   return v;
+ }
+ 
+ static inline void wrfs8(u8 v, addr_t addr)
+ {
+-  asm volatile("movb %1,%%fs:%0" : "+m" (*(u8 *)addr) : "qi" (v));
++  u8 *ptr = (u8 *)absolute_pointer(addr);
++  asm volatile("movb %1,%%fs:%0" : "+m" (*ptr) : "qi" (v));
+ }
+ static inline void wrfs16(u16 v, addr_t addr)
+ {
+-  asm volatile("movw %1,%%fs:%0" : "+m" (*(u16 *)addr) : "ri" (v));
++  u16 *ptr = (u16 *)absolute_pointer(addr);
++  asm volatile("movw %1,%%fs:%0" : "+m" (*ptr) : "ri" (v));
+ }
+ static inline void wrfs32(u32 v, addr_t addr)
+ {
+-  asm volatile("movl %1,%%fs:%0" : "+m" (*(u32 *)addr) : "ri" (v));
++  u32 *ptr = (u32 *)absolute_pointer(addr);
++  asm volatile("movl %1,%%fs:%0" : "+m" (*ptr) : "ri" (v));
+ }
+ 
+ static inline u8 rdgs8(addr_t addr)
+ {
++  u8 *ptr = (u8 *)absolute_pointer(addr);
+   u8 v;
+-  asm volatile("movb %%gs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr));
++  asm volatile("movb %%gs:%1,%0" : "=q" (v) : "m" (*ptr));
+   return v;
+ }
+ static inline u16 

[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-06-16 Thread Mike Pagano
commit: 37fd5a860fa5ee01ce4a8a3c79b9f4e1e91780b6
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Jun 16 12:06:00 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Jun 16 12:06:00 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=37fd5a86

Linux patch 5.18.5

Signed-off-by: Mike Pagano  gentoo.org>

 _README |4 +
 1004_linux-5.18.5.patch | 1113 +++
 2 files changed, 1117 insertions(+)

diff --git a/_README b/_README
index 1dbd2f58..d6cb6557 100644
--- a/_README
+++ b/_README
@@ -59,6 +59,10 @@ Patch:  1003_linux-5.18.4.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.18.4
 
+Patch:  1004_linux-5.18.5.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.18.5
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1004_linux-5.18.5.patch b/1004_linux-5.18.5.patch
new file mode 100644
index ..88623faf
--- /dev/null
+++ b/1004_linux-5.18.5.patch
@@ -0,0 +1,1113 @@
+diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu 
b/Documentation/ABI/testing/sysfs-devices-system-cpu
+index 2ad01cad7f1c8..bcc974d276dc4 100644
+--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
 b/Documentation/ABI/testing/sysfs-devices-system-cpu
+@@ -526,6 +526,7 @@ What:  /sys/devices/system/cpu/vulnerabilities
+   /sys/devices/system/cpu/vulnerabilities/srbds
+   /sys/devices/system/cpu/vulnerabilities/tsx_async_abort
+   /sys/devices/system/cpu/vulnerabilities/itlb_multihit
++  /sys/devices/system/cpu/vulnerabilities/mmio_stale_data
+ Date: January 2018
+ Contact:  Linux kernel mailing list 
+ Description:  Information about CPU vulnerabilities
+diff --git a/Documentation/admin-guide/hw-vuln/index.rst 
b/Documentation/admin-guide/hw-vuln/index.rst
+index 8cbc711cda935..4df436e7c4177 100644
+--- a/Documentation/admin-guide/hw-vuln/index.rst
 b/Documentation/admin-guide/hw-vuln/index.rst
+@@ -17,3 +17,4 @@ are configurable at compile, boot or run time.
+special-register-buffer-data-sampling.rst
+core-scheduling.rst
+l1d_flush.rst
++   processor_mmio_stale_data.rst
+diff --git a/Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst 
b/Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst
+new file mode 100644
+index 0..9393c50b5afc9
+--- /dev/null
 b/Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst
+@@ -0,0 +1,246 @@
++=
++Processor MMIO Stale Data Vulnerabilities
++=
++
++Processor MMIO Stale Data Vulnerabilities are a class of memory-mapped I/O
++(MMIO) vulnerabilities that can expose data. The sequences of operations for
++exposing data range from simple to very complex. Because most of the
++vulnerabilities require the attacker to have access to MMIO, many environments
++are not affected. System environments using virtualization where MMIO access 
is
++provided to untrusted guests may need mitigation. These vulnerabilities are
++not transient execution attacks. However, these vulnerabilities may propagate
++stale data into core fill buffers where the data can subsequently be inferred
++by an unmitigated transient execution attack. Mitigation for these
++vulnerabilities includes a combination of microcode update and software
++changes, depending on the platform and usage model. Some of these mitigations
++are similar to those used to mitigate Microarchitectural Data Sampling (MDS) 
or
++those used to mitigate Special Register Buffer Data Sampling (SRBDS).
++
++Data Propagators
++
++Propagators are operations that result in stale data being copied or moved 
from
++one microarchitectural buffer or register to another. Processor MMIO Stale 
Data
++Vulnerabilities are operations that may result in stale data being directly
++read into an architectural, software-visible state or sampled from a buffer or
++register.
++
++Fill Buffer Stale Data Propagator (FBSDP)
++-
++Stale data may propagate from fill buffers (FB) into the non-coherent portion
++of the uncore on some non-coherent writes. Fill buffer propagation by itself
++does not make stale data architecturally visible. Stale data must be 
propagated
++to a location where it is subject to reading or sampling.
++
++Sideband Stale Data Propagator (SSDP)
++-
++The sideband stale data propagator (SSDP) is limited to the client (including
++Intel Xeon server E3) uncore implementation. The sideband response buffer is
++shared by all client cores. For non-coherent reads that go to sideband
++destinations, the uncore logic returns 64 bytes of data to the core, including
++both requested data and unrequested stale data, 

[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-06-09 Thread Mike Pagano
commit: ea28214f21dc64ec385bdcf962806c9d93a9e7e6
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Jun  9 18:39:55 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Jun  9 18:39:55 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ea28214f

cifs: fix minor compile warning

Bug: https://bugs.gentoo.org/85076

Signed-off-by: Mike Pagano  gentoo.org>

 _README   |  4 
 1950_cifs-fix-minor-compile-warning.patch | 33 +++
 2 files changed, 37 insertions(+)

diff --git a/_README b/_README
index 5acbe17f..01987387 100644
--- a/_README
+++ b/_README
@@ -67,6 +67,10 @@ Patch:  1700_sparc-address-warray-bound-warnings.patch
 From:  https://github.com/KSPP/linux/issues/109
 Desc:  Address -Warray-bounds warnings 
 
+Patch:  1950_cifs-fix-minor-compile-warning.patch
+From:   https://git.kernel.org/
+Desc:   cifs: fix minor compile warning
+
 Patch:  2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch
 From:   
https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw
 Desc:   Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. 
See bug #686758

diff --git a/1950_cifs-fix-minor-compile-warning.patch 
b/1950_cifs-fix-minor-compile-warning.patch
new file mode 100644
index ..65787238
--- /dev/null
+++ b/1950_cifs-fix-minor-compile-warning.patch
@@ -0,0 +1,33 @@
+From 93ed91c020aa4f021600a633f1f87790a5e50b91 Mon Sep 17 00:00:00 2001
+From: Steve French 
+Date: Sun, 22 May 2022 21:25:24 -0500
+Subject: cifs: fix minor compile warning
+
+Add ifdef around nodfs variable from patch:
+  "cifs: don't call cifs_dfs_query_info_nonascii_quirk() if nodfs was set"
+which is unused when CONFIG_DFS_UPCALL is not set.
+
+Signed-off-by: Steve French 
+---
+ fs/cifs/connect.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+(limited to 'fs/cifs/connect.c')
+
+diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
+index 44dc66f21d832..0b08693d1af8f 100644
+--- a/fs/cifs/connect.c
 b/fs/cifs/connect.c
+@@ -3433,7 +3433,9 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
+   struct cifs_tcon *tcon = mnt_ctx->tcon;
+   struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;
+   char *full_path;
++#ifdef CONFIG_CIFS_DFS_UPCALL
+   bool nodfs = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS;
++#endif
+ 
+   if (!server->ops->is_path_accessible)
+   return -EOPNOTSUPP;
+-- 
+cgit 1.2.3-1.el7
+



[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-06-06 Thread Mike Pagano
commit: 71d470c013d9ba1388d32e220ff5cf87fb8eb6cd
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon Jun  6 11:00:51 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon Jun  6 11:00:51 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=71d470c0

Linux patch 5.18.2

Signed-off-by: Mike Pagano  gentoo.org>

 _README |4 +
 1001_linux-5.18.2.patch | 2830 +++
 2 files changed, 2834 insertions(+)

diff --git a/_README b/_README
index 62ab5b31..561c7140 100644
--- a/_README
+++ b/_README
@@ -47,6 +47,10 @@ Patch:  1000_linux-5.18.1.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.18.1
 
+Patch:  1001_linux-5.18.2.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.18.2
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1001_linux-5.18.2.patch b/1001_linux-5.18.2.patch
new file mode 100644
index ..609efb82
--- /dev/null
+++ b/1001_linux-5.18.2.patch
@@ -0,0 +1,2830 @@
+diff --git a/Documentation/process/submitting-patches.rst 
b/Documentation/process/submitting-patches.rst
+index fb496b2ebfd38..92d3432460d75 100644
+--- a/Documentation/process/submitting-patches.rst
 b/Documentation/process/submitting-patches.rst
+@@ -77,7 +77,7 @@ as you intend it to.
+ 
+ The maintainer will thank you if you write your patch description in a
+ form which can be easily pulled into Linux's source code management
+-system, ``git``, as a "commit log".  See :ref:`explicit_in_reply_to`.
++system, ``git``, as a "commit log".  See :ref:`the_canonical_patch_format`.
+ 
+ Solve only one problem per patch.  If your description starts to get
+ long, that's a sign that you probably need to split up your patch.
+diff --git a/Makefile b/Makefile
+index 2bb168acb8f43..6b1d606a92f6f 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 18
+-SUBLEVEL = 1
++SUBLEVEL = 2
+ EXTRAVERSION =
+ NAME = Superb Owl
+ 
+diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi 
b/arch/arm/boot/dts/s5pv210-aries.dtsi
+index c8f1c324a6c26..26f2be2d9faa2 100644
+--- a/arch/arm/boot/dts/s5pv210-aries.dtsi
 b/arch/arm/boot/dts/s5pv210-aries.dtsi
+@@ -895,7 +895,7 @@
+   device-wakeup-gpios = < 4 GPIO_ACTIVE_HIGH>;
+   interrupt-parent = <>;
+   interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
+-  interrupt-names = "host-wake";
++  interrupt-names = "host-wakeup";
+   };
+ };
+ 
+diff --git a/arch/powerpc/kvm/book3s_hv_uvmem.c 
b/arch/powerpc/kvm/book3s_hv_uvmem.c
+index 45c993dd05f5e..36f2314c58e5f 100644
+--- a/arch/powerpc/kvm/book3s_hv_uvmem.c
 b/arch/powerpc/kvm/book3s_hv_uvmem.c
+@@ -361,13 +361,15 @@ static bool kvmppc_gfn_is_uvmem_pfn(unsigned long gfn, 
struct kvm *kvm,
+ static bool kvmppc_next_nontransitioned_gfn(const struct kvm_memory_slot 
*memslot,
+   struct kvm *kvm, unsigned long *gfn)
+ {
+-  struct kvmppc_uvmem_slot *p;
++  struct kvmppc_uvmem_slot *p = NULL, *iter;
+   bool ret = false;
+   unsigned long i;
+ 
+-  list_for_each_entry(p, >arch.uvmem_pfns, list)
+-  if (*gfn >= p->base_pfn && *gfn < p->base_pfn + p->nr_pfns)
++  list_for_each_entry(iter, >arch.uvmem_pfns, list)
++  if (*gfn >= iter->base_pfn && *gfn < iter->base_pfn + 
iter->nr_pfns) {
++  p = iter;
+   break;
++  }
+   if (!p)
+   return ret;
+   /*
+diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
+index f78e2b3501a19..35f222aa66bfc 100644
+--- a/arch/x86/include/asm/uaccess.h
 b/arch/x86/include/asm/uaccess.h
+@@ -382,6 +382,103 @@ do { 
\
+ 
+ #endif // CONFIG_CC_HAS_ASM_GOTO_OUTPUT
+ 
++#ifdef CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT
++#define __try_cmpxchg_user_asm(itype, ltype, _ptr, _pold, _new, label)
({ \
++  bool success;   \
++  __typeof__(_ptr) _old = (__typeof__(_ptr))(_pold);  \
++  __typeof__(*(_ptr)) __old = *_old;  \
++  __typeof__(*(_ptr)) __new = (_new); \
++  asm_volatile_goto("\n"  \
++   "1: " LOCK_PREFIX "cmpxchg"itype" %[new], %[ptr]\n"\
++   _ASM_EXTABLE_UA(1b, %l[label]) \
++   : CC_OUT(z) (success), \
++ [ptr] "+m" (*_ptr),  \
++ [old] "+a" (__old)   \
++   : [new] ltype (__new)  \
++   : "memory"  

[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-05-30 Thread Mike Pagano
commit: 27ddd65ea4863e7523fea2eb73570a4698d2d415
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon May 30 21:42:06 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon May 30 21:42:06 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=27ddd65e

Update BMQ 5.18-r1 patch

Signed-off-by: Mike Pagano  gentoo.org>

 5020_BMQ-and-PDS-io-scheduler-v5.18-r1.patch | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/5020_BMQ-and-PDS-io-scheduler-v5.18-r1.patch 
b/5020_BMQ-and-PDS-io-scheduler-v5.18-r1.patch
index 9b1a8ba1..a130157e 100644
--- a/5020_BMQ-and-PDS-io-scheduler-v5.18-r1.patch
+++ b/5020_BMQ-and-PDS-io-scheduler-v5.18-r1.patch
@@ -632,10 +632,10 @@ index 976092b7bd45..31d587c16ec1 100644
  obj-y += build_utility.o
 diff --git a/kernel/sched/alt_core.c b/kernel/sched/alt_core.c
 new file mode 100644
-index ..a466a05301b8
+index ..189332cd6f99
 --- /dev/null
 +++ b/kernel/sched/alt_core.c
-@@ -0,0 +1,7765 @@
+@@ -0,0 +1,7768 @@
 +/*
 + *  kernel/sched/alt_core.c
 + *
@@ -667,6 +667,7 @@ index ..a466a05301b8
 +#include 
 +#include 
 +#include 
++#include 
 +
 +#include 
 +
@@ -678,6 +679,8 @@ index ..a466a05301b8
 +
 +#include "sched.h"
 +
++#include "pelt.h"
++
 +#include "../../fs/io-wq.h"
 +#include "../smpboot.h"
 +



[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-05-30 Thread Mike Pagano
commit: 4c9bb1563e46363720d3778468b068a8509a2f36
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon May 30 13:57:08 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon May 30 13:57:08 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=4c9bb156

Linux patch 5.18.1

Signed-off-by: Mike Pagano  gentoo.org>

 _README |4 +
 1000_linux-5.18.1.patch | 2933 +++
 2 files changed, 2937 insertions(+)

diff --git a/_README b/_README
index 298c5715..62ab5b31 100644
--- a/_README
+++ b/_README
@@ -43,6 +43,10 @@ EXPERIMENTAL
 Individual Patch Descriptions:
 --
 
+Patch:  1000_linux-5.18.1.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.18.1
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1000_linux-5.18.1.patch b/1000_linux-5.18.1.patch
new file mode 100644
index ..679abefd
--- /dev/null
+++ b/1000_linux-5.18.1.patch
@@ -0,0 +1,2933 @@
+diff --git a/Documentation/admin-guide/sysctl/kernel.rst 
b/Documentation/admin-guide/sysctl/kernel.rst
+index 1144ea3229a37..e9c18dabc5523 100644
+--- a/Documentation/admin-guide/sysctl/kernel.rst
 b/Documentation/admin-guide/sysctl/kernel.rst
+@@ -994,6 +994,9 @@ This is a directory, with the following entries:
+ * ``boot_id``: a UUID generated the first time this is retrieved, and
+   unvarying after that;
+ 
++* ``uuid``: a UUID generated every time this is retrieved (this can
++  thus be used to generate UUIDs at will);
++
+ * ``entropy_avail``: the pool's entropy count, in bits;
+ 
+ * ``poolsize``: the entropy pool size, in bits;
+@@ -1001,10 +1004,7 @@ This is a directory, with the following entries:
+ * ``urandom_min_reseed_secs``: obsolete (used to determine the minimum
+   number of seconds between urandom pool reseeding). This file is
+   writable for compatibility purposes, but writing to it has no effect
+-  on any RNG behavior.
+-
+-* ``uuid``: a UUID generated every time this is retrieved (this can
+-  thus be used to generate UUIDs at will);
++  on any RNG behavior;
+ 
+ * ``write_wakeup_threshold``: when the entropy count drops below this
+   (as a number of bits), processes waiting to write to ``/dev/random``
+diff --git a/Makefile b/Makefile
+index 7d5b0bfe79602..2bb168acb8f43 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 18
+-SUBLEVEL = 0
++SUBLEVEL = 1
+ EXTRAVERSION =
+ NAME = Superb Owl
+ 
+diff --git a/arch/alpha/include/asm/timex.h b/arch/alpha/include/asm/timex.h
+index b565cc6f408e9..f89798da8a147 100644
+--- a/arch/alpha/include/asm/timex.h
 b/arch/alpha/include/asm/timex.h
+@@ -28,5 +28,6 @@ static inline cycles_t get_cycles (void)
+   __asm__ __volatile__ ("rpcc %0" : "=r"(ret));
+   return ret;
+ }
++#define get_cycles get_cycles
+ 
+ #endif
+diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h
+index 7c3b3671d6c25..6d1337c169cd3 100644
+--- a/arch/arm/include/asm/timex.h
 b/arch/arm/include/asm/timex.h
+@@ -11,5 +11,6 @@
+ 
+ typedef unsigned long cycles_t;
+ #define get_cycles()  ({ cycles_t c; read_current_timer() ? 0 : c; })
++#define random_get_entropy() (((unsigned long)get_cycles()) ?: 
random_get_entropy_fallback())
+ 
+ #endif
+diff --git a/arch/ia64/include/asm/timex.h b/arch/ia64/include/asm/timex.h
+index 869a3ac6bf23a..7ccc077a60bed 100644
+--- a/arch/ia64/include/asm/timex.h
 b/arch/ia64/include/asm/timex.h
+@@ -39,6 +39,7 @@ get_cycles (void)
+   ret = ia64_getreg(_IA64_REG_AR_ITC);
+   return ret;
+ }
++#define get_cycles get_cycles
+ 
+ extern void ia64_cpu_local_tick (void);
+ extern unsigned long long ia64_native_sched_clock (void);
+diff --git a/arch/m68k/include/asm/timex.h b/arch/m68k/include/asm/timex.h
+index 6a21d93582805..f4a7a340f4cae 100644
+--- a/arch/m68k/include/asm/timex.h
 b/arch/m68k/include/asm/timex.h
+@@ -35,7 +35,7 @@ static inline unsigned long random_get_entropy(void)
+ {
+   if (mach_random_get_entropy)
+   return mach_random_get_entropy();
+-  return 0;
++  return random_get_entropy_fallback();
+ }
+ #define random_get_entropyrandom_get_entropy
+ 
+diff --git a/arch/mips/include/asm/timex.h b/arch/mips/include/asm/timex.h
+index 8026baf46e729..2e107886f97ac 100644
+--- a/arch/mips/include/asm/timex.h
 b/arch/mips/include/asm/timex.h
+@@ -76,25 +76,24 @@ static inline cycles_t get_cycles(void)
+   else
+   return 0;   /* no usable counter */
+ }
++#define get_cycles get_cycles
+ 
+ /*
+  * Like get_cycles - but where c0_count is not available we desperately
+  * use c0_random in an attempt to get at least a little bit of entropy.
+- *
+- * R6000 and R6000A neither have a count register nor a random register.

[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-05-24 Thread Mike Pagano
commit: 500df47c29eddf6c891238c1454aa01d10f6f2a5
Author: Mike Pagano  gentoo  org>
AuthorDate: Tue May 24 21:01:03 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Tue May 24 21:01:03 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=500df47c

Address -Warray-bounds warnings on sparc

See: https://github.com/KSPP/linux/issues/109
Bug: https://bugs.gentoo.org/847124

Signed-off-by: Mike Pagano  gentoo.org>

 _README|  4 
 1700_sparc-address-warray-bound-warnings.patch | 17 +
 2 files changed, 21 insertions(+)

diff --git a/_README b/_README
index f8cc57f0..298c5715 100644
--- a/_README
+++ b/_README
@@ -51,6 +51,10 @@ Patch:  
1510_fs-enable-link-security-restrictions-by-default.patch
 From:   
http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/
 Desc:   Enable link security restrictions by default.
 
+Patch:  1700_sparc-address-warray-bound-warnings.patch
+From:  https://github.com/KSPP/linux/issues/109
+Desc:  Address -Warray-bounds warnings 
+
 Patch:  2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch
 From:   
https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw
 Desc:   Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. 
See bug #686758

diff --git a/1700_sparc-address-warray-bound-warnings.patch 
b/1700_sparc-address-warray-bound-warnings.patch
new file mode 100644
index ..f9393555
--- /dev/null
+++ b/1700_sparc-address-warray-bound-warnings.patch
@@ -0,0 +1,17 @@
+--- a/arch/sparc/mm/init_64.c  2022-05-24 16:48:40.749677491 -0400
 b/arch/sparc/mm/init_64.c  2022-05-24 16:55:15.511356945 -0400
+@@ -3052,11 +3052,11 @@ static inline resource_size_t compute_ke
+ static void __init kernel_lds_init(void)
+ {
+   code_resource.start = compute_kern_paddr(_text);
+-  code_resource.end   = compute_kern_paddr(_etext - 1);
++  code_resource.end   = compute_kern_paddr(_etext) - 1;
+   data_resource.start = compute_kern_paddr(_etext);
+-  data_resource.end   = compute_kern_paddr(_edata - 1);
++  data_resource.end   = compute_kern_paddr(_edata) - 1;
+   bss_resource.start  = compute_kern_paddr(__bss_start);
+-  bss_resource.end= compute_kern_paddr(_end - 1);
++  bss_resource.end= compute_kern_paddr(_end) - 1;
+ }
+ 
+ static int __init report_memory(void)



[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-05-11 Thread Mike Pagano
commit: ff2113050f76160860097c55d73a4e0f73b4aafe
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed May 11 17:25:52 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed May 11 17:39:49 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ff211305

Update Gentoo Hardened patchset based on KSPP thanks to Peter Bo
Bug: https://bugs.gentoo.org/841488

Added:
CONFIG_HARDENED_USERCOPY=y
CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT=y
CONFIG_KFENCE=y
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
CONFIG_SCHED_CORE=y
CONFIG_ZERO_CALL_USED_REGS=y

Signed-off-by: Mike Pagano  gentoo.org>

 4567_distro-Gentoo-Kconfig.patch | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch
index ab78353b..1efc0fba 100644
--- a/4567_distro-Gentoo-Kconfig.patch
+++ b/4567_distro-Gentoo-Kconfig.patch
@@ -1,14 +1,14 @@
 a/Kconfig  2022-04-12 13:11:48.403113171 -0400
-+++ b/Kconfig  2022-04-12 13:12:36.530084675 -0400
+--- a/Kconfig  2022-05-11 13:20:07.110347567 -0400
 b/Kconfig  2022-05-11 13:21:12.127174393 -0400
 @@ -30,3 +30,5 @@ source "lib/Kconfig"
  source "lib/Kconfig.debug"
  
  source "Documentation/Kconfig"
 +
 +source "distro/Kconfig"
 /dev/null  2022-04-12 05:39:54.696333295 -0400
-+++ b/distro/Kconfig   2022-04-12 13:21:04.666379519 -0400
-@@ -0,0 +1,285 @@
+--- /dev/null  2022-05-10 13:47:17.750578524 -0400
 b/distro/Kconfig   2022-05-11 13:21:20.540529032 -0400
+@@ -0,0 +1,290 @@
 +menu "Gentoo Linux"
 +
 +config GENTOO_LINUX
@@ -185,7 +185,7 @@
 +config GENTOO_KERNEL_SELF_PROTECTION_COMMON
 +  bool "Enable Kernel Self Protection Project Recommendations"
 +
-+  depends on GENTOO_LINUX && !ACPI_CUSTOM_METHOD && !COMPAT_BRK && 
!DEVKMEM && !PROC_KCORE && !COMPAT_VDSO && !KEXEC && !HIBERNATION && 
!LEGACY_PTYS && !X86_X32 && !MODIFY_LDT_SYSCALL && GCC_PLUGINS
++  depends on GENTOO_LINUX && !ACPI_CUSTOM_METHOD && !COMPAT_BRK && 
!PROC_KCORE && !COMPAT_VDSO && !KEXEC && !HIBERNATION && !LEGACY_PTYS && 
!X86_X32 && !MODIFY_LDT_SYSCALL && GCC_PLUGINS && !IOMMU_DEFAULT_DMA_LAZY && 
!IOMMU_DEFAULT_PASSTHROUGH && IOMMU_DEFAULT_DMA_STRICT
 +
 +  select BUG
 +  select STRICT_KERNEL_RWX
@@ -199,6 +199,10 @@
 +  select DEBUG_NOTIFIERS
 +  select DEBUG_LIST
 +  select DEBUG_SG
++  select HARDENED_USERCOPY if HAVE_HARDENED_USERCOPY_ALLOCATOR=y
++  select KFENCE if HAVE_ARCH_KFENCE && (!SLAB || SLUB)
++  select RANDOMIZE_KSTACK_OFFSET_DEFAULT if 
HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET && (INIT_STACK_NONE || !CC_IS_CLANG || 
CLANG_VERSION>=14)
++  select SCHED_CORE if SCHED_SMT
 +  select BUG_ON_DATA_CORRUPTION
 +  select SCHED_STACK_END_CHECK
 +  select SECCOMP if HAVE_ARCH_SECCOMP
@@ -222,6 +226,7 @@
 +  select GCC_PLUGIN_STRUCTLEAK_BYREF_ALL
 +  select GCC_PLUGIN_RANDSTRUCT
 +  select GCC_PLUGIN_RANDSTRUCT_PERFORMANCE
++  select ZERO_CALL_USED_REGS if CC_HAS_ZERO_CALL_USED_REGS
 +
 +  help
 +  Search for GENTOO_KERNEL_SELF_PROTECTION_{X86_64, ARM64, 
X86_32, ARM} for dependency 



[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-04-25 Thread Mike Pagano
commit: f7636d029fe7df83bfd3cb541207ca86ce72aa0d
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon Apr 25 16:22:56 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon Apr 25 16:22:56 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=f7636d02

Add genpatches

Bluetooth: Check key sizes only when Secure Simple Pairing is
enabled. See bug #686758
tmp513 requies REGMAP_I2C to build.  Select it by default in Kconfig.
See bug #710790. Thanks to Phil Stracchino
sign-file: full functionality with modern LibreSSL
Add Gentoo Linux support config settings and defaults.
Kernel Self Protection patch
CPU Optimization patch
Print firmware info (Reqs CONFIG_GENTOO_PRINT_FIRMWARE_INFO
Patch to enable link security restrictions by default.
Patch to support for namespace user.pax.* on tmpfs.

Signed-off-by: Mike Pagano  gentoo.org>

 _README|  28 +
 1500_XATTR_USER_PREFIX.patch   |  67 ++
 ...ble-link-security-restrictions-by-default.patch |  17 +
 ...zes-only-if-Secure-Simple-Pairing-enabled.patch |  37 ++
 ...3-Fix-build-issue-by-selecting-CONFIG_REG.patch |  30 +
 2920_sign-file-patch-for-libressl.patch|  16 +
 3000_Support-printing-firmware-info.patch  |  14 +
 5010_enable-cpu-optimizations-universal.patch  | 675 +
 8 files changed, 884 insertions(+)

diff --git a/_README b/_README
index 90189932..efde5c7d 100644
--- a/_README
+++ b/_README
@@ -43,6 +43,34 @@ EXPERIMENTAL
 Individual Patch Descriptions:
 --
 
+Patch:  1500_XATTR_USER_PREFIX.patch
+From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
+Desc:   Support for namespace user.pax.* on tmpfs.
+
+Patch:  1510_fs-enable-link-security-restrictions-by-default.patch
+From:   
http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/
+Desc:   Enable link security restrictions by default.
+
+Patch:  2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch
+From:   
https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw
+Desc:   Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. 
See bug #686758
+
+Patch:  2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch
+From:   https://bugs.gentoo.org/710790
+Desc:   tmp513 requies REGMAP_I2C to build.  Select it by default in Kconfig. 
See bug #710790. Thanks to Phil Stracchino
+
+Patch:  2920_sign-file-patch-for-libressl.patch
+From:   https://bugs.gentoo.org/717166
+Desc:   sign-file: full functionality with modern LibreSSL
+
+Patch:  3000_Support-printing-firmware-info.patch
+From:   https://bugs.gentoo.org/732852
+Desc:   Print firmware info (Reqs CONFIG_GENTOO_PRINT_FIRMWARE_INFO). Thanks 
to Georgy Yakovlev
+
 Patch:  4567_distro-Gentoo-Kconfig.patch
 From:   Tom Wijsman 
 Desc:   Add Gentoo Linux support config settings and defaults.
+
+Patch:  5010_enable-cpu-optimizations-universal.patch
+From:   https://github.com/graysky2/kernel_compiler_patch
+Desc:   Kernel >= 5.15 patch enables gcc = v11.1+ optimizations for additional 
CPUs.

diff --git a/1500_XATTR_USER_PREFIX.patch b/1500_XATTR_USER_PREFIX.patch
new file mode 100644
index ..245dcc29
--- /dev/null
+++ b/1500_XATTR_USER_PREFIX.patch
@@ -0,0 +1,67 @@
+From: Anthony G. Basile 
+
+This patch adds support for a restricted user-controlled namespace on
+tmpfs filesystem used to house PaX flags.  The namespace must be of the
+form user.pax.* and its value cannot exceed a size of 8 bytes.
+
+This is needed even on all Gentoo systems so that XATTR_PAX flags
+are preserved for users who might build packages using portage on
+a tmpfs system with a non-hardened kernel and then switch to a
+hardened kernel with XATTR_PAX enabled.
+
+The namespace is added to any user with Extended Attribute support
+enabled for tmpfs.  Users who do not enable xattrs will not have
+the XATTR_PAX flags preserved.
+
+diff --git a/include/uapi/linux/xattr.h b/include/uapi/linux/xattr.h
+index 1590c49..5eab462 100644
+--- a/include/uapi/linux/xattr.h
 b/include/uapi/linux/xattr.h
+@@ -73,5 +73,9 @@
+ #define XATTR_POSIX_ACL_DEFAULT  "posix_acl_default"
+ #define XATTR_NAME_POSIX_ACL_DEFAULT XATTR_SYSTEM_PREFIX 
XATTR_POSIX_ACL_DEFAULT
+ 
++/* User namespace */
++#define XATTR_PAX_PREFIX XATTR_USER_PREFIX "pax."
++#define XATTR_PAX_FLAGS_SUFFIX "flags"
++#define XATTR_NAME_PAX_FLAGS XATTR_PAX_PREFIX XATTR_PAX_FLAGS_SUFFIX
+ 
+ #endif /* _UAPI_LINUX_XATTR_H */
+--- a/mm/shmem.c   2020-05-04 15:30:27.042035334 -0400
 b/mm/shmem.c   2020-05-04 15:34:57.013881725 -0400
+@@ -3238,6 +3238,14 @@ static int shmem_xattr_handler_set(const
+   struct shmem_inode_info *info = SHMEM_I(inode);
+ 
+   name = xattr_full_name(handler, name);
++
++  if (!strncmp(name, XATTR_USER_PREFIX, 

[gentoo-commits] proj/linux-patches:5.18 commit in: /

2022-04-25 Thread Mike Pagano
commit: f026af57d0531cd6bb957384b6c52816a0a34ed6
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon Apr 25 16:14:27 2022 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon Apr 25 16:15:36 2022 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=f026af57

Update distro patch in security Kconfig for 5.18

Signed-off-by: Mike Pagano  gentoo.org>

 4567_distro-Gentoo-Kconfig.patch | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch
index 9843c3e2..ab78353b 100644
--- a/4567_distro-Gentoo-Kconfig.patch
+++ b/4567_distro-Gentoo-Kconfig.patch
@@ -294,12 +294,12 @@
 +  See the settings that become available for more details and 
fine-tuning.
 +
 +endmenu
 a/security/Kconfig 2021-12-05 18:20:55.655677710 -0500
-+++ b/security/Kconfig 2021-12-05 18:23:42.404251618 -0500
+--- a/security/Kconfig 2022-04-25 11:20:45.487213970 -0400
 b/security/Kconfig 2022-04-25 11:22:02.514143999 -0400
 @@ -167,6 +167,7 @@ config HARDENED_USERCOPY_PAGESPAN
bool "Refuse to copy allocations that span multiple pages"
depends on HARDENED_USERCOPY
-   depends on EXPERT
+   depends on BROKEN
 +  depends on !GENTOO_KERNEL_SELF_PROTECTION
help
  When a multi-page allocation is done without __GFP_COMP,