Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8171678ybn; Tue, 1 Oct 2019 04:25:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXLj4p+6pUqtELo79NIo99h7hLunF+LeNIAfK0Hw0Jio7/QS6Yo+8KCxCf5WgwbBKLFLey X-Received: by 2002:a17:906:fc2:: with SMTP id c2mr23280995ejk.261.1569929129231; Tue, 01 Oct 2019 04:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569929129; cv=none; d=google.com; s=arc-20160816; b=iC921ArLq7iIH0gS/4oSh98JWKFdyQt/Ekc/Bk7ZuA+87INm6GoFBc84wDkRzzGQv6 9tbI3cUT92bIXCkVsbJDuqUECDu2QdUMlwx5sUAgSwSqyO4tvyZeqrYydpb1nuzfWnXG P46ulp0HFQJSFbRmQ+uel1FtXwGzPkxqhehUvPzAjo5qNKr6pbuIzIq7i/005vd8h5Io KuI+Hiyf4VKpwCQwIFB7jhM0/FC9XeOzN8VI1HaD/OIr1RhUFgBfusy2A2GrA2pZcn/o 0GoiqSCohiU+YuKQl7ptndJa5xORKzF+fihgorkkj+bw2typvaZwTCCMax1qnFZg47FA LvVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=SZSjO6UNaZjumDTG5dmovcI4DXMpTOl7kZ7b++1MnZg=; b=mDa5xO6eYZQv9tXFSJKFHILDqAZq1jvntIfq69UJu77wCd2yQJp4DcT5CVyoK0LPD6 vhy9ZG6TqIfi626dBD1Gz5YpDveQL9f8Lc25IvcFJPBJM2KIgK3OomLlcmG1RcOFCYAJ s1VtsgZe/FNtaB+Pk3sjaJ5G9oYNRdIFfslA6RF73H2jsX7U8b73Iu6QsXY5bplKGGPv rxlAkCSgX/QhUCYS364yK9Ga4n78Z11JT19kK5PBAmxAOTdgobmsBuS0lbAm0Yr/DckL HzHUIivwG4tyJud+9akfsjr9UKy9RSnD0wZCCx7U2112GG9m6TMtE5V3lT6b73F8ThDv lB4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=JJL3Lir4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g15si8684258edm.349.2019.10.01.04.25.04; Tue, 01 Oct 2019 04:25:29 -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; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=JJL3Lir4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731466AbfJALVt (ORCPT + 99 others); Tue, 1 Oct 2019 07:21:49 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:44022 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731303AbfJALVs (ORCPT ); Tue, 1 Oct 2019 07:21:48 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x91BJMdV134962; Tue, 1 Oct 2019 11:21:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2019-08-05; bh=SZSjO6UNaZjumDTG5dmovcI4DXMpTOl7kZ7b++1MnZg=; b=JJL3Lir4saN5IQpMnoz8keJ7VHriQJoQelVTKKtN9O1Utf6j/1ZiDaq31hglj93UzB5a 09hZuKZ+bhzI78yUlpeS5JGE489b7tHQcwwiSTXEZh9lq1zBlnM9kjUW4D/7IIpDP096 lR/4hIUZzNzaoNGdhvz3j33JhgyNcixr9nUXDXuzY7y+/gdi0HxVbv/rxrz+M3BGUltK THZKcQMAz6XWAxiiXs1GPXiv+BgcUnTVU0xWV9HHCFsag+gML26Mzj/y0OL5XBfsVN3g I+Uk5AdlxbdLMEZzDsH0UA8InM0yI5tGcbJE33ejqNo8nrh2CHli8pQtykJqIYtYRC1q xw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 2va05rn1au-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 Oct 2019 11:21:29 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x91BI8SW046498; Tue, 1 Oct 2019 11:21:29 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 2vbnqcq6ht-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 Oct 2019 11:21:28 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x91BLR8j014531; Tue, 1 Oct 2019 11:21:27 GMT Received: from [192.168.0.110] (/73.243.10.6) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 01 Oct 2019 04:21:27 -0700 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.18\)) Subject: Re: [PATCH 14/15] mm: Align THP mappings for non-DAX From: William Kucharski In-Reply-To: <20191001104558.rdcqhjdz7frfuhca@box> Date: Tue, 1 Oct 2019 05:21:26 -0600 Cc: Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190925005214.27240-1-willy@infradead.org> <20190925005214.27240-15-willy@infradead.org> <20191001104558.rdcqhjdz7frfuhca@box> To: "Kirill A. Shutemov" X-Mailer: Apple Mail (2.3594.4.18) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9396 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910010104 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9396 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910010104 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Oct 1, 2019, at 4:45 AM, Kirill A. Shutemov = wrote: >=20 > On Tue, Sep 24, 2019 at 05:52:13PM -0700, Matthew Wilcox wrote: >>=20 >> diff --git a/mm/huge_memory.c b/mm/huge_memory.c >> index cbe7d0619439..670a1780bd2f 100644 >> --- a/mm/huge_memory.c >> +++ b/mm/huge_memory.c >> @@ -563,8 +563,6 @@ unsigned long thp_get_unmapped_area(struct file = *filp, unsigned long addr, >>=20 >> if (addr) >> goto out; >> - if (!IS_DAX(filp->f_mapping->host) || = !IS_ENABLED(CONFIG_FS_DAX_PMD)) >> - goto out; >>=20 >> addr =3D __thp_get_unmapped_area(filp, len, off, flags, = PMD_SIZE); >> if (addr) >=20 > I think you reducing ASLR without any real indication that THP is = relevant > for the VMA. We need to know if any huge page allocation will be > *attempted* for the VMA or the file. Without a properly aligned address the code will never even attempt = allocating a THP. I don't think rounding an address to one that would be properly aligned = to map to a THP if possible is all that detrimental to ASLR and without the = ability to pick an aligned address it's rather unlikely anyone would ever map = anything to a THP unless they explicitly designate an address with MAP_FIXED. If you do object to the slight reduction of the ASLR address space, what alternative would you prefer to see? -- Bill=