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:	Thu, 8 Mar 2012 14:08:30 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	Dave Jones <davej@...hat.com>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [patch] mm, hugetlb: add thread name and pid to SHM_HUGETLB
 mlock rlimit warning

On Thu, 8 Mar 2012, Andrew Morton wrote:

> >  We have a get_task_comm() that does the task_lock() 
> > internally but requires a TASK_COMM_LEN buffer in the calling code.  It's 
> > just easier for the calling code to the task_lock() itself for a tiny 
> > little printk().
> 
> Well for a tiny little printk we could just omit the locking?  The
> printk() won't oops and once in a million years one person will see a
> garbled comm[] string?
> 

Sure, but task_lock() shouldn't be highly contended when the thread isn't 
forking or exiting (everything else is attaching/detaching from a cgroup 
or testing a mempolicy).  I've always added it (like in the oom killer for 
the same reason) just because the race exists.  Taking it for every thread 
on the system for one call to the oom killer has never slowed it down.
--
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