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:	Wed, 18 May 2011 13:10:44 +0900
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	penguin-kernel@...ove.SAKURA.ne.jp
CC:	john.stultz@...aro.org, tytso@....edu, mina86@...a86.com,
	jirislaby@...il.com, rientjes@...gle.com, dave@...ux.vne,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/3] v4 Improve task->comm locking situation

(2011/05/18 12:16), Tetsuo Handa wrote:
> What about replacing
> 	char comm[TASK_COMM_LEN];
> with
> 	char *rcu_commname;
> and switching it atomically using RCU?
> 
> Advantages:
>    Readers can use RCU read lock rather than spinlock.
>    Makes task_struct smaller.
> 
> Disadvantages:
>    Need to allocate TASK_COMM_LEN bytes upon dup_task_struct() and set_task_comm().
>    Need to rewrite all task_struct.comm readers (steps shown below).
> 
> Steps to rewrite task_struct.comm readers
> 
> (1) Introduce a temporary accessor (say, task_comm).
> 
>      #define task_comm(tsk) (tsk)->comm
> 
> (2) Rewrite all tsk->comm users to task_comm(tsk).
> 
> (3) Replace sizeof(tsk->comm) with TASK_COMM_LEN.

The problem is, they aren't a few. But if you have a enough brave,
you can rewrite all. I'm not against it.




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