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]
Date:	Thu, 10 Jun 2010 13:23:37 +0200
From:	Tejun Heo <tj@...nel.org>
To:	Miklos Szeredi <miklos@...redi.hu>
CC:	hmajxxlh@...bac.com, fuse-devel@...ts.sourceforge.net,
	mszeredi@...e.cz, linux-kernel@...r.kernel.org
Subject: Re: [fuse-devel] OSS Proxy Jack slave

Hello, Miklos.

On 06/09/2010 12:08 PM, Miklos Szeredi wrote:
> I thought a bit about mmap in the last couple of days, and here's what
> I came up with.  This week I'll take a stab at implementing some of
> this (as a hack week project, let's say :).

Cool. :-)

> First, I think server side mmap might be nice to have but not strictly
> necessary.  I looked at osspd and it just memcopies in and out of the
> mmaped ring buffer.  Replacing those memcopies with explicit syscalls
> to get and put the data should work fine.  I doubt that the latency or
> CPU overhead introduced by the syscalls would actually matter in
> practice.

The latency and CPU overhead perse aren't problematic and for osspd,
copying in and out should be just fine as all update events are
clearly denoted.

> So we have the problem of how to do server initiated data transfer
> to/from kernel buffers.  We could introduce the following
> "notifications", which are initiated by the filesystem:
> 
> store request
>  u64 nodeid
>  u64 offset
>  u32 size
>  u32 padding
>  data...
> 
> retrieve request:
>  u64 request_id
>  u64 nodeid
>  u64 offset
>  u32 size
>  u32 padding
> 
> retrieve reply:
>  u64 request_id
>  data...
> 
> Notice the asymmetry, store doesn't need a reply but retrieve does.
> Which is unfortunate as it makes it harder to impelent on both the
> kernel side and the server side.

How does the kernel know when to issue store or retrieve?

> Next thing is how to deal with multiple buffers for each char device.
> For the above to continue to work we need to make sure there's a
> separate nodeid associated with each buffer.  The most general thing
> would be if MMAP reply contained a nodeid which identified the buffer.
> 
> Do you see any issues with the above?

It relates to the previous question but mmap can also be used without
all updates being notified by some kind of event where the server is
expected to watch the mmapped area and react which is okay if server
can share the mapped page but if it has to poll by copying data out of
kernel buffer each time, it can get prohibitively expensive unless it
can ask kernel "what changes since when?" which would be pretty nasty
to implement.

Thanks.

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