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 X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49EFCC76186 for ; Wed, 24 Jul 2019 17:11:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2222021911 for ; Wed, 24 Jul 2019 17:11:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iZa63oZ3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2222021911 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=PAh11TfjEAeuA5nL1F+jjlGm4cLKTCrPE5C8vDzgtKg=; b=iZa63oZ3GVXkMC mQWPxISbbxWFW0hA9zpJstzVM0zG0VAbkxvvJniaoggC/aLLMxtnwJTRIa9Tq3jfFdQJVl3XZnh4w h7D9uVYDDQkhswincld4q4MDD2ciRqWKivlfPvIIdhhQcnhIBFmzwOI3d+9+z9vvxHFCE2AORDKTY MM3sbxNIGSLubCe4JTuPkWbJ7SpJNBblwEoqv5eNYviqZMFVBLWevlCaRWaVjan0kaF/HLZhHXTtJ QU5Ehaq0vINintVZWIIzzLFwoNCWEPL+r6k8lO+2uaRjPFpwdHWXTCamUifKw6uqPXN74wHR078mk hhb9B7eCxOSrHt4baTkQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hqKna-0005CA-Mf; Wed, 24 Jul 2019 17:11:30 +0000 Received: from mail-pl1-f194.google.com ([209.85.214.194]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hqKnX-0005BP-LV; Wed, 24 Jul 2019 17:11:28 +0000 Received: by mail-pl1-f194.google.com with SMTP id k8so22261419plt.3; Wed, 24 Jul 2019 10:11:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ITF8T/T4IRmGXwtRff4SYZQW9zAOexuz5C2yXEWqdiw=; b=FPWb9H92BtSELvERavsb0wcIkW0GN7R34s+zep29X/w6uQCSQnF57FoMemDaZdj83n ciTlay1Id9ssbJcROQOlQHD2AWlhbRVteOcc2Ns7y1HHQKF8B9qQNl5hhx8J9SO3HI03 SXXjPZ0hQJqAkFsGYHlSW3Am107w89seAZaxbyR+0WX8L91lkP5EKOlvfO3R5OMScV2D Kz6MqQ+4tFMeETLS+7QxIl71m8ZTdnaA4d2peYtqBWr9M3ZXPDnWkJu0oAyvC3bXUU/7 KoDE3paLADdtoVWma12+IfHYeRw6pRe23KAtdinbx+v1G2/hb78CQm4hPba7llKgJm/Y sQ7A== X-Gm-Message-State: APjAAAXhpUNwukcUQbW6VLjI4+WUeUujf1+vaVcqqClzyGPoe38wl6hn W5FHIVnI0bqeFFkTEnjAfLLwyKb0 X-Google-Smtp-Source: APXvYqwoAqWJaD8G9kpqywHtKCy/l+Vyxr3KKHtKTaJVbqukgpdEilFdeN9cgx3TW9bJG3WUBlH/LA== X-Received: by 2002:a17:902:7488:: with SMTP id h8mr12079513pll.168.1563988285727; Wed, 24 Jul 2019 10:11:25 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id h16sm51887353pfo.34.2019.07.24.10.11.24 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 10:11:24 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id BEECC402A1; Wed, 24 Jul 2019 17:11:23 +0000 (UTC) Date: Wed, 24 Jul 2019 17:11:23 +0000 From: Luis Chamberlain To: Alexandre Ghiti Subject: Re: [PATCH REBASE v4 05/14] arm64, mm: Make randomization selected by generic topdown mmap layout Message-ID: <20190724171123.GV19023@42.do-not-panic.com> References: <20190724055850.6232-1-alex@ghiti.fr> <20190724055850.6232-6-alex@ghiti.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190724055850.6232-6-alex@ghiti.fr> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190724_101127_708520_6202E948 X-CRM114-Status: GOOD ( 12.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Albert Ou , Kees Cook , Catalin Marinas , Palmer Dabbelt , Will Deacon , Russell King , Ralf Baechle , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Paul Burton , linux-riscv@lists.infradead.org, Alexander Viro , James Hogan , linux-fsdevel@vger.kernel.org, Andrew Morton , linux-mips@vger.kernel.org, Christoph Hellwig , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jul 24, 2019 at 01:58:41AM -0400, Alexandre Ghiti wrote: > diff --git a/mm/util.c b/mm/util.c > index 0781e5575cb3..16f1e56e2996 100644 > --- a/mm/util.c > +++ b/mm/util.c > @@ -321,7 +321,15 @@ unsigned long randomize_stack_top(unsigned long stack_top) > } > > #ifdef CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT > -#ifdef CONFIG_ARCH_HAS_ELF_RANDOMIZE > +unsigned long arch_randomize_brk(struct mm_struct *mm) > +{ > + /* Is the current task 32bit ? */ > + if (!IS_ENABLED(CONFIG_64BIT) || is_compat_task()) > + return randomize_page(mm->brk, SZ_32M); > + > + return randomize_page(mm->brk, SZ_1G); > +} > + > unsigned long arch_mmap_rnd(void) > { > unsigned long rnd; > @@ -335,7 +343,6 @@ unsigned long arch_mmap_rnd(void) > > return rnd << PAGE_SHIFT; > } So arch_randomize_brk is no longer ifdef'd around CONFIG_ARCH_HAS_ELF_RANDOMIZE either and yet the header still has it. Is that intentional? Luis _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel