Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4376920ybz; Mon, 20 Apr 2020 22:35:50 -0700 (PDT) X-Google-Smtp-Source: APiQypJx6SaVyk1JSfN8i14r55Lu02273M1SkVET8qHN7d1A0YKfs2vaOZLKMP/6rDp5MbvHxzCy X-Received: by 2002:a17:906:1fd6:: with SMTP id e22mr19896955ejt.150.1587447349895; Mon, 20 Apr 2020 22:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587447349; cv=none; d=google.com; s=arc-20160816; b=qqlQI0fnBYqV2RaHUFWEKkOFFQgaf1haYBQ1MFRqhnnIM0GocuZVxLQOqTOQLPZdwu AeE3JotVP3WtTIIgxfQDtnX6bd0i/2xDuFF82JhbU58th1OZosTEfmhG20Dxi8ZaiMUy olCY0DxJsAFtYfX0tXfLknxwHklaEP3jxrl+dOmDk0XO8cUJpudgrefetCb0l71pHFay BYOwUAekcnEePZfVi+Ad6pgQbWFuEO2C3Bu/kyCrxokIgFis9GkRjQjhiuirHkji6nZH 6hk8Zl2teGHoICoqv2b3+B+cjI/mS4V6IMv0h0ggf82BMoGQml/dA0XQrZQiCnc+yyWp yMAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=IFzPQ/7Jvd3o2sAQ+ZlLJkaw9kH5U2GfTl7Qezz0eHo=; b=lTzXvN5EzrAKQXlAPs6qiAE/p1FvPfjQyMEcrtZjIlh/+PEZ/b5fLSfnarQ0VGhB8H D/Xsiuj3AJyiLg4lkz2waeueSxh9wXqBrfY0d/TYLpVQfKmR3HWLai+hlF0mYPL7V2vU kUWt08qyipuVwqKdbFV2ma39o2/yuW1Q6PmXaUOM1VkP3Kd5nvrpGnwY8XF1dl8OIx8S tF19MCxPPsdZcdCMI+z2vBFhilkozcH43+yVZPTEdbU/2vkGjWlaqiW2JrvaTog7vQIv aUywL7bCV6EmJoZZAZaisIapMg0N0gL38DPfcjBtpEjx4AEdXNXT74TXLH/gNHsfA6pC lYyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id t21si1051772edq.436.2020.04.20.22.35.12; Mon, 20 Apr 2020 22:35:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1725940AbgDUF3y (ORCPT + 99 others); Tue, 21 Apr 2020 01:29:54 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:7372 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725881AbgDUF3y (ORCPT ); Tue, 21 Apr 2020 01:29:54 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03L53AAd126624 for ; Tue, 21 Apr 2020 01:29:52 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0b-001b2d01.pphosted.com with ESMTP id 30gc2wr20k-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 21 Apr 2020 01:29:52 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 21 Apr 2020 06:29:07 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 21 Apr 2020 06:29:05 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 03L5TmQg3277060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Apr 2020 05:29:48 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1227A52051; Tue, 21 Apr 2020 05:29:48 +0000 (GMT) Received: from oc3871087118.ibm.com (unknown [9.145.22.247]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id C804B5204E; Tue, 21 Apr 2020 05:29:47 +0000 (GMT) Date: Tue, 21 Apr 2020 07:29:46 +0200 From: Alexander Gordeev To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 2/2] mm/mmap.c: do not allow mappings outside of allowed limits References: <20200420195903.93455e087985b423f97bdfe3@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200420195903.93455e087985b423f97bdfe3@linux-foundation.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 20042105-4275-0000-0000-000003C3BBEB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20042105-4276-0000-0000-000038D93F74 Message-Id: <20200421052945.GA26279@oc3871087118.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-21_01:2020-04-20,2020-04-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 impostorscore=0 phishscore=0 spamscore=0 malwarescore=0 mlxlogscore=716 lowpriorityscore=0 suspectscore=0 bulkscore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004210043 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 20, 2020 at 07:59:03PM -0700, Andrew Morton wrote: > On Mon, 23 Mar 2020 14:29:29 +0100 agordeev@linux.ibm.com wrote: > > > It is possible to request a fixed mapping address below > > mmap_min_addr and succeed. This update adds early checks > > of mmap_min_addr and mmap_end boundaries and fixes the > > above issue. > > Does this solve any known problems? If not, what is the motivation for > the change? One can set a lowest possible address in /proc/sys/vm/mmap_min_addr and mmap below that bound nevertheless. Apart from it is wrong I am not aware of any existing issue. Thanks!