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: <m21vhhefpz.fsf@ssh.synack.fr>
Date:	Sat, 23 Jan 2010 03:07:36 +0100
From:	Samir Bellabes <sam@...ack.fr>
To:	Evgeniy Polyakov <zbr@...emap.net>
Cc:	Patrick McHardy <kaber@...sh.net>,
	linux-security-module@...r.kernel.org, jamal <hadi@...erus.ca>,
	Neil Horman <nhorman@...driver.com>, netdev@...r.kernel.org,
	netfilter-devel@...r.kernel.org
Subject: Re: [RFC 4/9] snet: introduce snet_core.c and snet.h

I'm sorry for the delay I missed this one.

Evgeniy Polyakov <zbr@...emap.net> writes:
> On Wed, Jan 06, 2010 at 08:46:35PM +0100, Samir Bellabes (sam@...ack.fr) wrote:
>> Patrick McHardy <kaber@...sh.net> writes:
>> 
>> >> +struct snet_event {
>> >> +	enum snet_syscall syscall;
>> >> +	u8 protocol;
>> >> +} __attribute__ ((packed));
>> >
>> > Does this really need to be packed? You're using it in a
>> > struct snet_event_entry, which is padded anyways.
>> 
>> I think that that members needs to be aligned, because this struct is
>> used for the jhash() computation.
>> when testing on x86_64, I discovered that jhash value wasn't the same,
>> for a same struct snet_event. Then I thougth about misaligned data, and
>> possible 'hole' between syscall and protocol.
>
> Without padding it will eat additional bytes after 'protocol' field,
> since enum is 32-bit long.

thanks for this help.


>> anyway, I patched the code to use jhash_2words() or jhash_1word().
>> here is a patch, which apply on top of initial serie
>
> What's the purpose of hashing verdict_id?

indeed, there is no specific purpose, I will fix this now.

thanks, and again sorry for the delay.
sam
--
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