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]
Message-Id: <20080112.213223.82837118.davem@davemloft.net>
Date:	Sat, 12 Jan 2008 21:32:23 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	dada1@...mosbay.com
Cc:	netdev@...r.kernel.org
Subject: Re: [XFRM]: alg_key_len should be unsigned to avoid integer divides

From: Eric Dumazet <dada1@...mosbay.com>
Date: Sat, 12 Jan 2008 18:29:32 +0100

> alg_key_len is currently defined as 'signed int'. This unfortunatly leads
> to integer divides in several paths.
> 
> Converting it to unsigned is safe and saves 208 bytes of text on i386.
> 
> Signed-off-by: Eric Dumazet <dada1@...mosbay.com>

Applied.

I realigned the struct members in a follow-on changeset.

commit 7305e737926be49e09718df53f4285bf69cc3755
Author: David S. Miller <davem@...emloft.net>
Date:   Sat Jan 12 21:31:29 2008 -0800

    [XFRM]: Fix struct xfrm_algo code formatting.
    
    Realign struct members.
    
    Signed-off-by: David S. Miller <davem@...emloft.net>

diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index f8507ee..9b5b00c 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -91,9 +91,9 @@ struct xfrm_replay_state
 };
 
 struct xfrm_algo {
-	char	alg_name[64];
+	char		alg_name[64];
 	unsigned int	alg_key_len;    /* in bits */
-	char	alg_key[0];
+	char		alg_key[0];
 };
 
 struct xfrm_stats {
--
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