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: <47b5156d814b88ec894f38d245d0a09061112f85.camel@intel.com>
Date:   Thu, 9 Mar 2023 01:56:37 +0000
From:   "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To:     "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "rppt@...nel.org" <rppt@...nel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "song@...nel.org" <song@...nel.org>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "vbabka@...e.cz" <vbabka@...e.cz>,
        "x86@...nel.org" <x86@...nel.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [RFC PATCH 1/5] mm: intorduce __GFP_UNMAPPED and unmapped_alloc()

On Wed, 2023-03-08 at 11:41 +0200, Mike Rapoport wrote:
> +
> +static inline void __free_one_page(struct page *page, unsigned int
> order,
> +                                  bool cache_refill)
> +{
> +       unsigned long pfn = page_to_pfn(page);
> +       unsigned long buddy_pfn;
> +       unsigned long combined_pfn;
> +       struct page *buddy;
> +       unsigned long flags;
> +
> +       spin_lock_irqsave(&free_area->lock, flags);
> +
> +       if (cache_refill) {
> +               set_pageblock_unmapped(page);
> +               free_area[order].nr_cached++;
> +       }
> +
> +       while (order < MAX_ORDER - 1) {
> +               buddy = find_unmapped_buddy_page_pfn(page, pfn,
> order,
> +                                                    &buddy_pfn);
> +               if (!buddy)
> +                       break;
> +
> +               del_page_from_free_list(buddy, order);
> +               combined_pfn = buddy_pfn & pfn;
> +               page = page + (combined_pfn - pfn);
> +               pfn = combined_pfn;
> +               order++;
> +       }
> +
> +       set_unmapped_order(page, order);
> +       add_to_free_list(page, order);
> +       spin_unlock_irqrestore(&free_area->lock, flags);
> +}
> +

The page has to be zeroed before it goes back on the list, right? I
didn't see it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ