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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 285E2C47422 for ; Fri, 26 Jan 2024 10:51:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 97C016B0096; Fri, 26 Jan 2024 05:51:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 92C9E6B0099; Fri, 26 Jan 2024 05:51:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7F3956B009A; Fri, 26 Jan 2024 05:51:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 704FE6B0096 for ; Fri, 26 Jan 2024 05:51:16 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 124BA140E57 for ; Fri, 26 Jan 2024 10:51:16 +0000 (UTC) X-FDA: 81721145352.20.CA7AA35 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf25.hostedemail.com (Postfix) with ESMTP id BF5AFA0004 for ; Fri, 26 Jan 2024 10:51:13 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=fGIOLwN4; dkim=pass header.d=suse.com header.s=susede1 header.b=fGIOLwN4; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf25.hostedemail.com: domain of mhocko@suse.com designates 195.135.223.131 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706266274; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=AKzIutW8hDAK4Yw6RIwXdfNOLIMvd8A1PFtLwW1HzIw=; b=dItOtiPVrvAtgOqfU/rM+7RJMojsS/1pn/B6IdwRCXjABq9pLV8TiCf4MKKY5LHdp54rel +5ba0F3LAxv7KXzQbPEiLgIuTM4J68TImctdQaXlvuGULs+Pmz6ZNlrFdvHB2sCBIYaT+M ZM2c3bwIxsYmUIFbcTpkBgGkCjjneH0= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=fGIOLwN4; dkim=pass header.d=suse.com header.s=susede1 header.b=fGIOLwN4; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf25.hostedemail.com: domain of mhocko@suse.com designates 195.135.223.131 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706266274; a=rsa-sha256; cv=none; b=W8aX8Y8rCKeUJ7yHInJ/DozzJ6Hny6EwNeGm1tnYIl4H6Djo84yqoLoxlRJ1EjuIycKVlY QNg4hPxYO/FjnQS83jKxCfExQFDZD83Vz9ZMJYoYMw7GmCyagdF6bwgXNla0rFQ7lghLAB KmGkck2hQKnPz05zb2jl7KvfPVSWbWo= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DE5081FD38; Fri, 26 Jan 2024 10:51:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1706266271; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AKzIutW8hDAK4Yw6RIwXdfNOLIMvd8A1PFtLwW1HzIw=; b=fGIOLwN4bmCY1r4HCJArej9cCHFUJlh4hY9GoZm7zC21iLDlF1bkhZBs6U1W37WbqBj6Lq G/DTVFuAIFrlv5WMM0mLqXxD0HwcGCqnlIuoq4TLXpuPRqirk8pd9aynzCroiY3ktuyb+V JMsIkge01QsP5UHg+9+hnfp2ReGE+Go= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1706266271; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AKzIutW8hDAK4Yw6RIwXdfNOLIMvd8A1PFtLwW1HzIw=; b=fGIOLwN4bmCY1r4HCJArej9cCHFUJlh4hY9GoZm7zC21iLDlF1bkhZBs6U1W37WbqBj6Lq G/DTVFuAIFrlv5WMM0mLqXxD0HwcGCqnlIuoq4TLXpuPRqirk8pd9aynzCroiY3ktuyb+V JMsIkge01QsP5UHg+9+hnfp2ReGE+Go= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id CB92F13A22; Fri, 26 Jan 2024 10:51:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id ZTivMZ+Os2XkKAAAD6G6ig (envelope-from ); Fri, 26 Jan 2024 10:51:11 +0000 Date: Fri, 26 Jan 2024 11:51:11 +0100 From: Michal Hocko To: Jiri Slaby Cc: akpm@linux-foundation.org, surenb@google.com, riel@surriel.com, willy@infradead.org, cl@linux.com, yang@os.amperecomputing.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Bernhard M. Wiedemann" , Yang Shi Subject: Re: [PATCH] mm: huge_memory: don't force huge page alignment on 32 bit Message-ID: References: <20240118133504.2910955-1-shy828301@gmail.com> <2afa54e6-90db-4ae0-a21c-78e5051aa83c@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: BF5AFA0004 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 4nmrnrf4a8hbrsu54itr9pcgsp5xrz8b X-HE-Tag: 1706266273-944774 X-HE-Meta: U2FsdGVkX19lwe3APbbNOUs9mkYxwdHrKXVCOeChY8sUsmej3HsLdpkjjwrc7PFJ7KcmB/OdfoaY3o97k3D2ZzgRY1kWV0ojKpFF7mRfpPlhJqL3XnTombQ4NcdW0t4dixoJdb7fxEsvv7CI/z6ncsaER61W18jhN7wf0okp7Ji0dIZ8NdtUV/JpaCpTkNcoP7L8uZCuqkJNWO7VHmqDS5EdcikeeZLRYpANHShrbWKqWfrAEVnoZpvdjWlHq/kwJrPnZjcUBmU6an/irHSsuqrlEHoJ+o5B3/VwlVeprzGdkQcjUY6OVclyzfqiv7aDcSjqdzOLz2m6E+DsIb3day1oLBPvpuWrtd1iGwvldDXYQPUx/NsvJE4hS9KxNDMBcpGd3Ph/OthEYHd6ej4dnmrKQeTTfXhM/ZJFWlurEp3RqjvFIrgFe6zOdlcv8S7l8+rRP1Sfw4fWFNatjdn9E3tBwD1BmkgAsx5r0jQPEzocPS34p4/b6sZMk7R9LrHP+sCWCFqfziiPPUK8jWX5kPF0Kp65GtU1fOGTD1yHAli0ugf6b49QuPYIrcvbhJZ7drBl5ebUDa1qWYxdVrsoSbtCeLDYZ7+NjQLyRXPgvqBERfwO3yAH/G+p09+ysFirl2/e5uSxuwv454Cc0m6WAEMFV/Z5oWdTD6vk503saNBFdQiVA8cXjdPfsU6R293TmYRfEV+to8zedRN+y9gg8hIwwKSUFdgKEnVYkpT7okcfHLszxUPevY2j971UaFYyYNktnqXY56rIo3E1E9sMHh/cELPAY6y6EagBo0vHzkylmgl1a06i3F4echRMi7JQRgzht7CZ/L+pv0ALtJsXUqYcCAWS75hxzWxuULqRrbELdUMh+uSgULoongyy1gu6pgMnrKQzsiqM2NLER+l1/2fDLiGuo+GWq+beeiVJ9EKiJ/bfJC4z53WZ2IDjA7Dcx9h7/6sto7m4l9bW/qh OIygYw4q gMLRb0HniB0OreYNnjpj/6JqsI0wKEbmxYM5SdxMk3zDYLpll6h7PU1yH59ygPomwTAevwR5vWwqHjcpqn6PdmZIgW0j5rYhx88uWWuBVo1+4f81wWI6xW0geKogNrjWmRMtcackp1rH6rwMnAX/NBRJGiIvs6KgvEc6pO1AmCqn5Yl8d9vSkzTvL47OIqQ8LPnqgwf/QXiymOf4CY2JFX9YJn6n1XCDewDJ2y0FbegSarIGwRWrlmrK7uXIc+v58AgYwS4sJ+HczFTpkjKeYB+VHo4b3VzOHncQYCss2AjYlMMPHK5qN0C4j23zUsWFqF5SbQ29C0R93btrJwNkNsTEfXBAoxps8pPrC5yJ4Xux+GCE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri 26-01-24 10:41:49, Jiri Slaby wrote: > On 26. 01. 24, 10:36, Jiri Slaby wrote: > > > > --- a/mm/huge_memory.c > > > > +++ b/mm/huge_memory.c > > > > @@ -37,6 +37,7 @@ > > > >   #include > > > >   #include > > > >   #include > > > > +#include > > > >   #include > > > >   #include > > > > @@ -811,6 +812,14 @@ static unsigned long > > > > __thp_get_unmapped_area(struct file *filp, > > > >       loff_t off_align = round_up(off, size); > > > >       unsigned long len_pad, ret; > > > > +    /* > > > > +     * It doesn't make too much sense to froce huge page alignment on > > > > +     * 32 bit system or compat userspace due to the contrained virtual > > > > +     * address space and address entropy. > > > > +     */ > > > > FWIW, > > Bernhard noticed that "froce" and "contrained", could you fix that > > before applying the patch? > > No, you can't: > > 1) it was merged to mm-stable already, and > 2) the comment is not in that version at all [1] > > [1] https://lore.kernel.org/all/20240126075612.87780C433F1@smtp.kernel.org/ Matthew has objected that the comment is not really necessary and I think he is quite right. If anything the commend would be helpful to explain why this doesn't make much sense (because that breaks ASLR on default configuration and compat tasks). But that should be clear from the changelog so I think we are good here. -- Michal Hocko SUSE Labs