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>] [day] [month] [year] [list]
Date:   Fri, 29 May 2020 17:47:36 +0530
From:   Anupam Aggarwal <anupam.al@...sung.com>
To:     mchehab+samsung@...nel.org, corbet@....net,
        darrick.wong@...cle.com, viro@...iv.linux.org.uk,
        ira.weiny@...el.com, dhowells@...hat.com
Cc:     a.sahrawat@...sung.com, t.vivek@...sung.com,
        linux-kernel@...r.kernel.org,
        Anupam Aggarwal <anupam.al@...sung.com>
Subject: [PATCH] dcache: use of d_time under required configs

struct dentry{}->d_time is used when CONFIG_NFS_FS or
CONFIG_VBOXSF_FS is on.
Limit the d_time only when either of configs CONFIG_NFS_FS or
CONFIG_VBOXSF_FS is enabled
With this change size of "struct dentry" is reduced by 8-bytes
on 64-bit system, while of 32-bit system size remains unchanged
dentry object is vastly used, so this change should be useful
for memory saving

Signed-off-by: Anupam Aggarwal <anupam.al@...sung.com>
Signed-off-by: Vivek Trivedi <t.vivek@...sung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@...sung.com>
---
 include/linux/dcache.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index a94c551..d90da5e 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -101,7 +101,9 @@ struct dentry {
 	struct lockref d_lockref;	/* per-dentry lock and refcount */
 	const struct dentry_operations *d_op;
 	struct super_block *d_sb;	/* The root of the dentry tree */
+#if IS_ENABLED(CONFIG_NFS_FS) || IS_ENABLED(CONFIG_VBOXSF_FS)
 	unsigned long d_time;		/* used by d_revalidate */
+#endif
 	void *d_fsdata;			/* fs-specific data */
 
 	union {
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ