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]
Date:   Wed, 16 Nov 2022 10:24:47 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Hugh Dickins <hughd@...gle.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 2/4] mm: teach release_pages() to take an array of encoded
 page pointers too

On 09.11.22 21:30, Linus Torvalds wrote:
> release_pages() already could take either an array of page pointers, or
> an array of folio pointers.  Expand it to also accept an array of
> encoded page pointers, which is what both the existing mlock() use and
> the upcoming mmu_gather use of encoded page pointers wants.
> 
> Note that release_pages() won't actually use, or react to, any extra
> encoded bits.  Instead, this is very much a case of "I have walked the
> array of encoded pages and done everything the extra bits tell me to do,
> now release it all".
> 
> Also, while the "either page or folio pointers" dual use was handled
> with a cast of the pointer in "release_folios()", this takes a slightly
> different approach and uses the "transparent union" attribute to
> describe the set of arguments to the function:
> 
>    https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html
> 
> which has been supported by gcc forever, but the kernel hasn't used
> before.
> 
> That allows us to avoid using various wrappers with casts, and just use
> the same function regardless of use.
> 
> Acked-by: Johannes Weiner <hannes@...xchg.org>
> Acked-by: Hugh Dickins <hughd@...gle.com>
> Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
> ---

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ