lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <75344429-1f34-4a14-ab10-8613846d694e@p183>
Date:   Tue, 5 Dec 2023 17:26:22 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     Florian Weimer <fweimer@...hat.com>
Cc:     akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
        linux-arch@...r.kernel.org, linux-api@...r.kernel.org,
        x86@...nel.org
Subject: Re: [PATCH] ELF: supply userspace with available page shifts
 (AT_PAGE_SHIFT_LIST)

On Tue, Dec 05, 2023 at 10:51:39AM +0100, Florian Weimer wrote:
> * 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.

Yes!

I was so proud of myself for this line:

	val |= 21 << (s += 8);

Now it is boring bitmask again :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ