Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3891955pxb; Fri, 4 Feb 2022 20:42:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVGs9Jlbi7UKr3El0aJpy6HZfLmOlFHGTTvcF3mPnhXdhEwmlkJnE080hJAAdEGXUO7sVZ X-Received: by 2002:a17:90b:1b52:: with SMTP id nv18mr6887187pjb.136.1644036130262; Fri, 04 Feb 2022 20:42:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644036130; cv=none; d=google.com; s=arc-20160816; b=Z2YJUpcMyRKSkQs/raIIAxz6CI8GSl1R4w9bdgn9K8Q3ELhNM5BRq3B8fF1LOrWF58 d2UtWcLuQbb6+GRS9sBAqCKPlIeGpmasvmanJyCI8W01jJT2691nLx1uUjQnB7RvU6O5 QK4cpowYDHcAfzJ7A+jK5Oi7Div+7rCwW7Dok2BXJ+ODiq1ZdiqRwPWV/E3KxbnpBLLI remyvhuNr6fLzckHTXK2kSTzroVQDSVAGoaITFH77fwKAXb9kZVk5VPdEIU+yHxKddjO ZTSg9uRJJe6Fe64tgNt3OqyUPEDCqHgOObkDH78JZc6mWbaBtuNzqzy1KyiVumypO1hB aJyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GdztUW9x+fNlUtnFtFu79iJaJ/d/JZTADTo3wiUu4gM=; b=tZvXzxfgS2fdJVNrG+3B+swIvLYR5THimKK3rdxsa5yYIDy9fqiA0WOnZPbtAgln/b JPcqvxPAA9rgmvId7XxmYGxwA4jwDjWFAeO4l6RDpfoTYFsPTeZcA9fzrgrpUY7OQ34P 8ogFkAxZ59j3esy8oQgQrBZt8UhVXJojKzcVWkKSCDbHPu5SQ/5LKPfBkAi9cChwmHuZ XkwCtXrMi3ijt/TMlwn2lQtfHdEZULZyBMO3h8tUHOmvNsBQXhdAKyxML6nhKSYvA4OL ROTf/QdLA/JJ9tebIfwt5QIQXbFfGv1vlNVdMCjAlq33okXSejkjb8soiMjjdkvw6Dyo bJOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=x9OlGeOi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k63si3678310pgd.88.2022.02.04.20.41.58; Fri, 04 Feb 2022 20:42:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=x9OlGeOi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354858AbiBCUrE (ORCPT + 99 others); Thu, 3 Feb 2022 15:47:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356596AbiBCUq2 (ORCPT ); Thu, 3 Feb 2022 15:46:28 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9E4BC061182; Thu, 3 Feb 2022 12:44:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=GdztUW9x+fNlUtnFtFu79iJaJ/d/JZTADTo3wiUu4gM=; b=x9OlGeOiYglbofGb2DmfMM2Oo9 hss+jAkhZ0AARNGf568KH2t244lOnXoiaeDkHJh9y88XSCfM4zhuX/O1ioBRmln6FZ8C6LcvxurRn 9BmgtvJh4O/xQJt5oCpe0LroEeYOhiR9ggMfxD+hCpj6XY8Tq+cFXyn9gzdRRPNndvGBKGm/V++RT f56uVTLAp09p4IhpQeRdFSMw/NxMS1bYkXbDtLOdXU1SGwYn5ymmgLTLui08mbPMHtzmJ64zVl0An p+vlKFaDtvUUgWMLwJ1bH8t5X1lTR/S94kMYPRbINNXfcsmdzm7HEZBnG/ol/aVX7WM9fYJ3HxNw/ nqdt8xjQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFiyA-002piX-Io; Thu, 03 Feb 2022 20:44:42 +0000 Date: Thu, 3 Feb 2022 12:44:42 -0800 From: Luis Chamberlain To: Christophe Leroy Cc: "atomlin@redhat.com" , "linux-modules@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH 1/2] modules: Make module_enable_x() independant of CONFIG_ARCH_HAS_STRICT_MODULE_RWX Message-ID: References: <203348805c9ac9851d8939d15cb9802ef047b5e2.1643919758.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <203348805c9ac9851d8939d15cb9802ef047b5e2.1643919758.git.christophe.leroy@csgroup.eu> Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 03, 2022 at 08:23:25PM +0000, Christophe Leroy wrote: > module_enable_x() has nothing to do with CONFIG_ARCH_HAS_STRICT_MODULE_RWX > allthough by coincidence architectures who need module_enable_x() are > selection CONFIG_ARCH_HAS_STRICT_MODULE_RWX. > > Enable module_enable_x() for everyone everytime. If an architecture > already has module text set executable, it's a no-op. > > Only check end boundary if CONFIG_STRICT_MODULE_RWX is set, and > make sure we entirely get the last page when the boundary is not > aligned. When CONFIG_STRICT_MODULE_RWX is not selected, it is not > a big deal to have the start of data as executable. > > Signed-off-by: Christophe Leroy Thanks! Both patches look good to me! I can merge this once Aaron's then your's and then Michal's KEXEC stuff gets merged. Luis