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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120719124907.6250.16564.stgit@ltc137.sdl.hitachi.co.jp>
Date:	Thu, 19 Jul 2012 21:49:07 +0900
From:	Mitsuo Hayasaka <mitsuo.hayasaka.hu@...achi.com>
To:	Miklos Szeredi <miklos@...redi.hu>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Muthukumar R <muthur@...il.com>
Cc:	fuse-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, linux-doc@...r.kernel.org,
	yrl.pp-manager.tt@...achi.com,
	Mitsuo Hayasaka <mitsuo.hayasaka.hu@...achi.com>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Muthukumar R <muthur@...il.com>,
	Miklos Szeredi <miklos@...redi.hu>
Subject: [PATCH -v2 1/6] pipe: make the maximum pipe size referable from
 kernel module

Make the maximum pipe size referable from a kernel module.

The /proc/sys/fs/pipe-max-size defines an upper limit for the
capacity of a pipe. It is also used as an upper limit of a
fuse read/write request size in this patch series. So, it
is necessary to make it referable from a kernel module.

Signed-off-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@...achi.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Muthukumar R <muthur@...il.com>
Cc: Miklos Szeredi <miklos@...redi.hu>
---

 fs/pipe.c                 |    7 +++++++
 include/linux/pipe_fs_i.h |    3 +++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/fs/pipe.c b/fs/pipe.c
index 49c1065..f0f3768 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -36,6 +36,13 @@ unsigned int pipe_max_size = 1048576;
  */
 unsigned int pipe_min_size = PAGE_SIZE;
 
+/* get pipe_max_size */
+unsigned int pipe_get_max_size(void)
+{
+	return pipe_max_size;
+}
+EXPORT_SYMBOL(pipe_get_max_size);
+
 /*
  * We use a start+len construction, which provides full use of the 
  * allocated memory.
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index e1ac1ce..50a16dd 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -134,6 +134,9 @@ struct pipe_buf_operations {
    memory allocation, whereas PIPE_BUF makes atomicity guarantees.  */
 #define PIPE_SIZE		PAGE_SIZE
 
+/* get pipe_max_size */
+unsigned int pipe_get_max_size(void);
+
 /* Pipe lock and unlock operations */
 void pipe_lock(struct pipe_inode_info *);
 void pipe_unlock(struct pipe_inode_info *);

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