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]
Date:	Sun, 11 Nov 2007 21:44:19 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Erez Zadok <ezk@...sunysb.edu>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Ulrich Drepper <drepper@...hat.com>,
	Roland McGrath <roland@...hat.com>,
	"Andrew G. Morgan" <morgan@...nel.org>,
	Casey Schaufler <casey@...aufler-ca.com>,
	Chris Wright <chrisw@...s-sol.org>,
	James Morris <jmorris@...ei.org>,
	Serge Hallyn <serue@...ibm.com>,
	Stephen Smalley <sds@...ho.nsa.gov>
Subject: Re: [PATCH] kernel/capability.c get_task_comm compile error (MMOTM)


* Erez Zadok <ezk@...sunysb.edu> wrote:

> Ingo, I don't see how it can return NULL.  This is what get_task_comm 
> looks like in MMOTM-2007-11-10-19-05:
> 
> char *get_task_comm(char *buf, struct task_struct *tsk)
> {
> 	/* buf must be at least sizeof(tsk->comm) in size */
> 	task_lock(tsk);
> 	strncpy(buf, tsk->comm, sizeof(tsk->comm));
> 	task_unlock(tsk);
> 	return buf;
> }
> 
> The only way it'd return NULL is if a null buf was passed, in which 
> case the strncpy will oops first.

hm, here it says in include/linux/sched.h:

 extern void get_task_comm(char *to, struct task_struct *tsk);

HEAD ecd744eec3a.

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