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:	Tue, 20 Dec 2011 12:02:52 -0800
From:	Vijay Subramanian <subramanian.vijay@...il.com>
To:	David Laight <David.Laight@...lab.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <eric.dumazet@...il.com>,
	ilpo.jarvinen@...sinki.fi, "H.K. Jerry Chu" <hkchu@...gle.com>
Subject: Re: [PATCH 1/1] tcp: Replace constants with #define macros

Thanks a lot for reviewing the patch. Please see responses below.

On 20 December 2011 02:27, David Laight <David.Laight@...lab.com> wrote:
>
>> +/*These are used to set the sack_ok field in struct
>> tcp_options_received */
>> +#define SACK_SEEN     (1 << 0)   /*1 = peer is SACK capable, */
>> +#define FACK_ENABLED  (1 << 1)   /*1 = FACK is enabled locally*/
>> +#define DSACK_SEEN    (1 << 2)   /*1 = DSACK was received from peer*/
>> +
>
> Since that is a fairly public header, some namespace protection
> might be sensible.

I assume you are talking about collision with userspace.  These
definitions are already protected by #ifdef  __KERNEL__.
That should be enough to protect against collisions with userspace I think.

>
>> -     tcp_opt->sack_ok = (options >> 4) & 0x1;
>> +     tcp_opt->sack_ok = (options >> 4) & SACK_SEEN;
>
> Looks to me like that 0x1 isn't SAC_SEEK! So this is now misleading.

Can you please elaborate? Are you saying this is wrong or that it
could be done better?

Thanks for your time!
Vijay
--
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