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 70B35C43217 for ; Thu, 3 Feb 2022 05:39:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236606AbiBCFjL (ORCPT ); Thu, 3 Feb 2022 00:39:11 -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 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 49D98C433EF for ; Thu, 3 Feb 2022 05:39:53 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Jq6tv3nTwz3cRW for ; Thu, 3 Feb 2022 16:39:51 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=rMj6cjmE; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ellerman.id.au (client-ip=2404:9400:2221:ea00::3; helo=gandalf.ozlabs.org; envelope-from=mpe@ellerman.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=rMj6cjmE; dkim-atps=neutral Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Jq6t74zpWz3bT6 for ; Thu, 3 Feb 2022 16:39:10 +1100 (AEDT) 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 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 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-arch@vger.kernel.org" , "kgdb-bugreport@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Paul Mackerras , Jessica Yu , "linuxppc-dev@lists.ozlabs.org" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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