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, 21 Jun 2007 18:49:12 +0200
From:	Alexander Wuerstlein <snalwuer@....informatik.uni-erlangen.de>
To:	Akinobu Mita <akinobu.mita@...il.com>
Cc:	Alexander Wuerstlein <arw@....name>, linux-kernel@...r.kernel.org,
	Johannes Schlumberger <spjsschl@...d.informatik.uni-erlangen.de>
Subject: Re: [PATCH] sns: add syscall to check signed state of a process
	[4/4]

On 070621 18:34, Akinobu Mita <akinobu.mita@...il.com> wrote:
> 2007/6/22, Alexander Wuerstlein <arw@....name>:
>
>> +asmlinkage int sys_sns_is_trusted(pid_t p)
>> +{
>> +       struct task_struct *t;
>> +       rcu_read_lock();
>> +       t = find_task_by_pid(p);
>> +       if (IS_ERR(t)) {
>
> Shouldn't it be:
> if (!t) {
>        ...
> ?
>
> find_task_by_pid() returns NULL on failure.

You seem to be right, the rest of the kernel just does 'if (!t)'. We just used
IS_ERR() as the 'check for evil pointers' function.




Ciao,

Alexander Wuerstlein.
-
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