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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon,  9 Apr 2007 10:54:12 -0400
From:	"Josef 'Jeff' Sipek" <jsipek@...sunysb.edu>
To:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Cc:	akpm@...ux-foundation.org, Erez Zadok <ezk@...sunysb.edu>,
	"Josef 'Jeff' Sipek" <jsipek@...sunysb.edu>
Subject: [PATCH 21/21] Unionfs: Don't inline do_remount_{add,del,mode}_option

From: Erez Zadok <ezk@...sunysb.edu>

gcc4 decided to inline do_remount_{add,del,mode}_option creating an 600 byte
stack abuser on a x86_64 test box.

Reported by: Josef 'Jeff' Sipek <jsipek@...sunysb.edu>

Signed-off-by: Erez Zadok <ezk@...sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@...sunysb.edu>
---
 fs/unionfs/lookup.c |    2 +-
 fs/unionfs/super.c  |   20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
index 0572247..0fc5993 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -30,7 +30,7 @@ static int is_validname(const char *name)
 }
 
 /* The rest of these are utility functions for lookup. */
-static int is_opaque_dir(struct dentry *dentry, int bindex)
+static noinline int is_opaque_dir(struct dentry *dentry, int bindex)
 {
 	int err = 0;
 	struct dentry *hidden_dentry;
diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index ec5706b..e6a6cc1 100644
--- a/fs/unionfs/super.c
+++ b/fs/unionfs/super.c
@@ -148,9 +148,9 @@ static int unionfs_statfs(struct dentry *dentry, struct kstatfs *buf)
 }
 
 /* handle mode changing during remount */
-static int do_remount_mode_option(char *optarg, int cur_branches,
-				  struct unionfs_data *new_data,
-				  struct path *new_lower_paths)
+static noinline int do_remount_mode_option(char *optarg, int cur_branches,
+					   struct unionfs_data *new_data,
+					   struct path *new_lower_paths)
 {
 	int err = -EINVAL;
 	int perms, idx;
@@ -207,9 +207,9 @@ out:
 }
 
 /* handle branch deletion during remount */
-static int do_remount_del_option(char *optarg, int cur_branches,
-				 struct unionfs_data *new_data,
-				 struct path *new_lower_paths)
+static noinline int do_remount_del_option(char *optarg, int cur_branches,
+					  struct unionfs_data *new_data,
+					  struct path *new_lower_paths)
 {
 	int err = -EINVAL;
 	int idx;
@@ -268,10 +268,10 @@ out:
 }
 
 /* handle branch insertion during remount */
-static int do_remount_add_option(char *optarg, int cur_branches,
-				 struct unionfs_data *new_data,
-				 struct path *new_lower_paths,
-				 int *high_branch_id)
+static noinline int do_remount_add_option(char *optarg, int cur_branches,
+					  struct unionfs_data *new_data,
+					  struct path *new_lower_paths,
+					  int *high_branch_id)
 {
 	int err = -EINVAL;
 	int perms;
-- 
1.5.0.3.268.g3dda

-
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