From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 61D9AC433F5 for ; Mon, 28 Feb 2022 18:36:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ADxNJhnWH/u+Eeff680w0YM0RCR4ZhSrmLfCovV+4Y8=; b=jk5akGq04OX7tP MtmB0KVQTvxROGchfbR96YqX0qNlWhNvwvEtr1qJ7G5JiXQzP4iWRe4UKLliWNHfPxUlTvbnA/Vlv vGy5lRKZWHQkn6G/InHUagxL5XO6R/xIDlW8yq0niB/0Ofog9Mj5fvS5OjaAImmNRkD5XD8jB/VfS F8p0q+Vb/Yf+tVxYbkoqAwfmzo/a9y5D26it0EBhIL4Y1kAhyfk80HSZfo34Feg+IkaiymMYb8Fsg 8Io+/fgB4rI3oRTCNlQcyDY0Cns3GZNY4DJAqzGYRcSaRewbG26xBwGJzb/Bv8YjQ37bLxMRKfhBc JCCTDtJKzAeJE1TNEXsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOkrI-00DipZ-BX; Mon, 28 Feb 2022 18:34:56 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOkrF-00Dip4-PL for linux-arm-kernel@lists.infradead.org; Mon, 28 Feb 2022 18:34:55 +0000 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 7B4DB61516; Mon, 28 Feb 2022 18:34:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69FC7C340E7; Mon, 28 Feb 2022 18:34:50 +0000 (UTC) Date: Mon, 28 Feb 2022 18:34:46 +0000 From: Catalin Marinas To: David Engraf Cc: suzuki.poulose@arm.com, will@kernel.org, broonie@kernel.org, mark.rutland@arm.com, elver@google.com, ebiederm@xmission.com, seanjc@google.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: signal: nofpsimd: Do not allocate fp/simd context when not available Message-ID: References: <20220225104008.820289-1-david.engraf@sysgo.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220225104008.820289-1-david.engraf@sysgo.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220228_103453_907558_0B3853E8 X-CRM114-Status: GOOD ( 15.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Feb 25, 2022 at 11:40:08AM +0100, David Engraf wrote: > Commit 6d502b6ba1b2 ("arm64: signal: nofpsimd: Handle fp/simd context for > signal frames") introduced saving the fp/simd context for signal handling > only when support is available. But setup_sigframe_layout() always > reserves memory for fp/simd context. The additional memory is not touched > because preserve_fpsimd_context() is not called and thus the magic is > invalid. > > This may lead to an error when parse_user_sigframe() checks the fp/simd > area and does not find a valid magic number. > > Signed-off-by: David Engraf Given that it's not a regression, I wouldn't push it at -rc7. But if Will picks it up for 5.18, I think it's worth adding: Fixes: 6d502b6ba1b2 ("arm64: signal: nofpsimd: Handle fp/simd context for signal frames") Cc: # 5.6.x With that: Reviewed-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 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 4E8A4C433EF for ; Mon, 28 Feb 2022 18:40:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237611AbiB1SlU (ORCPT ); Mon, 28 Feb 2022 13:41:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240804AbiB1Sk6 (ORCPT ); Mon, 28 Feb 2022 13:40:58 -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 5C1FF559D for ; Mon, 28 Feb 2022 10:34:53 -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 DE5EF61518 for ; Mon, 28 Feb 2022 18:34:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69FC7C340E7; Mon, 28 Feb 2022 18:34:50 +0000 (UTC) Date: Mon, 28 Feb 2022 18:34:46 +0000 From: Catalin Marinas To: David Engraf Cc: suzuki.poulose@arm.com, will@kernel.org, broonie@kernel.org, mark.rutland@arm.com, elver@google.com, ebiederm@xmission.com, seanjc@google.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: signal: nofpsimd: Do not allocate fp/simd context when not available Message-ID: References: <20220225104008.820289-1-david.engraf@sysgo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220225104008.820289-1-david.engraf@sysgo.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 25, 2022 at 11:40:08AM +0100, David Engraf wrote: > Commit 6d502b6ba1b2 ("arm64: signal: nofpsimd: Handle fp/simd context for > signal frames") introduced saving the fp/simd context for signal handling > only when support is available. But setup_sigframe_layout() always > reserves memory for fp/simd context. The additional memory is not touched > because preserve_fpsimd_context() is not called and thus the magic is > invalid. > > This may lead to an error when parse_user_sigframe() checks the fp/simd > area and does not find a valid magic number. > > Signed-off-by: David Engraf Given that it's not a regression, I wouldn't push it at -rc7. But if Will picks it up for 5.18, I think it's worth adding: Fixes: 6d502b6ba1b2 ("arm64: signal: nofpsimd: Handle fp/simd context for signal frames") Cc: # 5.6.x With that: Reviewed-by: Catalin Marinas