On Fri, Jul 17, 2020 at 10:06:50PM -0700, Ira Weiny wrote:
> On Fri, Jul 17, 2020 at 11:10:53AM +0200, Peter Zijlstra wrote:
> > On Fri, Jul 17, 2020 at 12:20:51AM -0700, ira.we...@intel.com wrote:
> > > +static pgprot_t dev_protection_enable_get(struct dev_pagemap *pgmap,
> > > pgprot_t prot)
> >
On Fri, Jul 17, 2020 at 11:17:18AM +0200, Peter Zijlstra wrote:
> On Fri, Jul 17, 2020 at 12:20:51AM -0700, ira.we...@intel.com wrote:
> > +void dev_access_disable(void)
> > +{
> > + unsigned long flags;
> > +
> > + if (!static_branch_unlikely(&dev_protection_static_key))
> > + return
On Fri, Jul 17, 2020 at 11:10:53AM +0200, Peter Zijlstra wrote:
> On Fri, Jul 17, 2020 at 12:20:51AM -0700, ira.we...@intel.com wrote:
> > +static pgprot_t dev_protection_enable_get(struct dev_pagemap *pgmap,
> > pgprot_t prot)
> > +{
> > + if (pgmap->flags & PGMAP_PROT_ENABLED && dev_page_pkey
On Fri, Jul 17, 2020 at 12:20:51AM -0700, ira.we...@intel.com wrote:
> From: Ira Weiny
>
> Device managed memory exposes itself to the kernel direct map which
> allows stray pointers to access these device memories.
>
> Stray pointers to normal memory may result in a crash or other
> undesirable
On Fri, Jul 17, 2020 at 12:20:51AM -0700, ira.we...@intel.com wrote:
> +void dev_access_disable(void)
> +{
> + unsigned long flags;
> +
> + if (!static_branch_unlikely(&dev_protection_static_key))
> + return;
> +
> + local_irq_save(flags);
> + current->dev_page_access_re
On Fri, Jul 17, 2020 at 12:20:51AM -0700, ira.we...@intel.com wrote:
> +static pgprot_t dev_protection_enable_get(struct dev_pagemap *pgmap,
> pgprot_t prot)
> +{
> + if (pgmap->flags & PGMAP_PROT_ENABLED && dev_page_pkey != PKEY_INVALID)
> {
> + pgprotval_t val = pgprot_val(prot)
From: Ira Weiny
Device managed memory exposes itself to the kernel direct map which
allows stray pointers to access these device memories.
Stray pointers to normal memory may result in a crash or other
undesirable behavior which, while unfortunate, are usually recoverable
with a reboot. Stray w
7 matches
Mail list logo