Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp891310yba; Wed, 3 Apr 2019 23:20:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkybKWEEcFHVQhc/qvniyTRsSHvcAdf9AfjTBD739mfipIuywwazP4hXwMfd3Dn/B5LK74 X-Received: by 2002:a17:902:9004:: with SMTP id a4mr4544446plp.223.1554358853027; Wed, 03 Apr 2019 23:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554358853; cv=none; d=google.com; s=arc-20160816; b=aBiRbyG9dQ/YqZAQ8TpdRdRdgDbCsnqKeZTRsEiLQ6pSAqWIgbrob0vy/5o+69LC6Y yJy+Ucts2lwwvyzfMyPUGRlc4yyI9vN0RxyhneUfaupt9BvlTLu+RMViv9q0K3uJOLmI vCSK5QOuBcCyGNlRlElnkhlYXfkNy1rijuxIzIP2ELgV59H13CcFDP/0o02AbTfpfsYy vvZzBADvu4ZtDDn7IbuY5W0ahiot6X+3bBLQx4B6G9bEBfWmPndALiUTZFJOeBvh83hI P57ANxvHGL0w6UTaVDCvgvCvOeuzts/bTVIwcVqULbIQzuPsYD7zi4w/YQ6CJwqcA8ue 6Z7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=baXddWLKQZsl5QGy9Ydx1WdYUNeZhr3axs6HcHv/NGs=; b=tRUbbJjrRxynEOYZ3AkKONpitVDzin4ktpyWomzOc0ymPdSni5as3wFdqThw6artGd SFpojVxfVi9K3OW3rpr9D4HgipgVkqVQriw1DeJQQOJ9VSfDE74G5zPvD+cikBhULdt6 4qfNF2bbXXQmnkRw0YNyX0HeeKnYQaE13u92PY2+/nPiimj5dumrTnBnx12EAbMQeEyo fwXjH/tKeLIuyREZm/wOR9VB6taQhaLmbo+llOR6BquL3MW/AOvXb+eiyyZy8Pkk3rUS FhQ4SD70uQ7DyQeIczuuKj1cCUL1C83b9phGNOVF6LomFMM+9NF5Weq006mcqk3RGAPq E/ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si15603491pgr.253.2019.04.03.23.20.37; Wed, 03 Apr 2019 23:20:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726618AbfDDGUD (ORCPT + 99 others); Thu, 4 Apr 2019 02:20:03 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:51827 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725927AbfDDGUC (ORCPT ); Thu, 4 Apr 2019 02:20:02 -0400 X-Originating-IP: 79.86.19.127 Received: from alex.numericable.fr (127.19.86.79.rev.sfr.net [79.86.19.127]) (Authenticated sender: alex@ghiti.fr) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 942911C0003; Thu, 4 Apr 2019 06:19:59 +0000 (UTC) From: Alexandre Ghiti To: Martin Schwidefsky , Heiko Carstens , Kees Cook , Andrew Morton , Alexandre Ghiti , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] s390: mmap base does not depend on ADDR_NO_RANDOMIZE personality Date: Thu, 4 Apr 2019 02:19:56 -0400 Message-Id: <20190404061956.25507-1-alex@ghiti.fr> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org randomize_stack_top() checks for current task flag PF_RANDOMIZE in order to use stack randomization and PF_RANDOMIZE is set when ADDR_NO_RANDOMIZE is unset, so no need to check for ADDR_NO_RANDOMIZE in stack_maxrandom_size. Signed-off-by: Alexandre Ghiti --- arch/s390/mm/mmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index 687f2a4d3459..5185ed0a0463 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c @@ -24,8 +24,7 @@ static unsigned long stack_maxrandom_size(void) { if (!(current->flags & PF_RANDOMIZE)) return 0; - if (current->personality & ADDR_NO_RANDOMIZE) - return 0; + return STACK_RND_MASK << PAGE_SHIFT; } -- 2.20.1