Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1755701ybi; Sat, 1 Jun 2019 03:57:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8LWa5YFJ64vEqRyZVW8Lz27F6isqEz29523e/bFxIhhyI5eSUjbX8RKea1AEM2+KAj3TK X-Received: by 2002:aa7:8d10:: with SMTP id j16mr1963108pfe.204.1559386631231; Sat, 01 Jun 2019 03:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559386631; cv=none; d=google.com; s=arc-20160816; b=MN3H5ITcQDU5obT784EQDQTyarf0PQwLW94VNF36S4yM5/NSOAcdJumVFZ48gbYYFK 7a8IkkiYwWKkoH/9aF57AzbdAMbYuUo0uCm+JsMwKfPOuUX4P2JsJQ6Hb7cSFqazphDt 9UnSRrl2vfdtja9hEYdzwUoaSdG2Ii3HZuTR7U4iZ2i4FHbcX6YxKLZUU67xkHacBz15 fyNq56/41lGHCT+WCpY6048x7tI3XzBZPStT01NI8sTaF0GrFx1CTw+flE9qpHrohSwG w3QrXMNJp3mmOG1Jr26vBUtLwCTNq7g7mnQudCD5Kom/eLJnpDu0YfKp5w+S9ZgBYUMt Y63g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=GDZtsTfbnwkBZGvXkjl3EMhcv+5/r+RwC4U1wNBEMlE=; b=GkFNuRAmDzEKs0drIrv7tJMMgaf2FNjbaZmrIyay75bV/rTGbuu7N9IqQ/AtQQGocY /beZnw4fsz13ZwdMKOiLBZAaNF5gbdsZmt5adU5A/Sep6vspoVCZvMJndB/z5r3EICXn OBL9Z05jdKeCXFX6nUXrZN7oBxTeNXDi5k859hTFGbRzyHpCrFLHrWNmosIrVxyB+jbB vjjtvw2Vk5xlHMp2qgn6gV7v9P94cmwhuxfTwzRCa2wtUt3QKtuRXe460xNTcYVO/Hns HEKDBB9o/zcl6YdB5oyl6PYGQ922cs/t+RMKJFLyIqapZRom664NONjiM60m16/Epz1h +9Jw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si9444610pgy.582.2019.06.01.03.56.54; Sat, 01 Jun 2019 03:57:11 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726881AbfFAKzo (ORCPT + 99 others); Sat, 1 Jun 2019 06:55:44 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33840 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbfFAKzo (ORCPT ); Sat, 1 Jun 2019 06:55:44 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x51Aq8b2012472 for ; Sat, 1 Jun 2019 06:55:43 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2sunvdb2nm-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 01 Jun 2019 06:55:43 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 1 Jun 2019 11:55:41 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sat, 1 Jun 2019 11:55:37 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x51AtacM57933938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 1 Jun 2019 10:55:36 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 98CEA4C046; Sat, 1 Jun 2019 10:55:36 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 59A584C040; Sat, 1 Jun 2019 10:55:36 +0000 (GMT) Received: from osiris (unknown [9.152.212.21]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Sat, 1 Jun 2019 10:55:36 +0000 (GMT) Date: Sat, 1 Jun 2019 12:55:35 +0200 From: Heiko Carstens To: Alexandre Ghiti Cc: Martin Schwidefsky , Kees Cook , Andrew Morton , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] s390: mmap base does not depend on ADDR_NO_RANDOMIZE personality References: <20190404061956.25507-1-alex@ghiti.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190404061956.25507-1-alex@ghiti.fr> X-TM-AS-GCONF: 00 x-cbid: 19060110-0020-0000-0000-00000342866D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19060110-0021-0000-0000-000021959394 Message-Id: <20190601105534.GG3600@osiris> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-01_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=966 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906010081 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 04, 2019 at 02:19:56AM -0400, Alexandre Ghiti wrote: > 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; Applied, thanks.