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, 10 Feb 2008 21:23:11 -0500
From:	Vlad Yasevich <vladislav.yasevich@...com>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	Julia Lawall <julia@...u.dk>, kernel-janitors@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	lksctp-developers@...ts.sourceforge.net, sri@...ibm.com
Subject: Re: [Lksctp-developers] [PATCH 8/8] : Use FIELD_SIZEOF

Alexey Dobriyan wrote:
> On Sun, Feb 10, 2008 at 09:16:04PM +0100, Julia Lawall wrote:
>> --- a/include/net/sctp/sctp.h
>> +++ b/include/net/sctp/sctp.h
>> @@ -618,7 +618,7 @@ static inline int param_type2af(__be16 t
>>  static inline int sctp_sanity_check(void)
>>  {
>>  	SCTP_ASSERT(sizeof(struct sctp_ulpevent) <=
>> -		    sizeof(((struct sk_buff *)0)->cb),
>> +		    FIELD_SIZEOF(struct sk_buff, cb),
>>  		    "SCTP: ulpevent does not fit in skb!\n", return 0);
>>  
>>  	return 1;
> 
> Same here. Use BUILD_BUG_ON instead.

Ack. BUILD_BUG_ON is definitely appropriate here, especially considering
that SCTP_ASSERT compiles to nothing with debugging turned off.

-vlad

> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Lksctp-developers mailing list
> Lksctp-developers@...ts.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lksctp-developers
> 

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