From 3a507b26dc45e93c5d5b90e1979067b4f51d8e39 Mon Sep 17 00:00:00 2001 From: Kernel Build Daemon Date: Oct 06 2021 05:20:20 +0000 Subject: Merge branch 'SLE12-SP5' into SLE12-SP5-AZURE --- diff --git a/blacklist.conf b/blacklist.conf index 97223cb..56dca0c 100644 --- a/blacklist.conf +++ b/blacklist.conf @@ -1986,3 +1986,4 @@ a0761a301746ec2d92d7fcb82af69c0a6a4339aa # kABI and quite intrusive b16798f5b907733966fd1a558fca823b3c67e4a1 # prerequisite breaks kABI f8914a14623a79b73f72b2b1ee4cd9b2cb91b735 # numerous prerequisites that break kABI a7fb107b7d8982ac76c958a0d2838a151b03e97e # net: phy: Re-parent menus for MDIO bus drivers correctly Cosmetic fix +51e1bb9eeaf7868db56e58f47848e364ab4c4129 # would impact KABI (lockdown_reason) diff --git a/patches.suse/SUNRPC-Ensure-to-ratelimit-the-server-not-responding.patch b/patches.suse/SUNRPC-Ensure-to-ratelimit-the-server-not-responding.patch new file mode 100644 index 0000000..0c8b4ca --- /dev/null +++ b/patches.suse/SUNRPC-Ensure-to-ratelimit-the-server-not-responding.patch @@ -0,0 +1,54 @@ +From: Trond Myklebust +Date: Sun, 7 Apr 2019 13:58:57 -0400 +Subject: [PATCH] SUNRPC: Ensure to ratelimit the "server not responding" + syslog messages +Git-commit: 0729d995f2a2726598642d552ebe916b43aef73d +Patch-mainline: v5.2 +References: bsc#1191136 + +In particular, the timeout messages can be very noisy, so we ought to +ratelimit them in order to avoid spamming the syslog. + +Signed-off-by: Trond Myklebust +Signed-off-by: Anna Schumaker +Acked-by: NeilBrown + +--- + net/sunrpc/clnt.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +--- a/net/sunrpc/clnt.c ++++ b/net/sunrpc/clnt.c +@@ -2245,7 +2245,8 @@ call_timeout(struct rpc_task *task) + } + if (RPC_IS_SOFT(task)) { + if (clnt->cl_chatty) { +- printk(KERN_NOTICE "%s: server %s not responding, timed out\n", ++ pr_notice_ratelimited( ++ "%s: server %s not responding, timed out\n", + clnt->cl_program->name, + task->tk_xprt->servername); + } +@@ -2259,9 +2260,10 @@ call_timeout(struct rpc_task *task) + if (!(task->tk_flags & RPC_CALL_MAJORSEEN)) { + task->tk_flags |= RPC_CALL_MAJORSEEN; + if (clnt->cl_chatty) { +- printk(KERN_NOTICE "%s: server %s not responding, still trying\n", +- clnt->cl_program->name, +- task->tk_xprt->servername); ++ pr_notice_ratelimited( ++ "%s: server %s not responding, still trying\n", ++ clnt->cl_program->name, ++ task->tk_xprt->servername); + } + } + rpc_force_rebind(clnt); +@@ -2291,7 +2293,7 @@ call_decode(struct rpc_task *task) + + if (task->tk_flags & RPC_CALL_MAJORSEEN) { + if (clnt->cl_chatty) { +- printk(KERN_NOTICE "%s: server %s OK\n", ++ pr_notice_ratelimited("%s: server %s OK\n", + clnt->cl_program->name, + task->tk_xprt->servername); + } diff --git a/patches.suse/crypto-x86-aes-ni-xts-use-direct-calls-to-and-4-way-stride.patch b/patches.suse/crypto-x86-aes-ni-xts-use-direct-calls-to-and-4-way-stride.patch new file mode 100644 index 0000000..64f98da --- /dev/null +++ b/patches.suse/crypto-x86-aes-ni-xts-use-direct-calls-to-and-4-way-stride.patch @@ -0,0 +1,269 @@ +From: Ard Biesheuvel +Date: Thu, 31 Dec 2020 17:41:54 +0100 +Subject: crypto: x86/aes-ni-xts - use direct calls to and 4-way stride +Git-commit: 86ad60a65f29dd862a11c22bb4b5be28d6c5cef1 +Patch-mainline: v5.12-rc1 +References: bsc#1114648 + +The XTS asm helper arrangement is a bit odd: the 8-way stride helper +consists of back-to-back calls to the 4-way core transforms, which +are called indirectly, based on a boolean that indicates whether we +are performing encryption or decryption. + +Given how costly indirect calls are on x86, let's switch to direct +calls, and given how the 8-way stride doesn't really add anything +substantial, use a 4-way stride instead, and make the asm core +routine deal with any multiple of 4 blocks. Since 512 byte sectors +or 4 KB blocks are the typical quantities XTS operates on, increase +the stride exported to the glue helper to 512 bytes as well. + +As a result, the number of indirect calls is reduced from 3 per 64 bytes +of in/output to 1 per 512 bytes of in/output, which produces a 65% speedup +when operating on 1 KB blocks (measured on a Intel(R) Core(TM) i7-8650U CPU) + +Fixes: 9697fa39efd3f ("x86/retpoline/crypto: Convert crypto assembler indirect jumps") +Tested-by: Eric Biggers # x86_64 +Signed-off-by: Ard Biesheuvel +Signed-off-by: Herbert Xu +Acked-by: Borislav Petkov +--- + arch/x86/crypto/aesni-intel_asm.S | 115 ++++++++++++++++++++++--------------- + arch/x86/crypto/aesni-intel_glue.c | 25 ++++---- + 2 files changed, 84 insertions(+), 56 deletions(-) + +--- a/arch/x86/crypto/aesni-intel_asm.S ++++ b/arch/x86/crypto/aesni-intel_asm.S +@@ -2714,25 +2714,18 @@ ENDPROC(aesni_ctr_enc) + pxor CTR, IV; + + /* +- * void aesni_xts_crypt8(struct crypto_aes_ctx *ctx, const u8 *dst, u8 *src, +- * bool enc, u8 *iv) ++ * void aesni_xts_encrypt(const struct crypto_aes_ctx *ctx, u8 *dst, ++ * const u8 *src, unsigned int len, le128 *iv) + */ +-ENTRY(aesni_xts_crypt8) ++ENTRY(aesni_xts_encrypt) + FRAME_BEGIN +- cmpb $0, %cl +- movl $0, %ecx +- movl $240, %r10d +- leaq _aesni_enc4, %r11 +- leaq _aesni_dec4, %rax +- cmovel %r10d, %ecx +- cmoveq %rax, %r11 + + movdqa .Lgf128mul_x_ble_mask, GF128MUL_MASK + movups (IVP), IV + + mov 480(KEYP), KLEN +- addq %rcx, KEYP + ++.Lxts_enc_loop4: + movdqa IV, STATE1 + movdqu 0x00(INP), INC + pxor INC, STATE1 +@@ -2756,71 +2749,103 @@ ENTRY(aesni_xts_crypt8) + pxor INC, STATE4 + movdqu IV, 0x30(OUTP) + +- CALL_NOSPEC %r11 ++ call _aesni_enc4 + + movdqu 0x00(OUTP), INC + pxor INC, STATE1 + movdqu STATE1, 0x00(OUTP) + +- _aesni_gf128mul_x_ble() +- movdqa IV, STATE1 +- movdqu 0x40(INP), INC +- pxor INC, STATE1 +- movdqu IV, 0x40(OUTP) +- + movdqu 0x10(OUTP), INC + pxor INC, STATE2 + movdqu STATE2, 0x10(OUTP) + +- _aesni_gf128mul_x_ble() +- movdqa IV, STATE2 +- movdqu 0x50(INP), INC +- pxor INC, STATE2 +- movdqu IV, 0x50(OUTP) +- + movdqu 0x20(OUTP), INC + pxor INC, STATE3 + movdqu STATE3, 0x20(OUTP) + +- _aesni_gf128mul_x_ble() +- movdqa IV, STATE3 +- movdqu 0x60(INP), INC +- pxor INC, STATE3 +- movdqu IV, 0x60(OUTP) +- + movdqu 0x30(OUTP), INC + pxor INC, STATE4 + movdqu STATE4, 0x30(OUTP) + + _aesni_gf128mul_x_ble() +- movdqa IV, STATE4 +- movdqu 0x70(INP), INC +- pxor INC, STATE4 +- movdqu IV, 0x70(OUTP) + +- _aesni_gf128mul_x_ble() ++ add $64, INP ++ add $64, OUTP ++ sub $64, LEN ++ ja .Lxts_enc_loop4 ++ + movups IV, (IVP) + +- CALL_NOSPEC %r11 ++ FRAME_END ++ ret ++ENDPROC(aesni_xts_encrypt) ++ ++/* ++ * void aesni_xts_decrypt(const struct crypto_aes_ctx *ctx, u8 *dst, ++ * const u8 *src, unsigned int len, le128 *iv) ++ */ ++ENTRY(aesni_xts_decrypt) ++ FRAME_BEGIN ++ ++ movdqa .Lgf128mul_x_ble_mask, GF128MUL_MASK ++ movups (IVP), IV ++ ++ mov 480(KEYP), KLEN ++ add $240, KEYP ++ ++.Lxts_dec_loop4: ++ movdqa IV, STATE1 ++ movdqu 0x00(INP), INC ++ pxor INC, STATE1 ++ movdqu IV, 0x00(OUTP) ++ ++ _aesni_gf128mul_x_ble() ++ movdqa IV, STATE2 ++ movdqu 0x10(INP), INC ++ pxor INC, STATE2 ++ movdqu IV, 0x10(OUTP) ++ ++ _aesni_gf128mul_x_ble() ++ movdqa IV, STATE3 ++ movdqu 0x20(INP), INC ++ pxor INC, STATE3 ++ movdqu IV, 0x20(OUTP) ++ ++ _aesni_gf128mul_x_ble() ++ movdqa IV, STATE4 ++ movdqu 0x30(INP), INC ++ pxor INC, STATE4 ++ movdqu IV, 0x30(OUTP) ++ ++ call _aesni_dec4 + +- movdqu 0x40(OUTP), INC ++ movdqu 0x00(OUTP), INC + pxor INC, STATE1 +- movdqu STATE1, 0x40(OUTP) ++ movdqu STATE1, 0x00(OUTP) + +- movdqu 0x50(OUTP), INC ++ movdqu 0x10(OUTP), INC + pxor INC, STATE2 +- movdqu STATE2, 0x50(OUTP) ++ movdqu STATE2, 0x10(OUTP) + +- movdqu 0x60(OUTP), INC ++ movdqu 0x20(OUTP), INC + pxor INC, STATE3 +- movdqu STATE3, 0x60(OUTP) ++ movdqu STATE3, 0x20(OUTP) + +- movdqu 0x70(OUTP), INC ++ movdqu 0x30(OUTP), INC + pxor INC, STATE4 +- movdqu STATE4, 0x70(OUTP) ++ movdqu STATE4, 0x30(OUTP) ++ ++ _aesni_gf128mul_x_ble() ++ ++ add $64, INP ++ add $64, OUTP ++ sub $64, LEN ++ ja .Lxts_dec_loop4 ++ ++ movups IV, (IVP) + + FRAME_END + ret +-ENDPROC(aesni_xts_crypt8) ++ENDPROC(aesni_xts_decrypt) + + #endif +--- a/arch/x86/crypto/aesni-intel_glue.c ++++ b/arch/x86/crypto/aesni-intel_glue.c +@@ -88,6 +88,12 @@ void crypto_fpu_exit(void); + #define AVX_GEN2_OPTSIZE 640 + #define AVX_GEN4_OPTSIZE 4096 + ++asmlinkage void aesni_xts_encrypt(const struct crypto_aes_ctx *ctx, u8 *out, ++ const u8 *in, unsigned int len, u8 *iv); ++ ++asmlinkage void aesni_xts_decrypt(const struct crypto_aes_ctx *ctx, u8 *out, ++ const u8 *in, unsigned int len, u8 *iv); ++ + #ifdef CONFIG_X86_64 + + static void (*aesni_ctr_enc_tfm)(struct crypto_aes_ctx *ctx, u8 *out, +@@ -95,9 +101,6 @@ static void (*aesni_ctr_enc_tfm)(struct + asmlinkage void aesni_ctr_enc(struct crypto_aes_ctx *ctx, u8 *out, + const u8 *in, unsigned int len, u8 *iv); + +-asmlinkage void aesni_xts_crypt8(struct crypto_aes_ctx *ctx, u8 *out, +- const u8 *in, bool enc, u8 *iv); +- + /* asmlinkage void aesni_gcm_enc() + * void *ctx, AES Key schedule. Starts on a 16 byte boundary. + * u8 *out, Ciphertext output. Encrypt in-place is allowed. +@@ -553,14 +556,14 @@ static void aesni_xts_dec(void *ctx, u12 + glue_xts_crypt_128bit_one(ctx, dst, src, iv, GLUE_FUNC_CAST(aesni_dec)); + } + +-static void aesni_xts_enc8(void *ctx, u128 *dst, const u128 *src, le128 *iv) ++static void aesni_xts_enc32(const void *ctx, u8 *dst, const u8 *src, le128 *iv) + { +- aesni_xts_crypt8(ctx, (u8 *)dst, (const u8 *)src, true, (u8 *)iv); ++ aesni_xts_encrypt(ctx, dst, src, 32 * AES_BLOCK_SIZE, (u8 *)iv); + } + +-static void aesni_xts_dec8(void *ctx, u128 *dst, const u128 *src, le128 *iv) ++static void aesni_xts_dec32(const void *ctx, u8 *dst, const u8 *src, le128 *iv) + { +- aesni_xts_crypt8(ctx, (u8 *)dst, (const u8 *)src, false, (u8 *)iv); ++ aesni_xts_decrypt(ctx, dst, src, 32 * AES_BLOCK_SIZE, (u8 *)iv); + } + + static const struct common_glue_ctx aesni_enc_xts = { +@@ -568,8 +571,8 @@ static const struct common_glue_ctx aesn + .fpu_blocks_limit = 1, + + .funcs = { { +- .num_blocks = 8, +- .fn_u = { .xts = GLUE_XTS_FUNC_CAST(aesni_xts_enc8) } ++ .num_blocks = 32, ++ .fn_u = { .xts = GLUE_XTS_FUNC_CAST(aesni_xts_enc32) } + }, { + .num_blocks = 1, + .fn_u = { .xts = GLUE_XTS_FUNC_CAST(aesni_xts_enc) } +@@ -581,8 +584,8 @@ static const struct common_glue_ctx aesn + .fpu_blocks_limit = 1, + + .funcs = { { +- .num_blocks = 8, +- .fn_u = { .xts = GLUE_XTS_FUNC_CAST(aesni_xts_dec8) } ++ .num_blocks = 32, ++ .fn_u = { .xts = GLUE_XTS_FUNC_CAST(aesni_xts_dec32) } + }, { + .num_blocks = 1, + .fn_u = { .xts = GLUE_XTS_FUNC_CAST(aesni_xts_dec) } diff --git a/patches.suse/ipc-remove-memcg-accounting-for-sops-objects-in-do_semtimedop.patch b/patches.suse/ipc-remove-memcg-accounting-for-sops-objects-in-do_semtimedop.patch new file mode 100644 index 0000000..10b5a87 --- /dev/null +++ b/patches.suse/ipc-remove-memcg-accounting-for-sops-objects-in-do_semtimedop.patch @@ -0,0 +1,56 @@ +From: Vasily Averin +Date: Sat, 11 Sep 2021 10:40:08 +0300 +Subject: ipc: remove memcg accounting for sops objects in do_semtimedop() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Git-commit: 6a4746ba06191e23d30230738e94334b26590a8a +Patch-mainline: v5.15-rc2 +References: bsc#1190115 + +Linus proposes to revert an accounting for sops objects in +do_semtimedop() because it's really just a temporary buffer +for a single semtimedop() system call. + +This object can consume up to 2 pages, syscall is sleeping +one, size and duration can be controlled by user, and this +allocation can be repeated by many thread at the same time. + +However Shakeel Butt pointed that there are much more popular +objects with the same life time and similar memory +consumption, the accounting of which was decided to be +rejected for performance reasons. + +Considering at least 2 pages for task_struct and 2 pages for +the kernel stack, a back of the envelope calculation gives a +footprint amplification of <1.5 so this temporal buffer can be +safely ignored. + +The factor would IMO be interesting if it was >> 2 (from the +PoV of excessive (ab)use, fine-grained accounting seems to be +currently unfeasible due to performance impact). + +Link: https://lore.kernel.org/lkml/90e254df-0dfe-f080-011e-b7c53ee7fd20@virtuozzo.com/ +Fixes: 18319498fdd4 ("memcg: enable accounting of ipc resources") +Signed-off-by: Vasily Averin +Acked-by: Michal Hocko +Reviewed-by: Michal Koutný +Acked-by: Shakeel Butt +Signed-off-by: Linus Torvalds +[mkoutny: Adjust context, use upstream kvmalloc_array helper] +Acked-by: Michal Koutný +--- + ipc/sem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/ipc/sem.c ++++ b/ipc/sem.c +@@ -1786,7 +1786,7 @@ SYSCALL_DEFINE4(semtimedop, int, semid, + if (nsops > ns->sc_semopm) + return -E2BIG; + if (nsops > SEMOPM_FAST) { +- sops = kvmalloc(sizeof(*sops)*nsops, GFP_KERNEL_ACCOUNT); ++ sops = kvmalloc_array(nsops, sizeof(*sops), GFP_KERNEL); + if (sops == NULL) + return -ENOMEM; + } diff --git a/patches.suse/ipc-remove-memcg-accounting-for-sops-objects.patch b/patches.suse/ipc-remove-memcg-accounting-for-sops-objects.patch deleted file mode 100644 index 3dbaf77..0000000 --- a/patches.suse/ipc-remove-memcg-accounting-for-sops-objects.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: Vasily Averin -Subject: ipc: remove memcg accounting for sops objects in do_semtimedop() -Date: Sat, 11 Sep 2021 10:40:08 +0300 -Message-ID: <90e254df-0dfe-f080-011e-b7c53ee7fd20@virtuozzo.com> -Patch-mainline: Not yet, too soon -References: bsc#1190115 - -Linus proposes to revert an accounting for sops objects in -do_semtimedop() because it's really just a temporary buffer -for a single semtimedop() system call. - -This object can consume up to 2 pages, syscall is sleeping one, -size and duration can be controlled by user, and this allocation -can be repeated by many thread at the same time. - -However Shakeel Butt pointed that there are much more popular objects -with the same life time and similar memory consumption, the accounting -of which was decided to be rejected for performance reasons. - -In addition, any usual task consumes much more accounted memory, -so 2 pages of this temporal buffer can be safely ignored. - -Link: https://patchwork.kernel.org/project/linux-fsdevel/patch/20171005222144.123797-1-shakeelb@google.com/ - -Fixes: 18319498fdd4 ("memcg: enable accounting of ipc resources") -Signed-off-by: Vasily Averin -Acked-by: Michal Koutný ---- - ipc/sem.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ipc/sem.c b/ipc/sem.c -index f833238df1ce..6693daf4fe11 100644 ---- a/ipc/sem.c -+++ b/ipc/sem.c -@@ -2238,7 +2238,7 @@ static long do_semtimedop(int semid, struct sembuf __user *tsops, - if (nsops > ns->sc_semopm) - return -E2BIG; - if (nsops > SEMOPM_FAST) { -- sops = kvmalloc(sizeof(*sops)*nsops, GFP_KERNEL_ACCOUNT); -+ sops = kvmalloc_array(nsops, sizeof(*sops), GFP_KERNEL); - if (sops == NULL) - return -ENOMEM; - } --- -2.25.1 - diff --git a/series.conf b/series.conf index 620077a..da93d9f 100644 --- a/series.conf +++ b/series.conf @@ -49643,6 +49643,7 @@ patches.suse/RDMA-efa-Add-Amazon-EFA-driver.patch patches.suse/ipoib-Do-not-overreact-to-SM-LID-change-even.patch patches.suse/RDMA-ipoib-Allow-user-space-differentiate-between-va.patch + patches.suse/SUNRPC-Ensure-to-ratelimit-the-server-not-responding.patch patches.suse/NFS-Don-t-interrupt-file-writeout-due-to-fatal-error.patch patches.suse/NFS-Don-t-call-generic_error_remove_page-while-holdi.patch patches.suse/NFS-make-nfs_match_client-killable.patch @@ -58584,6 +58585,7 @@ patches.suse/ima-Free-IMA-measurement-buffer-after-kexec-syscall patches.suse/tpm_tis-Fix-check_locality-for-correct-locality-acqu.patch patches.suse/tpm_tis-clean-up-locality-release.patch + patches.suse/crypto-x86-aes-ni-xts-use-direct-calls-to-and-4-way-stride.patch patches.suse/hwrng-timeriomem-Fix-cooldown-period-calculation.patch patches.suse/mmc-usdhi6rol0-Fix-a-resource-leak-in-the-error-hand.patch patches.suse/mmc-sdhci-esdhc-imx-fix-kernel-panic-when-remove-mod.patch @@ -59931,6 +59933,7 @@ patches.suse/SUNRPC-improve-error-response-to-over-size-gss-crede.patch patches.suse/s390-unwind-use-current_frame_address-to-unwind-current-task.patch patches.suse/time-Handle-negative-seconds-correctly-in-timespec64.patch + patches.suse/ipc-remove-memcg-accounting-for-sops-objects-in-do_semtimedop.patch patches.suse/ibmvnic-check-failover_pending-in-login-response.patch patches.suse/msft-hv-2437-net-mana-Prefer-struct_size-over-open-coded-arithmet.patch patches.suse/x86-mm-fix-kern_addr_valid-to-cope-with-existing-but-not-present-entries.patch @@ -59987,7 +59990,6 @@ patches.suse/blk-mq-move-_blk_mq_update_nr_hw_queues-synchronize_rcu-call patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch patches.suse/scsi-smartpqi-create-module-parameters-for-LUN-reset.patch - patches.suse/ipc-remove-memcg-accounting-for-sops-objects.patch patches.suse/crypto_ccp-fix_resource_leaks_in_ccp_run_aes_gcm_cmd.patch ########################################################