Message ID | e500ba42c80104f67413bcf266a444187ee796fb.1637862579.git.christophe.leroy@csgroup.eu (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B281C433F5 for <linux-mm@archiver.kernel.org>; Thu, 25 Nov 2021 17:54:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CABB16B0075; Thu, 25 Nov 2021 12:53:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C5B606B0078; Thu, 25 Nov 2021 12:53:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B225C6B007B; Thu, 25 Nov 2021 12:53:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0174.hostedemail.com [216.40.44.174]) by kanga.kvack.org (Postfix) with ESMTP id A4C936B0075 for <linux-mm@kvack.org>; Thu, 25 Nov 2021 12:53:49 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 687318F167 for <linux-mm@kvack.org>; Thu, 25 Nov 2021 17:53:39 +0000 (UTC) X-FDA: 78848200116.20.3EE3105 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by imf15.hostedemail.com (Postfix) with ESMTP id 9911ED0000A8 for <linux-mm@kvack.org>; Thu, 25 Nov 2021 17:53:33 +0000 (UTC) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4J0QTp6JH7z9sT8; Thu, 25 Nov 2021 18:53:34 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l-4NhaPl9uSA; Thu, 25 Nov 2021 18:53:34 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4J0QTm6gg8z9sSV; Thu, 25 Nov 2021 18:53:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CFEE48B77D; Thu, 25 Nov 2021 18:53:32 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id ytco0n1k7Atg; Thu, 25 Nov 2021 18:53:32 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [192.168.203.227]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 238EE8B780; Thu, 25 Nov 2021 18:53:32 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 1APHrKTJ385535 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 25 Nov 2021 18:53:20 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 1APHrKW9385534; Thu, 25 Nov 2021 18:53:20 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy <christophe.leroy@csgroup.eu> To: Benjamin Herrenschmidt <benh@kernel.crashing.org>, Paul Mackerras <paulus@samba.org>, Michael Ellerman <mpe@ellerman.id.au>, alex@ghiti.fr Cc: Christophe Leroy <christophe.leroy@csgroup.eu>, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org Subject: [PATCH v2 rebased 6/9] mm: Allow arch specific arch_randomize_brk() with CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT Date: Thu, 25 Nov 2021 18:52:55 +0100 Message-Id: <e500ba42c80104f67413bcf266a444187ee796fb.1637862579.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.33.1 In-Reply-To: <cover.1637862579.git.christophe.leroy@csgroup.eu> References: <cover.1637862579.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1637862776; l=1197; s=20211009; h=from:subject:message-id; bh=RT3kMLUaGZCsXKmi+EcLtq6XwPH2sPocS4v2Vp1A0vA=; b=lVL2asqtQElVmxcwyqk+DGRflSqXxlxWl96Ce5KrP2J85WXYSM1ZsCcJ/fJhVfkW63A1aUqCoMV/ 0hUAl8dbAioBdXdmINfMDvsHXTYrXPhc8uQ9Qr9Y6U6T/fEwA0RR X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 9911ED0000A8 X-Stat-Signature: 6ytcj5sa7s9kw5kfggk898zmf6qwnimf Authentication-Results: imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=none X-HE-Tag: 1637862813-932388 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Convert powerpc to default topdown mmap layout
|
expand
|
diff --git a/mm/util.c b/mm/util.c index e58151a61255..7eb69f697b38 100644 --- a/mm/util.c +++ b/mm/util.c @@ -344,7 +344,7 @@ unsigned long randomize_stack_top(unsigned long stack_top) } #ifdef CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT -unsigned long arch_randomize_brk(struct mm_struct *mm) +unsigned long __weak arch_randomize_brk(struct mm_struct *mm) { /* Is the current task 32bit ? */ if (!IS_ENABLED(CONFIG_64BIT) || is_compat_task())
Commit e7142bf5d231 ("arm64, mm: make randomization selected by generic topdown mmap layout") introduced a default version of arch_randomize_brk() provided when CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT is selected. powerpc could select CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT but needs to provide its own arch_randomize_brk(). In order to allow that, define generic version of arch_randomize_brk() as a __weak symbol. Cc: Alexandre Ghiti <alex@ghiti.fr> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- v2: Make the generic version of it a __weak symbol instead of a messy play with CONFIG_ items. --- mm/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)