Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp169014rdb; Tue, 5 Dec 2023 01:52:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPhGFjxsXs1ACqHONyD5Fw3BRFN04wG4sTH0u0/oEqQPI2WvJwpE2M0uQCGycwV6TITJ/+ X-Received: by 2002:a17:903:2442:b0:1d0:6ffe:9fd with SMTP id l2-20020a170903244200b001d06ffe09fdmr6404530pls.91.1701769920482; Tue, 05 Dec 2023 01:52:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701769920; cv=none; d=google.com; s=arc-20160816; b=hYnMH5htUqWNnq8oyBx5uuSpmt1K8dl4CB8wdegGcbd+Qd6Xt0W5aYG9eJT9/Ma7SG JTGPPkRvOfpwrefkjMylDewidAQ0BgrzblQ/m+BWET9m82M8ZHIDDTdVZ5t0P5sfnF5C 922+LC2i/lPpHJJCOHvEiOEdDUwtxa6HlegTInBFEGa6j6+OVoXZpPpy7rhONk045wfQ jNQZcppcykiVPxZNlvyoT1vGKdhtFJV6b36aJyQWtJkmOxjriCehRCMnUYPynAapp19r uE9MWM5ZK4qVW90nHDgSROuHuQ8pxvO5QD0dgaop8QICs4IH9OofoV7PHFCvXC9M80Wa Wsog== 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=7dVZSK5HrOSlXE62GRvm87IDdzGVk4JEDjk3rU5ubq8=; fh=VB/H0Pj8h7TOk2r+aF2eJXau64FZb4cSaa058a5u5T0=; b=QvuxRu0BxWb6Y8Xt1KGnlWD0XULrjwwlrn2UCtlbAW2QssQdCHTgrGq+o4cs4vvoBq WCZwuonP2sa2ZbUXpaw4IbMwlSlAwS/ccB4Bp6ww8gPt02sr6sLIrSMeuAPg6u2edaOH 4ZFoH7NvwWRc0gBO1UGbBbATzTDw0kXDcvWVvKEFNitly6zPtHork8kfVg0zCAYEFUel Gfj8bSVcDsCHBYLfPSFspSae5udOCmKptWgVdEOF/LyQwRPBBzsRDrXzXRqa2iUg7Aye WtgaVDQScsowKk1+H6IMXvy4xi/XL3YjABpSuRzFsnPbrGgvusUDMQTIVAiJu+YAF/71 XSBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fxEPKqtw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id y18-20020a17090322d200b001d092e9cbbfsi3811635plg.445.2023.12.05.01.52.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 01:52:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fxEPKqtw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 14E9C80A97D1; Tue, 5 Dec 2023 01:51:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344976AbjLEJvn (ORCPT + 99 others); Tue, 5 Dec 2023 04:51:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbjLEJvl (ORCPT ); Tue, 5 Dec 2023 04:51:41 -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 88D819E for ; Tue, 5 Dec 2023 01:51:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701769907; 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=7dVZSK5HrOSlXE62GRvm87IDdzGVk4JEDjk3rU5ubq8=; b=fxEPKqtwd6YgUUPy5LkaNGX2giwpgystIsQNDEZsKsoTJMs57Xw4ndbtRxNeDn4ITJMWD1 xB/BnmRfE9HxYYudT4yV3cf6hrTd+UmxRuuW0MPpnOZoPY/kbfWJLlrRryTxslOaWXYMTV /Jp66xmigv5ClQJYbmMKNFuboJ4V0ks= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-582-F4k2HGFBPB6w4DHHBWvnrw-1; Tue, 05 Dec 2023 04:51:43 -0500 X-MC-Unique: F4k2HGFBPB6w4DHHBWvnrw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 3E0002806040; Tue, 5 Dec 2023 09:51:43 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D4BCF1C060AF; Tue, 5 Dec 2023 09:51:41 +0000 (UTC) From: Florian Weimer To: Alexey Dobriyan Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH] ELF: supply userspace with available page shifts (AT_PAGE_SHIFT_LIST) References: <6b399b86-a478-48b0-92a1-25240a8ede54@p183> Date: Tue, 05 Dec 2023 10:51:39 +0100 In-Reply-To: <6b399b86-a478-48b0-92a1-25240a8ede54@p183> (Alexey Dobriyan's message of "Mon, 4 Dec 2023 20:18:48 +0300") Message-ID: <87v89dvuxg.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.7 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 howler.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 (howler.vger.email [0.0.0.0]); Tue, 05 Dec 2023 01:51:58 -0800 (PST) * Alexey Dobriyan: > +/* > + * Page sizes available for mmap(2) encoded as 1 page shift per byte in > + * increasing order. > + * > + * Thus 32-bit systems get 4 shifts, 64-bit systems get 8 shifts tops. Couldn't you use the bits in a long instead, to indicate which shifts are present? That's always going to be enough. Thanks, Florian