Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp519970rdb; Fri, 26 Jan 2024 02:51:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IF1E+OBHH4KeYeMey3cRuWztmm6mF9Lgk5SIdOBM3ILZ4vX6KwBhAhxbnNWzF11LfqA8rnP X-Received: by 2002:a05:6214:21a7:b0:686:9f09:e89c with SMTP id t7-20020a05621421a700b006869f09e89cmr1206147qvc.95.1706266283922; Fri, 26 Jan 2024 02:51:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706266283; cv=pass; d=google.com; s=arc-20160816; b=aFtDdP84KcaujRA9HY/60vKUWCr0ZcHHqdQiBU5RxhwpfLgNiQGKE/bSWwQ90mS6sK ZsKFxSyYW5eCcZXlr4HPxHVm9D503eXeItaXTt4E7PO1b9WdAMIl3TkcycKCyrk6mJDd cKgivLKWBKU9rQEjqaS1iEL/Gwce4dRNCFBGX1sZwykp9pJPPn5ReoU2OX5JFbI5TKRG CqEN6UPWNyxmbZ6Zo8Eb1wAdNe4+LrIkK9s3mvUhUwMzgpjFvoy2cmWC8NoTuVcSyTZs ya2K/bCK7Dw3DBmUDTT9a+6KLyuKqwuzLp1xLoG01KlEMNiABUbr7NFGpz93btQDgHvF 9brA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=AKzIutW8hDAK4Yw6RIwXdfNOLIMvd8A1PFtLwW1HzIw=; fh=M3DGWB2di21nz1CrD9ZFRh1y0KV8jV0XeMI9eWNB+4I=; b=fJGnGSzJYP+6Rlvhdj2zP2XXpk21Xidib7BUsEuOqMdggX4XcXGnBUSRJoZRyC2do3 wi2cZ9ommuWVHOYPR5p2Ffs9cEwk6fqRxxoaz3LsE/kYzSUdDFuqMFJeR1U6gOVBfowT wfzl1fWlA+ozITf3OpIquSBEO2sbaNyimjI8Uho/x2l0ESHgynm8P9QrCxpAz1cTFlKg /TOVq220j8RdhgwqBbE54fnm4YhmY4dIWpF7OIVqPA3THVLleFkZgFigmHZuuGniAh4G vlhJCBp/Ef9EwVKQyVC3kqrhe1WpY5jsZYzkrlkQD4CxEFjzDtWCfY6bz6YRYpRFhCj9 EAHQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=fGIOLwN4; dkim=pass header.i=@suse.com header.s=susede1 header.b=fGIOLwN4; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-40007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a2-20020a056214062200b0068198aa2c65si1051409qvx.91.2024.01.26.02.51.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 02:51:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=fGIOLwN4; dkim=pass header.i=@suse.com header.s=susede1 header.b=fGIOLwN4; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-40007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9AC941C23345 for ; Fri, 26 Jan 2024 10:51:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E20C12B8C; Fri, 26 Jan 2024 10:51:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="fGIOLwN4"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="fGIOLwN4" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D41F412B74 for ; Fri, 26 Jan 2024 10:51:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706266276; cv=none; b=CrrYi0uDBbZTqDj/YuMN7+xQR+b9g8SdO/RCErC72jjRlQb1u8lqV2+gAVolMrmRye7rm39Z3pe1jKEV9gqK0aHKWpqwN69WQ2ZrorKyKx3qfgWSDyNv4BoJwDc6s7npvQm7gNSJfFYlfELkfuo9o02GPqt8/pppx/ZF6n2Aukw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706266276; c=relaxed/simple; bh=fTeXDksg0LwxRYza53TaQIOMzDySYxBlbYlQK7/4/II=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TqZxwCnjFrPP8qh6gJkFM6EHTHZq2Z6glslslgy0YdttrlH24ESXDZqrmgq1/HFEsul4FSG2HzLYU7CVT1N4GyGDLsEKMwC1H8nPJY4m/Ma3riYWazlQA8pGHiTHLQ2BeHUazWsVM16fp834nINUcpdOCaCiyOwGQQBgiepYo8o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=fGIOLwN4; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=fGIOLwN4; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Level: Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=fGIOLwN4 X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-1.58 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; DKIM_TRACE(0.00)[suse.com:+]; MX_GOOD(-0.01)[]; RCPT_COUNT_SEVEN(0.00)[11]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:dkim]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_CC(0.00)[linux-foundation.org,google.com,surriel.com,infradead.org,linux.com,os.amperecomputing.com,kvack.org,vger.kernel.org,suse.de,gmail.com]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.57)[81.21%] X-Spam-Score: -1.58 X-Rspamd-Queue-Id: DE5081FD38 X-Spam-Flag: NO 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