Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3121553pxb; Fri, 4 Feb 2022 01:38:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVX0HhG8ahDlbW/Ye6kMgU1XtKL9K4S94v8UzmahviXKfKD2hRUZKk4UZnoejL1ZImeKFt X-Received: by 2002:a50:cccb:: with SMTP id b11mr2150721edj.57.1643967486056; Fri, 04 Feb 2022 01:38:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643967486; cv=none; d=google.com; s=arc-20160816; b=NDpcHebSX1zvcJNFbeFF8OrP5csbVPofJhbRZ6AHW5mk8m6Ihl/GatBEhzu56/9vQa qYKn0LxsJY7BqMeicJ7CCAJxbE7fFJM0TEskjjcWanzcW6Jqp5ywW9lw6fnA1aSm8WZK v33wbxQw+nRIY6vzXhE0octyzQI+3yXj0phNWXrhKpYX8pvm0NhOG8DSSadpMiFQLE2m Nr66vbhykTV9VH71Tt5sz+/vkMl43FzJOCG/XVDwXJ1qOPym5yciQfIJ0d8uH2VFHoTH rCJaFohnN/mZZKVEiyUB4EWpnTAd17C/NWNKAehwnL/0gxepD4SC9hCZnUki6QtJ/ani KLjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=5ypoksyewD1/1A0wIikcTAQpbuRBIVCFLpLku2DM1UQ=; b=gp+fJlPLdw/kPD4/pJjsXGj65gfUAi+LSv7x0aIo4Rsti+IuBQimYy/dxFix0y5X3N R9oB+XLCJDGIzEpzyD+CgcgoOeMYzQEhI/dbtr8Nx30j+DttQt6+HGZ3PC9NzpKpnmYn FRiX2XlKRZdtVynja0Lr64fq1gh428GlsMwcFWcmP6W6WJX9UID7qD0ZDsVls1LJ3uup SPUXAOj3o9MkRyahQyd5aHfpIcRbCfHAHPt6t3xQRwezex5xlGS/FgeZX1hfcV51IGyR 0LJKCrMnoABP2+FPTROe9ZWcBjNAApHflgi4iCuoCaQC2OIuVu6F64t2R73pa5BHa4eC 901Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=rMj6cjmE; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht11si816107ejc.275.2022.02.04.01.37.38; Fri, 04 Feb 2022 01:38:05 -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=@ellerman.id.au header.s=201909 header.b=rMj6cjmE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236601AbiBCFjJ (ORCPT + 99 others); Thu, 3 Feb 2022 00:39:09 -0500 Received: from gandalf.ozlabs.org ([150.107.74.76]:55263 "EHLO gandalf.ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234559AbiBCFjJ (ORCPT ); Thu, 3 Feb 2022 00:39:09 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Jq6sz71xZz4xmk; Thu, 3 Feb 2022 16:39:03 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1643866745; bh=5ypoksyewD1/1A0wIikcTAQpbuRBIVCFLpLku2DM1UQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=rMj6cjmEUS8Wn69koaMHGmWtpyj6ZO2nAuoyXA+oWiHfj2yhSyVXHPcjxkz5zmpZD WdOsbHhM5IN8Sxx+y5AE3lyjCEc+r5KfaNZza81P6gEszI/6eIqJvUMkHlMNrCqRMu MD3TSoNfM8O0TEuisU+c7WgVCaJ0RpIOaxUzrqSEcepCdb37tklQLk/xwJqw3N68Zc ulZFnLmU1XaXdjsexrU4b+S2Ms2cXvBTRrkylee8pfYCCllBETW7Tbn5AerQ5uFqCQ 6bgj65lt4gPCXOpWLgub/FKbqZZkFeTJz7NSunJt46xMtkybfJYQqzJUkDijOk7idk 3YDBVgFFETn3w== From: Michael Ellerman To: Luis Chamberlain , Christophe Leroy Cc: Jessica Yu , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "kgdb-bugreport@lists.sourceforge.net" , "linux-mm@kvack.org" , "linux-arch@vger.kernel.org" , Benjamin Herrenschmidt , Paul Mackerras Subject: Re: [PATCH v2 5/5] powerpc: Select ARCH_WANTS_MODULES_DATA_IN_VMALLOC on book3s/32 and 8xx In-Reply-To: References: Date: Thu, 03 Feb 2022 16:39:02 +1100 Message-ID: <87h79gmrux.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Luis Chamberlain writes: > On Thu, Jan 27, 2022 at 11:28:12AM +0000, Christophe Leroy wrote: >> book3s/32 and 8xx have a separate area for allocating modules, >> defined by MODULES_VADDR / MODULES_END. >> >> On book3s/32, it is not possible to protect against execution >> on a page basis. A full 256M segment is either Exec or NoExec. >> The module area is in an Exec segment while vmalloc area is >> in a NoExec segment. >> >> In order to protect module data against execution, select >> ARCH_WANTS_MODULES_DATA_IN_VMALLOC. >> >> For the 8xx (and possibly other 32 bits platform in the future), >> there is no such constraint on Exec/NoExec protection, however >> there is a critical distance between kernel functions and callers >> that needs to remain below 32Mbytes in order to avoid costly >> trampolines. By allocating data outside of module area, we >> increase the chance for module text to remain within acceptable >> distance from kernel core text. >> >> So select ARCH_WANTS_MODULES_DATA_IN_VMALLOC for 8xx as well. >> >> Signed-off-by: Christophe Leroy >> Cc: Michael Ellerman >> Cc: Benjamin Herrenschmidt >> Cc: Paul Mackerras > > Cc list first and then the SOB. Just delete the Cc: list, it's meaningless. cheers