Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1737653rdb; Thu, 7 Dec 2023 07:33:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFzLeZPkyjnvG7VblBmjUAcRrrQBpqGKAuGl8h4VlLSp253dHakH204HtI+jFlYmbe3jWs X-Received: by 2002:a17:902:c651:b0:1d0:9c97:6fed with SMTP id s17-20020a170902c65100b001d09c976fedmr2018274pls.44.1701963193849; Thu, 07 Dec 2023 07:33:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701963193; cv=none; d=google.com; s=arc-20160816; b=YFrQrPwEIrHVSj15tF/BFouQyCcsQum5Gz/H5RjJAOgkciu6KfgBWneFafJcI+zbDz 8NRP3w8zj8q8wX9rEaZUkJmBbGO345zDPrICTps7gxXERI1EHSuzXWhTkT2kuxkjai1t HTER/L9HXtxjvzsszmqI2xvoS2nsREnNuCulf8lr8CSGWDchXIF+6ENTeDg//5+Klhux cFAioqHfpDQ57g4l5yzYmaTripCuVRegCmnxaOIMsXh4yVDLk7fOND3NLhWPjdnHQg5T NXxN00nDW6oG1XutgkCvpNAxIUfV61+pIINCRPVMkSlM9PJxVcDwqi12GH5e9wY9tKe4 X09A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=rO0LOvSsYUy+BXiNU5frBHIkiTV2KkiJuS/MBqYnFgM=; fh=6GEyrSNoyMg/kkRvHpQdrCJhzcut+3KbzNFdL4D0mA8=; b=Z5CCcDhP4FbMMb5w8zh7Fe311ski1Hspl3tVnpabxOL0y6eQw7SxVqfbUda9sJo0Tn c8D5l1VklTww9K1KDcBmFp837H9RO0m7lZASrm1W3Koiv2/9LJVpEndAbYlPGKLq9qc0 rFe1Usn4slrtqfmUiXHWmYnV/SFbmm2etC+rqh/gZTzP2I1xzNw2bMKuLFcXb/61gHxG p8CGFKpI7UNI5XSZXPiBqYEWFm2RajOBO58dipKtVl/I46H1rFPgvqaO2OQy0qcLQ5e3 b5oW6Tnq0D9McYWc5XO0dVlApFEMRW26kZ7X+PnXwCo6aBsImnfZ/Z97r7Y1NVlKSjb3 ftbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Pq2l/XDA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id v14-20020a170903238e00b001d1db5e399fsi1330877plh.270.2023.12.07.07.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 07:33:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Pq2l/XDA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id F0CF2826E37E; Thu, 7 Dec 2023 07:33:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443507AbjLGPcw (ORCPT + 99 others); Thu, 7 Dec 2023 10:32:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443479AbjLGPcw (ORCPT ); Thu, 7 Dec 2023 10:32:52 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 819C810E3 for ; Thu, 7 Dec 2023 07:32:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701963177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rO0LOvSsYUy+BXiNU5frBHIkiTV2KkiJuS/MBqYnFgM=; b=Pq2l/XDAfChKBJWXGX+Y+tGw97V0nvkN8FbwmNmRnDU+IehDC7KRdcg30neclWDVYl7oPT 8uDC38FKqzcnp0HOf/oeAoNfsLL7dJ8l0Yl6pNval0fbsb2GPu+SE35+sdPLtzIbswr9jE zewQ2JWigbmdLS57MPwxyOlE3MKKokU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-530-haFiz_prNXKDzFwaWDEU7g-1; Thu, 07 Dec 2023 10:32:54 -0500 X-MC-Unique: haFiz_prNXKDzFwaWDEU7g-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1694910334AA; Thu, 7 Dec 2023 15:32:54 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.131]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EEA77111E400; Thu, 7 Dec 2023 15:32:52 +0000 (UTC) From: Florian Weimer To: Alexey Dobriyan Cc: Kees Cook , Andrew Morton , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2] ELF: supply userspace with available page shifts (AT_PAGE_SHIFT_MASK) References: <6b399b86-a478-48b0-92a1-25240a8ede54@p183> <87v89dvuxg.fsf@oldenburg.str.redhat.com> <1d679805-8a82-44a4-ba14-49d4f28ff597@p183> <202312061236.DE847C52AA@keescook> <4f5f29d4-9c50-453c-8ad3-03a92fed192e@p183> Date: Thu, 07 Dec 2023 16:32:51 +0100 In-Reply-To: <4f5f29d4-9c50-453c-8ad3-03a92fed192e@p183> (Alexey Dobriyan's message of "Thu, 7 Dec 2023 17:57:05 +0300") Message-ID: <8734wehvto.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 07 Dec 2023 07:33:10 -0800 (PST) * Alexey Dobriyan: > On Wed, Dec 06, 2023 at 12:47:27PM -0800, Kees Cook wrote: >> On Tue, Dec 05, 2023 at 07:01:34PM +0300, Alexey Dobriyan wrote: >> > Report available page shifts in arch independent manner, so that >> > userspace developers won't have to parse /proc/cpuinfo hunting >> > for arch specific strings: >> > >> > Note! >> > >> > This is strictly for userspace, if some page size is shutdown due >> > to kernel command line option or CPU bug workaround, than is must not >> > be reported in aux vector! >> >> Given Florian in CC, I assume this is something glibc would like to be >> using? Please mention this in the commit log. > > glibc can use it. Main user is libhugetlbfs, I guess: > > https://github.com/libhugetlbfs/libhugetlbfs/blob/master/hugeutils.c#L915 > > Loop inside getauxval() can run faster than opendir(). Is libhugetlbfs still maintained? Last commit was three years ago? Thanks, Florian