[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0175ca6a-40d1-0fde-350c-891488432ecb@intel.com>
Date: Thu, 25 Oct 2018 09:43:52 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Igor Stoppa <igor.stoppa@...il.com>,
Mimi Zohar <zohar@...ux.vnet.ibm.com>,
Kees Cook <keescook@...omium.org>,
Matthew Wilcox <willy@...radead.org>,
Dave Chinner <david@...morbit.com>,
James Morris <jmorris@...ei.org>,
Michal Hocko <mhocko@...nel.org>,
kernel-hardening@...ts.openwall.com,
linux-integrity@...r.kernel.org,
linux-security-module@...r.kernel.org
Cc: igor.stoppa@...wei.com, Dave Hansen <dave.hansen@...ux.intel.com>,
Jonathan Corbet <corbet@....net>,
Laura Abbott <labbott@...hat.com>,
Vlastimil Babka <vbabka@...e.cz>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Pavel Tatashin <pasha.tatashin@...cle.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/17] prmem: test cases for memory protection
> +static bool is_address_protected(void *p)
> +{
> + struct page *page;
> + struct vmap_area *area;
> +
> + if (unlikely(!is_vmalloc_addr(p)))
> + return false;
> + page = vmalloc_to_page(p);
> + if (unlikely(!page))
> + return false;
> + wmb(); /* Flush changes to the page table - is it needed? */
No.
The rest of this is just pretty verbose and seems to have been very
heavily copied and pasted. I guess that's OK for test code, though.
Powered by blists - more mailing lists