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

2020-12-21 Thread Mike Pagano
commit: 9d3024b1cf32812499fabc43b8ceec9af0c6c6fc
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon Dec 21 13:27:42 2020 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon Dec 21 13:27:42 2020 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=9d3024b1

Linuxpatch 5.9.16

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

 _README |4 +
 1015_linux-5.9.16.patch | 1758 +++
 2 files changed, 1762 insertions(+)

diff --git a/_README b/_README
index 48f07c7..10b185a 100644
--- a/_README
+++ b/_README
@@ -103,6 +103,10 @@ Patch:  1014_linux-5.9.15.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.9.15
 
+Patch:  1015_linux-5.9.16.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.9.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.9.16.patch b/1015_linux-5.9.16.patch
new file mode 100644
index 000..d5e7b83
--- /dev/null
+++ b/1015_linux-5.9.16.patch
@@ -0,0 +1,1758 @@
+diff --git a/Documentation/admin-guide/kernel-parameters.txt 
b/Documentation/admin-guide/kernel-parameters.txt
+index 12ff6ac674574..8058551e60393 100644
+--- a/Documentation/admin-guide/kernel-parameters.txt
 b/Documentation/admin-guide/kernel-parameters.txt
+@@ -5521,6 +5521,7 @@
+   device);
+   j = NO_REPORT_LUNS (don't use report luns
+   command, uas only);
++  k = NO_SAME (do not use WRITE_SAME, uas only)
+   l = NOT_LOCKABLE (don't try to lock and
+   unlock ejectable media, not on uas);
+   m = MAX_SECTORS_64 (don't transfer more
+diff --git a/Documentation/virt/kvm/mmu.rst b/Documentation/virt/kvm/mmu.rst
+index 1c030dbac7c4f..5bfe28b0728e8 100644
+--- a/Documentation/virt/kvm/mmu.rst
 b/Documentation/virt/kvm/mmu.rst
+@@ -455,7 +455,7 @@ If the generation number of the spte does not equal the 
global generation
+ number, it will ignore the cached MMIO information and handle the page
+ fault through the slow path.
+ 
+-Since only 19 bits are used to store generation-number on mmio spte, all
++Since only 18 bits are used to store generation-number on mmio spte, all
+ pages are zapped when there is an overflow.
+ 
+ Unfortunately, a single memory access might access kvm_memslots(kvm) multiple
+diff --git a/Makefile b/Makefile
+index 399cda4e42ae1..a3071f75bcc8a 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 9
+-SUBLEVEL = 15
++SUBLEVEL = 16
+ EXTRAVERSION =
+ NAME = Kleptomaniac Octopus
+ 
+diff --git a/arch/x86/kernel/cpu/resctrl/internal.h 
b/arch/x86/kernel/cpu/resctrl/internal.h
+index 5ffa32256b3b2..72bb210684667 100644
+--- a/arch/x86/kernel/cpu/resctrl/internal.h
 b/arch/x86/kernel/cpu/resctrl/internal.h
+@@ -283,7 +283,6 @@ struct rftype {
+  * struct mbm_state - status for each MBM counter in each domain
+  * @chunks:   Total data moved (multiply by rdt_group.mon_scale to get bytes)
+  * @prev_msr  Value of IA32_QM_CTR for this RMID last time we read it
+- * @chunks_bw Total local data moved. Used for bandwidth calculation
+  * @prev_bw_msr:Value of previous IA32_QM_CTR for bandwidth counting
+  * @prev_bw   The most recent bandwidth in MBps
+  * @delta_bw  Difference between the current and previous bandwidth
+@@ -292,7 +291,6 @@ struct rftype {
+ struct mbm_state {
+   u64 chunks;
+   u64 prev_msr;
+-  u64 chunks_bw;
+   u64 prev_bw_msr;
+   u32 prev_bw;
+   u32 delta_bw;
+diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c 
b/arch/x86/kernel/cpu/resctrl/monitor.c
+index 837d7d012b7b1..ddd91344682c7 100644
+--- a/arch/x86/kernel/cpu/resctrl/monitor.c
 b/arch/x86/kernel/cpu/resctrl/monitor.c
+@@ -279,8 +279,6 @@ static void mbm_bw_count(u32 rmid, struct rmid_read *rr)
+   return;
+ 
+   chunks = mbm_overflow_count(m->prev_bw_msr, tval, rr->r->mbm_width);
+-  m->chunks_bw += chunks;
+-  m->chunks = m->chunks_bw;
+   cur_bw = (chunks * r->mon_scale) >> 20;
+ 
+   if (m->delta_comp)
+@@ -451,15 +449,14 @@ static void mbm_update(struct rdt_resource *r, struct 
rdt_domain *d, int rmid)
+   }
+   if (is_mbm_local_enabled()) {
+   rr.evtid = QOS_L3_MBM_LOCAL_EVENT_ID;
++  __mon_event_count(rmid, );
+ 
+   /*
+* Call the MBA software controller only for the
+* control groups and when user has enabled
+* the software controller explicitly.
+*/
+-  if (!is_mba_sc(NULL))
+-  __mon_event_count(rmid, );
+-  else
++  if (is_mba_sc(NULL))
+ 

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

2020-12-13 Thread Mike Pagano
commit: aa954dee464f3d5a77e694c3a34da5ffba988eea
Author: Mike Pagano  gentoo  org>
AuthorDate: Sun Dec 13 16:10:02 2020 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sun Dec 13 16:10:02 2020 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=aa954dee

Removed redundant patch. Thanks to leandrolnh for reporting

Removed: 2910_TVP5150-Fix-build-issue-by-selecting-REGMAP-I2C.patch
Closes: https://bugs.gentoo.org/759646

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

 _README|  4 
 2910_TVP5150-Fix-build-issue-by-selecting-REGMAP-I2C.patch | 10 --
 2 files changed, 14 deletions(-)

diff --git a/_README b/_README
index 5b987e7..8c119c3 100644
--- a/_README
+++ b/_README
@@ -115,10 +115,6 @@ 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:  2910_TVP5150-Fix-build-issue-by-selecting-REGMAP-I2C.patch
-From:   https://bugs.gentoo.org/721096
-Desc:   VIDEO_TVP5150 requies REGMAP_I2C to build.  Select it by default in 
Kconfig. See bug #721096. Thanks to Max Steel
-
 Patch:  2920_sign-file-patch-for-libressl.patch
 From:   https://bugs.gentoo.org/717166
 Desc:   sign-file: full functionality with modern LibreSSL

diff --git a/2910_TVP5150-Fix-build-issue-by-selecting-REGMAP-I2C.patch 
b/2910_TVP5150-Fix-build-issue-by-selecting-REGMAP-I2C.patch
deleted file mode 100644
index 1bc058e..000
--- a/2910_TVP5150-Fix-build-issue-by-selecting-REGMAP-I2C.patch
+++ /dev/null
@@ -1,10 +0,0 @@
 a/drivers/media/i2c/Kconfig2020-05-13 12:38:05.102903309 -0400
-+++ b/drivers/media/i2c/Kconfig2020-05-13 12:38:51.283171977 -0400
-@@ -378,6 +378,7 @@ config VIDEO_TVP514X
- config VIDEO_TVP5150
-   tristate "Texas Instruments TVP5150 video decoder"
-   depends on VIDEO_V4L2 && I2C
-+  select REGMAP_I2C
-   select V4L2_FWNODE
-   help
- Support for the Texas Instruments TVP5150 video decoder.



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

2020-12-11 Thread Mike Pagano
commit: 7b33a5b7a87e4fd66f72aacba1b917c7cb5c2a34
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Dec 11 12:57:23 2020 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Dec 11 12:57:23 2020 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=7b33a5b7

Linux patch 5.9.14

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

 _README |4 +
 1013_linux-5.9.14.patch | 2624 +++
 2 files changed, 2628 insertions(+)

diff --git a/_README b/_README
index 9f59546..5b987e7 100644
--- a/_README
+++ b/_README
@@ -95,6 +95,10 @@ Patch:  1012_linux-5.9.13.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.9.13
 
+Patch:  1013_linux-5.9.14.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.9.14
+
 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/1013_linux-5.9.14.patch b/1013_linux-5.9.14.patch
new file mode 100644
index 000..def6d58
--- /dev/null
+++ b/1013_linux-5.9.14.patch
@@ -0,0 +1,2624 @@
+diff --git a/Makefile b/Makefile
+index b98b54758b203..0983973bcf082 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 9
+-SUBLEVEL = 13
++SUBLEVEL = 14
+ EXTRAVERSION =
+ NAME = Kleptomaniac Octopus
+ 
+diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc/kvm/book3s_xive.c
+index 85215e79db42c..a0ebc29f30b27 100644
+--- a/arch/powerpc/kvm/book3s_xive.c
 b/arch/powerpc/kvm/book3s_xive.c
+@@ -1214,12 +1214,9 @@ void kvmppc_xive_cleanup_vcpu(struct kvm_vcpu *vcpu)
+ static bool kvmppc_xive_vcpu_id_valid(struct kvmppc_xive *xive, u32 cpu)
+ {
+   /* We have a block of xive->nr_servers VPs. We just need to check
+-   * raw vCPU ids are below the expected limit for this guest's
+-   * core stride ; kvmppc_pack_vcpu_id() will pack them down to an
+-   * index that can be safely used to compute a VP id that belongs
+-   * to the VP block.
++   * packed vCPU ids are below that.
+*/
+-  return cpu < xive->nr_servers * xive->kvm->arch.emul_smt_mode;
++  return kvmppc_pack_vcpu_id(xive->kvm, cpu) < xive->nr_servers;
+ }
+ 
+ int kvmppc_xive_compute_vp_id(struct kvmppc_xive *xive, u32 cpu, u32 *vp)
+diff --git a/arch/powerpc/platforms/powernv/setup.c 
b/arch/powerpc/platforms/powernv/setup.c
+index 0b4f72e002c2e..47eb218a4ae0b 100644
+--- a/arch/powerpc/platforms/powernv/setup.c
 b/arch/powerpc/platforms/powernv/setup.c
+@@ -186,11 +186,16 @@ static void __init pnv_init(void)
+   add_preferred_console("hvc", 0, NULL);
+ 
+   if (!radix_enabled()) {
++  size_t size = sizeof(struct slb_entry) * mmu_slb_size;
+   int i;
+ 
+   /* Allocate per cpu area to save old slb contents during MCE */
+-  for_each_possible_cpu(i)
+-  paca_ptrs[i]->mce_faulty_slbs = 
memblock_alloc_node(mmu_slb_size, __alignof__(*paca_ptrs[i]->mce_faulty_slbs), 
cpu_to_node(i));
++  for_each_possible_cpu(i) {
++  paca_ptrs[i]->mce_faulty_slbs =
++  memblock_alloc_node(size,
++  __alignof__(struct slb_entry),
++  cpu_to_node(i));
++  }
+   }
+ }
+ 
+diff --git a/arch/powerpc/platforms/pseries/msi.c 
b/arch/powerpc/platforms/pseries/msi.c
+index 133f6adcb39cb..b3ac2455faadc 100644
+--- a/arch/powerpc/platforms/pseries/msi.c
 b/arch/powerpc/platforms/pseries/msi.c
+@@ -458,7 +458,8 @@ again:
+   return hwirq;
+   }
+ 
+-  virq = irq_create_mapping(NULL, hwirq);
++  virq = irq_create_mapping_affinity(NULL, hwirq,
++ entry->affinity);
+ 
+   if (!virq) {
+   pr_debug("rtas_msi: Failed mapping hwirq %d\n", hwirq);
+diff --git a/arch/s390/pci/pci_irq.c b/arch/s390/pci/pci_irq.c
+index 743f257cf2cbd..75217fb63d7b3 100644
+--- a/arch/s390/pci/pci_irq.c
 b/arch/s390/pci/pci_irq.c
+@@ -103,9 +103,10 @@ static int zpci_set_irq_affinity(struct irq_data *data, 
const struct cpumask *de
+ {
+   struct msi_desc *entry = irq_get_msi_desc(data->irq);
+   struct msi_msg msg = entry->msg;
++  int cpu_addr = smp_cpu_get_cpu_address(cpumask_first(dest));
+ 
+   msg.address_lo &= 0xffff;
+-  msg.address_lo |= (cpumask_first(dest) << 8);
++  msg.address_lo |= (cpu_addr << 8);
+   pci_write_msi_msg(data->irq, );
+ 
+   return IRQ_SET_MASK_OK;
+@@ -238,6 +239,7 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, 
int type)
+   unsigned long bit;
+   struct msi_desc *msi;
+   struct msi_msg msg;
++  int cpu_addr;
+   int rc, irq;
+ 
+   zdev->aisb = -1UL;
+@@ -287,9 +289,15 @@ int 

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

2020-12-08 Thread Mike Pagano
commit: b95093691e9aa7e1e3bd3dbd27b2bd2cb875542c
Author: Mike Pagano  gentoo  org>
AuthorDate: Tue Dec  8 12:08:10 2020 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Tue Dec  8 12:08:10 2020 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=b9509369

Linux patch 5.9.13

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

 _README |4 +
 1012_linux-5.9.13.patch | 1245 +++
 2 files changed, 1249 insertions(+)

diff --git a/_README b/_README
index 22fb04b..9f59546 100644
--- a/_README
+++ b/_README
@@ -91,6 +91,10 @@ Patch:  1011_linux-5.9.12.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.9.12
 
+Patch:  1012_linux-5.9.13.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.9.13
+
 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/1012_linux-5.9.13.patch b/1012_linux-5.9.13.patch
new file mode 100644
index 000..bc10343
--- /dev/null
+++ b/1012_linux-5.9.13.patch
@@ -0,0 +1,1245 @@
+diff --git a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt 
b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt
+index 3613c2c8f75d7..0968b40aef1e8 100644
+--- a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt
 b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt
+@@ -33,7 +33,7 @@ tcan4x5x: tcan4x5x@0 {
+   spi-max-frequency = <1000>;
+   bosch,mram-cfg = <0x0 0 0 32 0 0 1 1>;
+   interrupt-parent = <>;
+-  interrupts = <14 GPIO_ACTIVE_LOW>;
++  interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
+   device-state-gpios = < 21 GPIO_ACTIVE_HIGH>;
+   device-wake-gpios = < 15 GPIO_ACTIVE_HIGH>;
+   reset-gpios = < 27 GPIO_ACTIVE_HIGH>;
+diff --git a/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt 
b/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt
+index cfaf889989187..9e4dc510a40aa 100644
+--- a/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt
 b/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt
+@@ -25,7 +25,7 @@ Example (for ARM-based BeagleBone with NPC100 NFC controller 
on I2C2):
+   clock-frequency = <10>;
+ 
+   interrupt-parent = <>;
+-  interrupts = <29 GPIO_ACTIVE_HIGH>;
++  interrupts = <29 IRQ_TYPE_LEVEL_HIGH>;
+ 
+   enable-gpios = < 30 GPIO_ACTIVE_HIGH>;
+   firmware-gpios = < 31 GPIO_ACTIVE_HIGH>;
+diff --git a/Documentation/devicetree/bindings/net/nfc/pn544.txt 
b/Documentation/devicetree/bindings/net/nfc/pn544.txt
+index 92f399ec22b87..2bd82562ce8e9 100644
+--- a/Documentation/devicetree/bindings/net/nfc/pn544.txt
 b/Documentation/devicetree/bindings/net/nfc/pn544.txt
+@@ -25,7 +25,7 @@ Example (for ARM-based BeagleBone with PN544 on I2C2):
+   clock-frequency = <40>;
+ 
+   interrupt-parent = <>;
+-  interrupts = <17 GPIO_ACTIVE_HIGH>;
++  interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
+ 
+   enable-gpios = < 21 GPIO_ACTIVE_HIGH>;
+   firmware-gpios = < 19 GPIO_ACTIVE_HIGH>;
+diff --git a/Makefile b/Makefile
+index 1dd088b0ac993..b98b54758b203 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 9
+-SUBLEVEL = 12
++SUBLEVEL = 13
+ EXTRAVERSION =
+ NAME = Kleptomaniac Octopus
+ 
+diff --git a/drivers/crypto/chelsio/chtls/chtls_cm.c 
b/drivers/crypto/chelsio/chtls/chtls_cm.c
+index 96d5616534963..50e3a70e5a290 100644
+--- a/drivers/crypto/chelsio/chtls/chtls_cm.c
 b/drivers/crypto/chelsio/chtls/chtls_cm.c
+@@ -1206,6 +1206,7 @@ static struct sock *chtls_recv_sock(struct sock *lsk,
+   sk_setup_caps(newsk, dst);
+   ctx = tls_get_ctx(lsk);
+   newsk->sk_destruct = ctx->sk_destruct;
++  newsk->sk_prot_creator = lsk->sk_prot_creator;
+   csk->sk = newsk;
+   csk->passive_reap_next = oreq;
+   csk->tx_chan = cxgb4_port_chan(ndev);
+diff --git a/drivers/crypto/chelsio/chtls/chtls_hw.c 
b/drivers/crypto/chelsio/chtls/chtls_hw.c
+index 62c829023da56..a4fb463af22ac 100644
+--- a/drivers/crypto/chelsio/chtls/chtls_hw.c
 b/drivers/crypto/chelsio/chtls/chtls_hw.c
+@@ -391,6 +391,7 @@ int chtls_setkey(struct chtls_sock *csk, u32 keylen,
+   csk->wr_unacked += DIV_ROUND_UP(len, 16);
+   enqueue_wr(csk, skb);
+   cxgb4_ofld_send(csk->egress_dev, skb);
++  skb = NULL;
+ 
+   chtls_set_scmd(csk);
+   /* Clear quiesce for Rx key */
+diff --git a/drivers/gpu/drm/i915/gt/intel_mocs.c 
b/drivers/gpu/drm/i915/gt/intel_mocs.c
+index b8f56e62158e2..313e51e7d4f76 100644
+--- a/drivers/gpu/drm/i915/gt/intel_mocs.c
 b/drivers/gpu/drm/i915/gt/intel_mocs.c
+@@ -243,8 +243,9 @@ static const struct drm_i915_mocs_entry tgl_mocs_table[] = 
{
+* only, __init_mocs_table() take care to program unused 

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

2020-11-22 Thread Mike Pagano
commit: a81af19cbbdc01e504a2ad1008be32c8bb81d4e9
Author: Mike Pagano  gentoo  org>
AuthorDate: Sun Nov 22 19:35:34 2020 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sun Nov 22 19:35:34 2020 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=a81af19c

Linux patch 5.9.10

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

 _README |4 +
 1009_linux-5.9.10.patch | 1387 +++
 2 files changed, 1391 insertions(+)

diff --git a/_README b/_README
index af29172..96d7906 100644
--- a/_README
+++ b/_README
@@ -79,6 +79,10 @@ Patch:  1008_linux-5.9.9.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.9.9
 
+Patch:  1009_linux-5.9.10.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.9.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.9.10.patch b/1009_linux-5.9.10.patch
new file mode 100644
index 000..df6b113
--- /dev/null
+++ b/1009_linux-5.9.10.patch
@@ -0,0 +1,1387 @@
+diff --git a/Documentation/admin-guide/kernel-parameters.txt 
b/Documentation/admin-guide/kernel-parameters.txt
+index dca917ac21d93..12ff6ac674574 100644
+--- a/Documentation/admin-guide/kernel-parameters.txt
 b/Documentation/admin-guide/kernel-parameters.txt
+@@ -2833,6 +2833,8 @@
+  mds=off [X86]
+  tsx_async_abort=off [X86]
+  kvm.nx_huge_pages=off [X86]
++ no_entry_flush [PPC]
++ no_uaccess_flush [PPC]
+ 
+   Exceptions:
+  This does not have any effect on
+@@ -3157,6 +3159,8 @@
+ 
+   noefi   Disable EFI runtime services support.
+ 
++  no_entry_flush  [PPC] Don't flush the L1-D cache when entering the 
kernel.
++
+   noexec  [IA-64]
+ 
+   noexec  [X86]
+@@ -3206,6 +3210,9 @@
+   nospec_store_bypass_disable
+   [HW] Disable all mitigations for the Speculative Store 
Bypass vulnerability
+ 
++  no_uaccess_flush
++  [PPC] Don't flush the L1-D cache after accessing user 
data.
++
+   noxsave [BUGS=X86] Disables x86 extended register state save
+   and restore using xsave. The kernel will fallback to
+   enabling legacy floating-point and sse state.
+diff --git a/Makefile b/Makefile
+index 59728422b9dbb..b9f3c6970d24d 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 9
+-SUBLEVEL = 9
++SUBLEVEL = 10
+ EXTRAVERSION =
+ NAME = Kleptomaniac Octopus
+ 
+diff --git a/arch/powerpc/include/asm/book3s/64/kup-radix.h 
b/arch/powerpc/include/asm/book3s/64/kup-radix.h
+index 3ee1ec60be844..28716e2f13e31 100644
+--- a/arch/powerpc/include/asm/book3s/64/kup-radix.h
 b/arch/powerpc/include/asm/book3s/64/kup-radix.h
+@@ -27,6 +27,7 @@
+ #endif
+ .endm
+ 
++#ifdef CONFIG_PPC_KUAP
+ .macro kuap_check_amr gpr1, gpr2
+ #ifdef CONFIG_PPC_KUAP_DEBUG
+   BEGIN_MMU_FTR_SECTION_NESTED(67)
+@@ -38,6 +39,7 @@
+   END_MMU_FTR_SECTION_NESTED_IFSET(MMU_FTR_RADIX_KUAP, 67)
+ #endif
+ .endm
++#endif
+ 
+ .macro kuap_save_amr_and_lock gpr1, gpr2, use_cr, msr_pr_cr
+ #ifdef CONFIG_PPC_KUAP
+@@ -61,6 +63,8 @@
+ 
+ #else /* !__ASSEMBLY__ */
+ 
++DECLARE_STATIC_KEY_FALSE(uaccess_flush_key);
++
+ #ifdef CONFIG_PPC_KUAP
+ 
+ #include 
+@@ -103,8 +107,16 @@ static inline void kuap_check_amr(void)
+ 
+ static inline unsigned long get_kuap(void)
+ {
++  /*
++   * We return AMR_KUAP_BLOCKED when we don't support KUAP because
++   * prevent_user_access_return needs to return AMR_KUAP_BLOCKED to
++   * cause restore_user_access to do a flush.
++   *
++   * This has no effect in terms of actually blocking things on hash,
++   * so it doesn't break anything.
++   */
+   if (!early_mmu_has_feature(MMU_FTR_RADIX_KUAP))
+-  return 0;
++  return AMR_KUAP_BLOCKED;
+ 
+   return mfspr(SPRN_AMR);
+ }
+@@ -123,6 +135,29 @@ static inline void set_kuap(unsigned long value)
+   isync();
+ }
+ 
++static inline bool
++bad_kuap_fault(struct pt_regs *regs, unsigned long address, bool is_write)
++{
++  return WARN(mmu_has_feature(MMU_FTR_RADIX_KUAP) &&
++  (regs->kuap & (is_write ? AMR_KUAP_BLOCK_WRITE : 
AMR_KUAP_BLOCK_READ)),
++  "Bug: %s fault blocked by AMR!", is_write ? "Write" : 
"Read");
++}
++#else /* CONFIG_PPC_KUAP */
++static inline void kuap_restore_amr(struct pt_regs *regs, unsigned long amr) 
{ }
++
++static inline unsigned long kuap_get_and_check_amr(void)
++{
++  return 0UL;
++}
++
++static inline unsigned long get_kuap(void)

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

2020-11-19 Thread Mike Pagano
commit: 9ae8dbd799faf67224bdd0eb3488655bd5e46a42
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Nov 19 12:40:32 2020 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Nov 19 12:40:32 2020 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=9ae8dbd7

Update gcc CPU optimization patch

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

 5013_enable-cpu-optimizations-for-gcc10.patch | 183 +++---
 1 file changed, 103 insertions(+), 80 deletions(-)

diff --git a/5013_enable-cpu-optimizations-for-gcc10.patch 
b/5013_enable-cpu-optimizations-for-gcc10.patch
index 01cbaa7..0fc0a64 100644
--- a/5013_enable-cpu-optimizations-for-gcc10.patch
+++ b/5013_enable-cpu-optimizations-for-gcc10.patch
@@ -1,3 +1,9 @@
+From 4666424a864159b4de572c90adb2c3e1fcdd5890 Mon Sep 17 00:00:00 2001
+From: graysky 
+Date: Fri, 13 Nov 2020 15:45:08 -0500
+Subject: [PATCH] 
+ enable_additional_cpu_optimizations_for_gcc_v10.1+_kernel_v5.8+.patch
+
 WARNING
 This patch works with gcc versions 10.1+ and with kernel version 5.8+ and 
should
 NOT be applied when compiling on older versions of gcc due to key name changes
@@ -80,81 +86,17 @@ REFERENCES
 4.  https://bugzilla.kernel.org/show_bug.cgi?id=77461
 5.  https://github.com/graysky2/kernel_gcc_patch/issues/15
 6.  http://www.linuxforge.net/docs/linux/linux-gcc.php
+---
+ arch/x86/Kconfig.cpu| 301 
+ arch/x86/Makefile   |  53 +-
+ arch/x86/Makefile_32.cpu|  32 +++-
+ arch/x86/include/asm/vermagic.h |  56 ++
+ 4 files changed, 407 insertions(+), 35 deletions(-)
 
 a/arch/x86/include/asm/vermagic.h  2020-06-14 15:45:04.0 -0400
-+++ b/arch/x86/include/asm/vermagic.h  2020-06-15 09:28:19.867840705 -0400
-@@ -17,6 +17,40 @@
- #define MODULE_PROC_FAMILY "586MMX "
- #elif defined CONFIG_MCORE2
- #define MODULE_PROC_FAMILY "CORE2 "
-+#elif defined CONFIG_MNATIVE
-+#define MODULE_PROC_FAMILY "NATIVE "
-+#elif defined CONFIG_MNEHALEM
-+#define MODULE_PROC_FAMILY "NEHALEM "
-+#elif defined CONFIG_MWESTMERE
-+#define MODULE_PROC_FAMILY "WESTMERE "
-+#elif defined CONFIG_MSILVERMONT
-+#define MODULE_PROC_FAMILY "SILVERMONT "
-+#elif defined CONFIG_MGOLDMONT
-+#define MODULE_PROC_FAMILY "GOLDMONT "
-+#elif defined CONFIG_MGOLDMONTPLUS
-+#define MODULE_PROC_FAMILY "GOLDMONTPLUS "
-+#elif defined CONFIG_MSANDYBRIDGE
-+#define MODULE_PROC_FAMILY "SANDYBRIDGE "
-+#elif defined CONFIG_MIVYBRIDGE
-+#define MODULE_PROC_FAMILY "IVYBRIDGE "
-+#elif defined CONFIG_MHASWELL
-+#define MODULE_PROC_FAMILY "HASWELL "
-+#elif defined CONFIG_MBROADWELL
-+#define MODULE_PROC_FAMILY "BROADWELL "
-+#elif defined CONFIG_MSKYLAKE
-+#define MODULE_PROC_FAMILY "SKYLAKE "
-+#elif defined CONFIG_MSKYLAKEX
-+#define MODULE_PROC_FAMILY "SKYLAKEX "
-+#elif defined CONFIG_MCANNONLAKE
-+#define MODULE_PROC_FAMILY "CANNONLAKE "
-+#elif defined CONFIG_MICELAKE
-+#define MODULE_PROC_FAMILY "ICELAKE "
-+#elif defined CONFIG_MCASCADELAKE
-+#define MODULE_PROC_FAMILY "CASCADELAKE "
-+#elif defined CONFIG_MCOOPERLAKE
-+#define MODULE_PROC_FAMILY "COOPERLAKE "
-+#elif defined CONFIG_MTIGERLAKE
-+#define MODULE_PROC_FAMILY "TIGERLAKE "
- #elif defined CONFIG_MATOM
- #define MODULE_PROC_FAMILY "ATOM "
- #elif defined CONFIG_M686
-@@ -35,6 +69,28 @@
- #define MODULE_PROC_FAMILY "K7 "
- #elif defined CONFIG_MK8
- #define MODULE_PROC_FAMILY "K8 "
-+#elif defined CONFIG_MK8SSE3
-+#define MODULE_PROC_FAMILY "K8SSE3 "
-+#elif defined CONFIG_MK10
-+#define MODULE_PROC_FAMILY "K10 "
-+#elif defined CONFIG_MBARCELONA
-+#define MODULE_PROC_FAMILY "BARCELONA "
-+#elif defined CONFIG_MBOBCAT
-+#define MODULE_PROC_FAMILY "BOBCAT "
-+#elif defined CONFIG_MBULLDOZER
-+#define MODULE_PROC_FAMILY "BULLDOZER "
-+#elif defined CONFIG_MPILEDRIVER
-+#define MODULE_PROC_FAMILY "PILEDRIVER "
-+#elif defined CONFIG_MSTEAMROLLER
-+#define MODULE_PROC_FAMILY "STEAMROLLER "
-+#elif defined CONFIG_MJAGUAR
-+#define MODULE_PROC_FAMILY "JAGUAR "
-+#elif defined CONFIG_MEXCAVATOR
-+#define MODULE_PROC_FAMILY "EXCAVATOR "
-+#elif defined CONFIG_MZEN
-+#define MODULE_PROC_FAMILY "ZEN "
-+#elif defined CONFIG_MZEN2
-+#define MODULE_PROC_FAMILY "ZEN2 "
- #elif defined CONFIG_MELAN
- #define MODULE_PROC_FAMILY "ELAN "
- #elif defined CONFIG_MCRUSOE
 a/arch/x86/Kconfig.cpu 2020-06-14 15:45:04.0 -0400
-+++ b/arch/x86/Kconfig.cpu 2020-06-15 09:28:19.871174111 -0400
+diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
+index 814fe0d349b0..7b08e87fe797 100644
+--- a/arch/x86/Kconfig.cpu
 b/arch/x86/Kconfig.cpu
 @@ -123,6 +123,7 @@ config MPENTIUMM
  config MPENTIUM4
bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon"
@@ -554,9 +496,11 @@ REFERENCES
  
  config X86_MINIMUM_CPU_FAMILY
int
 a/arch/x86/Makefile2020-06-14 15:45:04.0 -0400
-+++ b/arch/x86/Makefile2020-06-15 09:28:19.871174111 -0400
-@@ -119,13 +119,60 @@ else
+diff --git a/arch/x86/Makefile 

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

2020-11-11 Thread Mike Pagano
commit: ef63aa3351ac2e98c27250c7ebaa8cf3c74d10e9
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Nov 11 15:52:23 2020 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Nov 11 15:52:23 2020 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ef63aa33

Linux patch 5.9.8

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

 _README|  4 ++--
 1007_linux-5.9.8.patch | 29 +
 2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/_README b/_README
index c95c981..4d7ac31 100644
--- a/_README
+++ b/_README
@@ -71,9 +71,9 @@ Patch:  1006_linux-5.9.7.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.9.7
 
-Patch:  1006_linux-5.9.7.patch
+Patch:  1007_linux-5.9.8.patch
 From:   http://www.kernel.org
-Desc:   Linux 5.9.7
+Desc:   Linux 5.9.8
 
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644

diff --git a/1007_linux-5.9.8.patch b/1007_linux-5.9.8.patch
new file mode 100644
index 000..1a09c0a
--- /dev/null
+++ b/1007_linux-5.9.8.patch
@@ -0,0 +1,29 @@
+diff --git a/Makefile b/Makefile
+index 035d86a0d291d..ac292d6dd2627 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 9
+-SUBLEVEL = 7
++SUBLEVEL = 8
+ EXTRAVERSION =
+ NAME = Kleptomaniac Octopus
+ 
+diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
+index f808c5fa9838c..3f0b8e2ef3d46 100644
+--- a/drivers/powercap/powercap_sys.c
 b/drivers/powercap/powercap_sys.c
+@@ -367,9 +367,9 @@ static void create_power_zone_common_attributes(
+   _attr_max_energy_range_uj.attr;
+   if (power_zone->ops->get_energy_uj) {
+   if (power_zone->ops->reset_energy_uj)
+-  dev_attr_energy_uj.attr.mode = S_IWUSR | S_IRUGO;
++  dev_attr_energy_uj.attr.mode = S_IWUSR | S_IRUSR;
+   else
+-  dev_attr_energy_uj.attr.mode = S_IRUGO;
++  dev_attr_energy_uj.attr.mode = S_IRUSR;
+   power_zone->zone_dev_attrs[count++] =
+   _attr_energy_uj.attr;
+   }



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

2020-11-04 Thread Mike Pagano
commit: 636f316591a7510973ef65dda3d67dece15e70a4
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Nov  4 23:37:47 2020 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Nov  4 23:37:47 2020 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=636f3165

Linux patch 5.9.4

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

 _README|   4 +
 1003_linux-5.9.4.patch | 277 +
 2 files changed, 281 insertions(+)

diff --git a/_README b/_README
index e44a26b..85e9d90 100644
--- a/_README
+++ b/_README
@@ -55,6 +55,10 @@ Patch:  1002_linux-5.9.3.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.9.3
 
+Patch:  1003_linux-5.9.4.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.9.4
+
 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/1003_linux-5.9.4.patch b/1003_linux-5.9.4.patch
new file mode 100644
index 000..9f869ea
--- /dev/null
+++ b/1003_linux-5.9.4.patch
@@ -0,0 +1,277 @@
+diff --git a/Makefile b/Makefile
+index 50e927f348532..0c8f0ba8c34f4 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 9
+-SUBLEVEL = 3
++SUBLEVEL = 4
+ EXTRAVERSION =
+ NAME = Kleptomaniac Octopus
+ 
+diff --git a/tools/testing/selftests/powerpc/copyloops/copy_mc_64.S 
b/tools/testing/selftests/powerpc/copyloops/copy_mc_64.S
+deleted file mode 100644
+index 88d46c471493b..0
+--- a/tools/testing/selftests/powerpc/copyloops/copy_mc_64.S
 /dev/null
+@@ -1,242 +0,0 @@
+-/* SPDX-License-Identifier: GPL-2.0 */
+-/*
+- * Copyright (C) IBM Corporation, 2011
+- * Derived from copyuser_power7.s by Anton Blanchard 
+- * Author - Balbir Singh 
+- */
+-#include 
+-#include 
+-#include 
+-
+-  .macro err1
+-100:
+-  EX_TABLE(100b,.Ldo_err1)
+-  .endm
+-
+-  .macro err2
+-200:
+-  EX_TABLE(200b,.Ldo_err2)
+-  .endm
+-
+-  .macro err3
+-300:  EX_TABLE(300b,.Ldone)
+-  .endm
+-
+-.Ldo_err2:
+-  ld  r22,STK_REG(R22)(r1)
+-  ld  r21,STK_REG(R21)(r1)
+-  ld  r20,STK_REG(R20)(r1)
+-  ld  r19,STK_REG(R19)(r1)
+-  ld  r18,STK_REG(R18)(r1)
+-  ld  r17,STK_REG(R17)(r1)
+-  ld  r16,STK_REG(R16)(r1)
+-  ld  r15,STK_REG(R15)(r1)
+-  ld  r14,STK_REG(R14)(r1)
+-  addir1,r1,STACKFRAMESIZE
+-.Ldo_err1:
+-  /* Do a byte by byte copy to get the exact remaining size */
+-  mtctr   r7
+-46:
+-err3; lbz r0,0(r4)
+-  addir4,r4,1
+-err3; stb r0,0(r3)
+-  addir3,r3,1
+-  bdnz46b
+-  li  r3,0
+-  blr
+-
+-.Ldone:
+-  mfctr   r3
+-  blr
+-
+-
+-_GLOBAL(copy_mc_generic)
+-  mr  r7,r5
+-  cmpldi  r5,16
+-  blt .Lshort_copy
+-
+-.Lcopy:
+-  /* Get the source 8B aligned */
+-  neg r6,r4
+-  mtocrf  0x01,r6
+-  clrldi  r6,r6,(64-3)
+-
+-  bf  cr7*4+3,1f
+-err1; lbz r0,0(r4)
+-  addir4,r4,1
+-err1; stb r0,0(r3)
+-  addir3,r3,1
+-  subir7,r7,1
+-
+-1:bf  cr7*4+2,2f
+-err1; lhz r0,0(r4)
+-  addir4,r4,2
+-err1; sth r0,0(r3)
+-  addir3,r3,2
+-  subir7,r7,2
+-
+-2:bf  cr7*4+1,3f
+-err1; lwz r0,0(r4)
+-  addir4,r4,4
+-err1; stw r0,0(r3)
+-  addir3,r3,4
+-  subir7,r7,4
+-
+-3:sub r5,r5,r6
+-  cmpldi  r5,128
+-
+-  mflrr0
+-  stdur1,-STACKFRAMESIZE(r1)
+-  std r14,STK_REG(R14)(r1)
+-  std r15,STK_REG(R15)(r1)
+-  std r16,STK_REG(R16)(r1)
+-  std r17,STK_REG(R17)(r1)
+-  std r18,STK_REG(R18)(r1)
+-  std r19,STK_REG(R19)(r1)
+-  std r20,STK_REG(R20)(r1)
+-  std r21,STK_REG(R21)(r1)
+-  std r22,STK_REG(R22)(r1)
+-  std r0,STACKFRAMESIZE+16(r1)
+-
+-  blt 5f
+-  srdir6,r5,7
+-  mtctr   r6
+-
+-  /* Now do cacheline (128B) sized loads and stores. */
+-  .align  5
+-4:
+-err2; ld  r0,0(r4)
+-err2; ld  r6,8(r4)
+-err2; ld  r8,16(r4)
+-err2; ld  r9,24(r4)
+-err2; ld  r10,32(r4)
+-err2; ld  r11,40(r4)
+-err2; ld  r12,48(r4)
+-err2; ld  r14,56(r4)
+-err2; ld  r15,64(r4)
+-err2; ld  r16,72(r4)
+-err2; ld  r17,80(r4)
+-err2; ld  r18,88(r4)
+-err2; ld  r19,96(r4)
+-err2; ld  r20,104(r4)
+-err2; ld  r21,112(r4)
+-err2; ld  r22,120(r4)
+-  addir4,r4,128
+-err2; std r0,0(r3)
+-err2; std r6,8(r3)
+-err2; std r8,16(r3)
+-err2; std r9,24(r3)
+-err2; std r10,32(r3)
+-err2; std r11,40(r3)
+-err2; std r12,48(r3)
+-err2; std r14,56(r3)
+-err2; std r15,64(r3)
+-err2; std r16,72(r3)
+-err2; std r17,80(r3)
+-err2; std r18,88(r3)
+-err2; std r19,96(r3)
+-err2; std r20,104(r3)
+-err2; std r21,112(r3)
+-err2; std 

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

2020-10-17 Thread Mike Pagano
commit: 40fa072fdc1fb5670d74cfc9d8a8fc15808448eb
Author: Mike Pagano  gentoo  org>
AuthorDate: Sat Oct 17 10:15:42 2020 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sat Oct 17 10:15:42 2020 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=40fa072f

Linux patch 5.9.1

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

 _README|   4 +
 1000_linux-5.9.1.patch | 551 +
 2 files changed, 555 insertions(+)

diff --git a/_README b/_README
index 3f9bf5f..f7f6e8d 100644
--- a/_README
+++ b/_README
@@ -43,6 +43,10 @@ EXPERIMENTAL
 Individual Patch Descriptions:
 --
 
+Patch:  1000_linux-5.9.1.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.9.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.9.1.patch b/1000_linux-5.9.1.patch
new file mode 100644
index 000..8111747
--- /dev/null
+++ b/1000_linux-5.9.1.patch
@@ -0,0 +1,551 @@
+diff --git a/Makefile b/Makefile
+index 51540b2917388..d600b38144f42 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 9
+-SUBLEVEL = 0
++SUBLEVEL = 1
+ EXTRAVERSION =
+ NAME = Kleptomaniac Octopus
+ 
+diff --git a/drivers/crypto/bcm/cipher.c b/drivers/crypto/bcm/cipher.c
+index 8a7fa1ae1adec..ba25d26a15727 100644
+--- a/drivers/crypto/bcm/cipher.c
 b/drivers/crypto/bcm/cipher.c
+@@ -2930,7 +2930,6 @@ static int aead_gcm_ccm_setkey(struct crypto_aead 
*cipher,
+ 
+   ctx->enckeylen = keylen;
+   ctx->authkeylen = 0;
+-  memcpy(ctx->enckey, key, ctx->enckeylen);
+ 
+   switch (ctx->enckeylen) {
+   case AES_KEYSIZE_128:
+@@ -2946,6 +2945,8 @@ static int aead_gcm_ccm_setkey(struct crypto_aead 
*cipher,
+   goto badkey;
+   }
+ 
++  memcpy(ctx->enckey, key, ctx->enckeylen);
++
+   flow_log("  enckeylen:%u authkeylen:%u\n", ctx->enckeylen,
+ctx->authkeylen);
+   flow_dump("  enc: ", ctx->enckey, ctx->enckeylen);
+@@ -3000,6 +3001,10 @@ static int aead_gcm_esp_setkey(struct crypto_aead 
*cipher,
+   struct iproc_ctx_s *ctx = crypto_aead_ctx(cipher);
+ 
+   flow_log("%s\n", __func__);
++
++  if (keylen < GCM_ESP_SALT_SIZE)
++  return -EINVAL;
++
+   ctx->salt_len = GCM_ESP_SALT_SIZE;
+   ctx->salt_offset = GCM_ESP_SALT_OFFSET;
+   memcpy(ctx->salt, key + keylen - GCM_ESP_SALT_SIZE, GCM_ESP_SALT_SIZE);
+@@ -3028,6 +3033,10 @@ static int rfc4543_gcm_esp_setkey(struct crypto_aead 
*cipher,
+   struct iproc_ctx_s *ctx = crypto_aead_ctx(cipher);
+ 
+   flow_log("%s\n", __func__);
++
++  if (keylen < GCM_ESP_SALT_SIZE)
++  return -EINVAL;
++
+   ctx->salt_len = GCM_ESP_SALT_SIZE;
+   ctx->salt_offset = GCM_ESP_SALT_OFFSET;
+   memcpy(ctx->salt, key + keylen - GCM_ESP_SALT_SIZE, GCM_ESP_SALT_SIZE);
+@@ -3057,6 +3066,10 @@ static int aead_ccm_esp_setkey(struct crypto_aead 
*cipher,
+   struct iproc_ctx_s *ctx = crypto_aead_ctx(cipher);
+ 
+   flow_log("%s\n", __func__);
++
++  if (keylen < CCM_ESP_SALT_SIZE)
++  return -EINVAL;
++
+   ctx->salt_len = CCM_ESP_SALT_SIZE;
+   ctx->salt_offset = CCM_ESP_SALT_OFFSET;
+   memcpy(ctx->salt, key + keylen - CCM_ESP_SALT_SIZE, CCM_ESP_SALT_SIZE);
+diff --git a/drivers/crypto/qat/qat_common/qat_algs.c 
b/drivers/crypto/qat/qat_common/qat_algs.c
+index 72753b84dc95c..d552dbcfe0a07 100644
+--- a/drivers/crypto/qat/qat_common/qat_algs.c
 b/drivers/crypto/qat/qat_common/qat_algs.c
+@@ -828,6 +828,11 @@ static int qat_alg_aead_dec(struct aead_request *areq)
+   struct icp_qat_fw_la_bulk_req *msg;
+   int digst_size = crypto_aead_authsize(aead_tfm);
+   int ret, ctr = 0;
++  u32 cipher_len;
++
++  cipher_len = areq->cryptlen - digst_size;
++  if (cipher_len % AES_BLOCK_SIZE != 0)
++  return -EINVAL;
+ 
+   ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req);
+   if (unlikely(ret))
+@@ -842,7 +847,7 @@ static int qat_alg_aead_dec(struct aead_request *areq)
+   qat_req->req.comn_mid.src_data_addr = qat_req->buf.blp;
+   qat_req->req.comn_mid.dest_data_addr = qat_req->buf.bloutp;
+   cipher_param = (void *)_req->req.serv_specif_rqpars;
+-  cipher_param->cipher_length = areq->cryptlen - digst_size;
++  cipher_param->cipher_length = cipher_len;
+   cipher_param->cipher_offset = areq->assoclen;
+   memcpy(cipher_param->u.cipher_IV_array, areq->iv, AES_BLOCK_SIZE);
+   auth_param = (void *)((u8 *)cipher_param + sizeof(*cipher_param));
+@@ -871,6 +876,9 @@ static int qat_alg_aead_enc(struct aead_request *areq)
+   u8 *iv = areq->iv;
+   int ret, ctr = 0;
+ 
++  if (areq->cryptlen % AES_BLOCK_SIZE != 0)
++