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:	Sat, 28 Mar 2009 11:45:45 GMT
From:	Ingo Molnar <mingo@...e.hu>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	penberg@...helsinki.fi, eduard.munteanu@...ux360.ro,
	viro@...iv.linux.org.uk, tglx@...utronix.de, mingo@...e.hu,
	adobriyan@...il.com
Subject: [tip:tracing/kmemtrace] fs.h: uninline simple_transaction_set()

Commit-ID:  a1525f87fd18c687edf376455c7d2e73c9b2cb6c
Gitweb:     http://git.kernel.org/tip/a1525f87fd18c687edf376455c7d2e73c9b2cb6c
Author:     Ingo Molnar <mingo@...e.hu>
AuthorDate: Wed, 25 Mar 2009 16:48:35 +0100
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Sat, 28 Mar 2009 12:44:06 +0100

fs.h: uninline simple_transaction_set()

Move simple_transaction_set() to the other simple-transaction
file helpers in fs/libfs.c.

This removes an implicit asm/page.h PAGE_SIZE dependency from
fs.h (asm/page.h is not an exported header so HEADERS_CHECK fils),
and also reduces kernel size a bit.

Acked-by: Al Viro <viro@...iv.linux.org.uk>
Cc: Alexey Dobriyan <adobriyan@...il.com>
Cc: Pekka Enberg <penberg@...helsinki.fi>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>
Cc: paulmck@...ux.vnet.ibm.com
LKML-Reference: <1237898630.25315.83.camel@...berg-laptop>
Signed-off-by: Ingo Molnar <mingo@...e.hu>


---
 fs/libfs.c         |   16 ++++++++++++++++
 include/linux/fs.h |   16 +---------------
 2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/fs/libfs.c b/fs/libfs.c
index 49b4409..c872c64 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -574,6 +574,21 @@ ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
  * possibly a read which collects the result - which is stored in a
  * file-local buffer.
  */
+
+void simple_transaction_set(struct file *file, size_t n)
+{
+	struct simple_transaction_argresp *ar = file->private_data;
+
+	BUG_ON(n > SIMPLE_TRANSACTION_LIMIT);
+
+	/*
+	 * The barrier ensures that ar->size will really remain zero until
+	 * ar->data is ready for reading.
+	 */
+	smp_mb();
+	ar->size = n;
+}
+
 char *simple_transaction_get(struct file *file, const char __user *buf, size_t size)
 {
 	struct simple_transaction_argresp *ar;
@@ -819,6 +834,7 @@ EXPORT_SYMBOL(simple_sync_file);
 EXPORT_SYMBOL(simple_unlink);
 EXPORT_SYMBOL(simple_read_from_buffer);
 EXPORT_SYMBOL(memory_read_from_buffer);
+EXPORT_SYMBOL(simple_transaction_set);
 EXPORT_SYMBOL(simple_transaction_get);
 EXPORT_SYMBOL(simple_transaction_read);
 EXPORT_SYMBOL(simple_transaction_release);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 79be937..2ebe3ce 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -9,8 +9,6 @@
 #include <linux/limits.h>
 #include <linux/ioctl.h>
 
-#include <asm/page.h> /* for PAGE_SIZE */
-
 /*
  * It's silly to have NR_OPEN bigger than NR_FILE, but you can change
  * the file limit at runtime and only root can increase the per-process
@@ -2173,19 +2171,7 @@ ssize_t simple_transaction_read(struct file *file, char __user *buf,
 				size_t size, loff_t *pos);
 int simple_transaction_release(struct inode *inode, struct file *file);
 
-static inline void simple_transaction_set(struct file *file, size_t n)
-{
-	struct simple_transaction_argresp *ar = file->private_data;
-
-	BUG_ON(n > SIMPLE_TRANSACTION_LIMIT);
-
-	/*
-	 * The barrier ensures that ar->size will really remain zero until
-	 * ar->data is ready for reading.
-	 */
-	smp_mb();
-	ar->size = n;
-}
+void simple_transaction_set(struct file *file, size_t n);
 
 /*
  * simple attribute files
--
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