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:	Tue, 8 May 2012 21:59:56 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	KOSAKI Motohiro <kosaki.motohiro@...il.com>
cc:	Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
	Andi Kleen <ak@...ux.intel.com>, penberg@...nel.org,
	cl@...ux.com
Subject: Re: [PATCH] slab/mempolicy: always use local policy from interrupt
 context v3

On Mon, 7 May 2012, KOSAKI Motohiro wrote:

> > diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
> > index 7c727a9..7106786 100644
> > --- a/include/linux/mempolicy.h
> > +++ b/include/linux/mempolicy.h
> > @@ -215,7 +215,7 @@ extern struct zonelist *huge_zonelist(struct vm_area_struct *vma,
> >  extern bool init_nodemask_of_mempolicy(nodemask_t *mask);
> >  extern bool mempolicy_nodemask_intersects(struct task_struct *tsk,
> >                                const nodemask_t *mask);
> > -extern unsigned slab_node(struct mempolicy *policy);
> > +extern unsigned slab_node(void);
> >
> >  extern enum zone_type policy_zone;
> >
> > diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> > index cfb6c86..e05e007 100644
> > --- a/mm/mempolicy.c
> > +++ b/mm/mempolicy.c
> > @@ -1586,9 +1586,11 @@ static unsigned interleave_nodes(struct mempolicy *policy)
> >  * task can change it's policy.  The system default policy requires no
> >  * such protection.
> >  */
> > -unsigned slab_node(struct mempolicy *policy)
> > +unsigned slab_node(void)
> >  {
> > -       if (!policy || policy->flags & MPOL_F_LOCAL)
> > +       struct mempolicy *policy = current->mempolicy;
> > +
> > +       if (!in_interrupt() || !policy || policy->flags & MPOL_F_LOCAL)
> >                return numa_node_id();
> 
> I think your patch is correct. but I don't like interrupt context
> dereference current task.
> It would be nice if we only see current->mempolicy when !in_interrupt.
> 
> But this doesn't mean NAK anyway.
> 
>  Acked-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>

Sigh, this was acked by Christoph and KOSAKI when the logic is reversed 
and does the exact opposite of what's intended?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ