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] [day] [month] [year] [list]
Message-ID: <20100923040354.GC13554@fieldses.org>
Date:	Thu, 23 Sep 2010 00:03:55 -0400
From:	"J. Bruce Fields" <bfields@...ldses.org>
To:	Neil Brown <neilb@...e.de>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: linux-next: build failure after merge of the nfsd tree

On Thu, Sep 23, 2010 at 12:51:46PM +1000, Neil Brown wrote:
> On Wed, 22 Sep 2010 22:33:15 -0400
> "J. Bruce Fields" <bfields@...ldses.org> wrote:
> sched.h says:
> 
> 	char comm[TASK_COMM_LEN]; /* executable name excluding path
> 				     - access with [gs]et_task_comm (which lock
> 				       it with task_lock())
> 				     - initialized normally by setup_new_exec */
> 
> So we should lock...
> 
> But then fs/exec.c says:
> void set_task_comm(struct task_struct *tsk, char *buf)
> {
> 	task_lock(tsk);
> 
> 	/*
> 	 * 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.
> 	 */
>      .....
> 
> So I guess we are safe to use it unlocked for informational purposes.
> That first comment could do with an update, and where-ever it was that I
> copied that code from can probably be simplified too.....

Sounds good.

I've added a quick modular build to my test scripts too, so hopefully
that sort of problem won't slip past me next time....

--b.
--
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