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]
Message-ID: <20081226171604.GE3156@hack.private>
Date:	Fri, 26 Dec 2008 17:16:04 +0000
From:	Américo Wang <xiyou.wangcong@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Oleg Nesterov <oleg@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...l.org>
Subject: Re: [Patch] signal: let valid_signal() check more

On Fri, Dec 26, 2008 at 09:56:54AM +0100, Ingo Molnar wrote:
>
>* Américo Wang <xiyou.wangcong@...il.com> wrote:
>
>> >> @@ -727,7 +727,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
>> >>  	{
>> >>  		if (!perm || !capable(CAP_KILL))
>> >>  			goto eperm;
>> >> -		if (!valid_signal(arg) || arg < 1 || arg == SIGKILL)
>> >> +		if (!valid_signal((int)arg) || arg == SIGKILL)
>> >                                  ^^^^^
>> >
>> >The patch adds a lot of unnecessary typecasts like this.
>> 
>> because it's inline?
>
>Why does your patch add a lot of seemingly unnecessary typecasts? [if your 
>short reply was supposed to be an answer to that question then please 
>explain it in more detail.]

Hi, Ingo.

because I also changed the type of valid_signal():

 -static inline int valid_signal(unsigned long sig)
 +static inline int valid_signal(int sig)

I noticed that gcc put this kind of warning into
-Wtraditional-conversion recently, but it is still useful to use
explicit cast, isn't it?

Thanks.

-- 
"Against stupidity, the gods themselves, contend in vain."

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