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:	Fri, 17 Dec 2010 12:02:34 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	ebiederm@...ssion.com
Cc:	kirill@...temov.name, netdev@...r.kernel.org, pablo@...filter.org,
	ldv@...linux.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netlink: fix gcc -Wconversion compilation warning

From: ebiederm@...ssion.com (Eric W. Biederman)
Date: Mon, 13 Dec 2010 13:35:25 -0800

> "Kirill A. Shutsemov" <kirill@...temov.name> writes:
> 
>> From: Dmitry V. Levin <ldv@...linux.org>
>>
>> $ cat << EOF | gcc -Wconversion -xc -S -o/dev/null -
>> unsigned f(void) {return NLMSG_HDRLEN;}
>> EOF
>> <stdin>: In function 'f':
>> <stdin>:3:26: warning: negative integer implicitly converted to unsigned type
>>
> This doesn't look like a bad fix, but I believe things will fail if
> we give NLMSG_ALIGN an unsigned long like size_t.  Say like sizeof.

What are you talking about? That's exactly his test case,
look at what NLMSG_HDRLEN is defined to, it's exactly the
case you're worried "will fail", it passes sizeof() to
NLMSG_ALIGN.

I think I'll apply Kirill's original patch, it's good enough
and simpler.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ