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: <1303267562.5076.1004.camel@nimitz>
Date:	Tue, 19 Apr 2011 19:46:02 -0700
From:	Dave Hansen <dave@...ux.vnet.ibm.com>
To:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc:	David Rientjes <rientjes@...gle.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Johannes Weiner <hannes@...xchg.org>,
	Michal Nazarewicz <mina86@...a86.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	John Stultz <johnstul@...ibm.com>
Subject: Re: [PATCH 1/2] break out page allocation warning code

On Wed, 2011-04-20 at 11:19 +0900, KOSAKI Motohiro wrote:
> > +     memcpy(tmp_comm, tsk->comm_buf, TASK_COMM_LEN);
> > +     tsk->comm = tmp;
> >       /*
> > -      * Threads may access current->comm without holding
> > -      * the task lock, so write the string carefully.
> > -      * Readers without a lock may see incomplete new
> > -      * names but are safe from non-terminating string reads.
> > +      * Make sure no one is still looking at tsk->comm_buf
> >        */
> > -     memset(tsk->comm, 0, TASK_COMM_LEN);
> > -     wmb();
> > -     strlcpy(tsk->comm, buf, sizeof(tsk->comm));
> > +     synchronize_rcu();
> 
> The doc says,
> 
> /**
>  * synchronize_rcu - wait until a grace period has elapsed.

Yeah, yeah... see "completely untested". :)

I'll see if dropping the locks or something else equally hackish can
help.  

-- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ