From patchwork Wed Feb 9 19:14:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 541364 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCB3FC433EF for ; Wed, 9 Feb 2022 19:18:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231208AbiBITSs (ORCPT ); Wed, 9 Feb 2022 14:18:48 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:56324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230497AbiBITSr (ORCPT ); Wed, 9 Feb 2022 14:18:47 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C8A2E00D119; Wed, 9 Feb 2022 11:18:41 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3BFD961987; Wed, 9 Feb 2022 19:15:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C374C340E7; Wed, 9 Feb 2022 19:15:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644434138; bh=7kk9Lfg3RNYsiFu0qA1BFD41TbB4U5hzFtBATuwovDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OfBrFUpYOaVUgOPLG1aM/GyhRYmx5h9EXlnsL4208wzkqlkXYNkVwYrgdz9l5ZU9I qftiOWVUS2OtE9ZkbwvGzji+lkDc553TKjOIYut0Bj444N+ZuVbEwV39RMiU/slJJ5 9b1R2hd2i8wFgyQH68lhPvBB/zIp5V0zlP0zoN2s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Catalin Marinas , Will Deacon , Suzuki Poulose , linux-arm-kernel@lists.infradead.org, Anshuman Khandual , Mathieu Poirier Subject: [PATCH 5.15 2/5] arm64: Add Cortex-A510 CPU part definition Date: Wed, 9 Feb 2022 20:14:27 +0100 Message-Id: <20220209191250.067270808@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220209191249.980911721@linuxfoundation.org> References: <20220209191249.980911721@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Anshuman Khandual commit 53960faf2b731dd2f9ed6e1334634b8ba6286850 upstream. Add the CPU Partnumbers for the new Arm designs. Cc: Catalin Marinas Cc: Will Deacon Cc: Suzuki Poulose Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Suzuki K Poulose Acked-by: Catalin Marinas Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/1643120437-14352-2-git-send-email-anshuman.khandual@arm.com Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman --- arch/arm64/include/asm/cputype.h | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/arm64/include/asm/cputype.h +++ b/arch/arm64/include/asm/cputype.h @@ -73,6 +73,7 @@ #define ARM_CPU_PART_CORTEX_A76 0xD0B #define ARM_CPU_PART_NEOVERSE_N1 0xD0C #define ARM_CPU_PART_CORTEX_A77 0xD0D +#define ARM_CPU_PART_CORTEX_A510 0xD46 #define APM_CPU_PART_POTENZA 0x000 @@ -113,6 +114,7 @@ #define MIDR_CORTEX_A76 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A76) #define MIDR_NEOVERSE_N1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N1) #define MIDR_CORTEX_A77 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A77) +#define MIDR_CORTEX_A510 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A510) #define MIDR_THUNDERX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX) #define MIDR_THUNDERX_81XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_81XX) #define MIDR_THUNDERX_83XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_83XX) From patchwork Wed Feb 9 19:14:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 541362 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB49CC4332F for ; Wed, 9 Feb 2022 19:26:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233414AbiBIT0a (ORCPT ); Wed, 9 Feb 2022 14:26:30 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:45194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234758AbiBIT0K (ORCPT ); Wed, 9 Feb 2022 14:26:10 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFD88C1DC5FA; Wed, 9 Feb 2022 11:19:14 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E31A6B82393; Wed, 9 Feb 2022 19:15:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06E4CC340E7; Wed, 9 Feb 2022 19:15:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644434158; bh=IrgqHa2QwSbIxMhpEksDKoTT5fvgIWnKZ7/Ytsgb0oY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gQ9CET9EWCYBZ65v4/no2lhFxSBHPHFufGKjdv/jVC0GUiupeypFKhr3gdJWYe1Og w9qTd10FvFzoSvQLwO02FBEm+JFOFo7Eh4uibD0aLxZ0EsRd8kkxq7QEqoO4CDWobz MFqVDPz9+pak2CyqskHDBFTZhNi5LCz6LhqgTXhI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Janis Schoetterl-Glausch , Christian Borntraeger Subject: [PATCH 5.16 3/5] KVM: s390: Return error on SIDA memop on normal guest Date: Wed, 9 Feb 2022 20:14:35 +0100 Message-Id: <20220209191250.009221364@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220209191249.887150036@linuxfoundation.org> References: <20220209191249.887150036@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Janis Schoetterl-Glausch commit 2c212e1baedcd782b2535a3f86bc491977677c0e upstream. Refuse SIDA memops on guests which are not protected. For normal guests, the secure instruction data address designation, which determines the location we access, is not under control of KVM. Fixes: 19e122776886 (KVM: S390: protvirt: Introduce instruction data area bounce buffer) Signed-off-by: Janis Schoetterl-Glausch Cc: stable@vger.kernel.org Signed-off-by: Christian Borntraeger Signed-off-by: Greg Kroah-Hartman --- arch/s390/kvm/kvm-s390.c | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -4711,6 +4711,8 @@ static long kvm_s390_guest_sida_op(struc return -EINVAL; if (mop->size + mop->sida_offset > sida_size(vcpu->arch.sie_block)) return -E2BIG; + if (!kvm_s390_pv_cpu_is_protected(vcpu)) + return -EINVAL; switch (mop->op) { case KVM_S390_MEMOP_SIDA_READ: From patchwork Wed Feb 9 19:14:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 541737 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52347C433F5 for ; Wed, 9 Feb 2022 19:27:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235102AbiBIT1Z (ORCPT ); Wed, 9 Feb 2022 14:27:25 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:46076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235222AbiBIT0e (ORCPT ); Wed, 9 Feb 2022 14:26:34 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D890E00E262; Wed, 9 Feb 2022 11:19:18 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9A97BB82389; Wed, 9 Feb 2022 19:15:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D703DC340E7; Wed, 9 Feb 2022 19:15:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644434144; bh=PqONi1GkjZKoc6dk/U8NdQWip3lI+pZwr6JwSkDsVCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dNe476sz6jo/iVLlime0rLYP9reLGh8ffDGUZa5Vn00zgC05cE81FP5yMGnG6JVFV /q2QIH1h15yj3qL9yytOk1XEGCJirECBMfOOBiNpD91Bht+RyURAnyqLO/TvNDaxeZ qJKWd1ZCy2W4gc0oVrq3OiuR2cNWwVwwg3zxG0+c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steve French , Steve French , Namjae Jeon Subject: [PATCH 5.15 4/5] ksmbd: fix SMB 3.11 posix extension mount failure Date: Wed, 9 Feb 2022 20:14:29 +0100 Message-Id: <20220209191250.132189906@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220209191249.980911721@linuxfoundation.org> References: <20220209191249.980911721@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Namjae Jeon commit 9ca8581e79e51c57e60b3b8e3b89d816448f49fe upstream. cifs client set 4 to DataLength of create_posix context, which mean Mode variable of create_posix context is only available. So buffer validation of ksmbd should check only the size of Mode except for the size of Reserved variable. Fixes: 8f77150c15f8 ("ksmbd: add buffer validation for SMB2_CREATE_CONTEXT") Cc: stable@vger.kernel.org # v5.15+ Reported-by: Steve French Tested-by: Steve French Signed-off-by: Namjae Jeon Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- fs/ksmbd/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ksmbd/smb2pdu.c +++ b/fs/ksmbd/smb2pdu.c @@ -2690,7 +2690,7 @@ int smb2_open(struct ksmbd_work *work) (struct create_posix *)context; if (le16_to_cpu(context->DataOffset) + le32_to_cpu(context->DataLength) < - sizeof(struct create_posix)) { + sizeof(struct create_posix) - 4) { rc = -EINVAL; goto err_out1; } From patchwork Wed Feb 9 19:14:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 541736 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10252C43217 for ; Wed, 9 Feb 2022 19:27:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235234AbiBIT10 (ORCPT ); Wed, 9 Feb 2022 14:27:26 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:46724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234283AbiBIT0r (ORCPT ); Wed, 9 Feb 2022 14:26:47 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75A1FE00E268; Wed, 9 Feb 2022 11:19:16 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7458661981; Wed, 9 Feb 2022 19:15:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A2C8C340E7; Wed, 9 Feb 2022 19:15:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644434149; bh=NNc+7Y0huyvzPtYU7fhizoIjK1Exh4LxPSeoyJjDrRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B41GUDSDg7IUnEg/ob37dwh7rMBV32XE0SMP2RA3PfKYBeYicpFQUmOHiZB6cz2T6 xspszoAINY8Ht2UTycYwy3h9AvxmR1ufG/taiSuangxdjGPj9mq/SJzYLXjvnHRjw+ H+hvVNKy7bXCqvQJQMZd+R1bvrucT7R33u8x66zU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jan Beulich , Herbert Xu Subject: [PATCH 5.15 5/5] crypto: api - Move cryptomgr soft dependency into algapi Date: Wed, 9 Feb 2022 20:14:30 +0100 Message-Id: <20220209191250.163703971@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220209191249.980911721@linuxfoundation.org> References: <20220209191249.980911721@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Herbert Xu commit c6ce9c5831cae515d375a01b97ae1778689acf19 upstream. The soft dependency on cryptomgr is only needed in algapi because if algapi isn't present then no algorithms can be loaded. This also fixes the case where api is built-in but algapi is built as a module as the soft dependency would otherwise get lost. Fixes: 8ab23d547f65 ("crypto: api - Add softdep on cryptomgr") Reported-by: Jan Beulich Signed-off-by: Herbert Xu Tested-by: Jan Beulich Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- crypto/algapi.c | 1 + crypto/api.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -1277,3 +1277,4 @@ module_exit(crypto_algapi_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Cryptographic algorithms API"); +MODULE_SOFTDEP("pre: cryptomgr"); --- a/crypto/api.c +++ b/crypto/api.c @@ -603,4 +603,3 @@ EXPORT_SYMBOL_GPL(crypto_req_done); MODULE_DESCRIPTION("Cryptographic core API"); MODULE_LICENSE("GPL"); -MODULE_SOFTDEP("pre: cryptomgr");