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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1284117583.1903.8.camel@castor.rsk>
Date:	Fri, 10 Sep 2010 12:19:43 +0100
From:	Richard Kennedy <richard@....demon.co.uk>
To:	jgarzik <jgarzik@...ox.com>
Cc:	Tejun Heo <tj@...nel.org>, lkml <linux-kernel@...r.kernel.org>,
	linux-ide@...r.kernel.org
Subject: [PATCH] libata: reorder ata_queued_cmd to remove alignment padding
 on 64 bit builds

Reorder structure ata_queued_cmd to remove 8 bytes of alignment padding
on 64 bit builds & therefore reduce the size of structure ata_port by
256 bytes.
    
Overall this will have little impact, other than reducing the amount of
memory that is cleared when allocating ata_ports.
    
Signed-off-by: Richard Kennedy <richard@....demon.co.uk>
----
patch against 2.6.36-rc3
compiled & tested on x86_64

I've been running this patch for a couple of weeks with no apparent
issues.

regards
Richard



diff --git a/include/linux/libata.h b/include/linux/libata.h
index f010f18..e115380 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -559,13 +559,13 @@ struct ata_queued_cmd {
 	unsigned int		extrabytes;
 	unsigned int		curbytes;
 
-	struct scatterlist	*cursg;
-	unsigned int		cursg_ofs;
-
 	struct scatterlist	sgent;
 
 	struct scatterlist	*sg;
 
+	struct scatterlist	*cursg;
+	unsigned int		cursg_ofs;
+
 	unsigned int		err_mask;
 	struct ata_taskfile	result_tf;
 	ata_qc_cb_t		complete_fn;


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