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] [day] [month] [year] [list]
Date:	Sun, 22 Feb 2015 17:46:47 +0200
From:	Boaz Harrosh <openosd@...il.com>
To:	Nicolas Iooss <nicolas.iooss_linux@....org>,
	Al Viro <viro@...IV.linux.org.uk>
CC:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] proc: get a reference to the owning module when opening
 file

On 02/21/2015 01:52 PM, Nicolas Iooss wrote:
<>
> 
> I'm basically developing a project where I created an out-of-tree module
> which uses mmap() as a kind of communication channel between a kernel
> module and a userspace program (in short, a ring buffer).  The virtual
> file which is used for mmap() was initially created in debugfs, but as
> this filesystem is not always mounted on production systems, I needed
> another one and ended up using procfs.  I did not consider creating a
> character or block device in /dev as I wasn't at ease with grabbing a
> major number which could potentially conflict with other out-of-tree
> drivers.  As using procfs seems not to be fine, I guess I'll anyway use
> a block device with a major number in the experimental range (240-254).
> 
> In short, the module I'm writing does not have to be in procfs, and I've
> got funnier things to work on than cleaning up vm_operations_struct.
> 

I know that some in-tree drivers do similar things with shmem (tmpfs).
shmem even has an in-kernel API for drivers to create and lock pre-allocated
files, so when user-mode loads they already find what they need.

You should check it out it should have a much better mmap semantics
for you, since it is a real FS.

> Thank you for your detailed reply.
> 
> Nicolas
> 
<>

Good luck
Boaz

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