lkml.org 
[lkml]   [2018]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 06/17] prmem: test cases for memory protection
From
Date
> +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.

\
 
 \ /
  Last update: 2018-10-25 18:44    [W:0.058 / U:0.036 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site