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: <460FCA90.4000003@argo.co.il>
Date:	Sun, 01 Apr 2007 18:06:56 +0300
From:	Avi Kivity <avi@...o.co.il>
To:	Davide Libenzi <davidel@...ilserver.org>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Suparna Bhattacharya <suparna@...ibm.com>,
	Zach Brown <zach.brown@...cle.com>,
	Benjamin LaHaise <bcrl@...ck.org>
Subject: Re: [patch 13/13] signal/timer/event fds v9 - KAIO eventfd support
 example ...

Davide Libenzi wrote:
> This is an example about how to add eventfd support to the current KAIO code,
> in order to enable KAIO to post readiness events to a pollable fd
> (hence compatible with POSIX select/poll). The KAIO code simply signals
> the eventfd fd when events are ready, and this triggers a POLLIN in the fd.
> This patch uses a reserved for future use member of the struct iocb to pass
> an eventfd file descriptor, that KAIO will use to post events every time
> a request completes. At that point, an aio_getevents() will return the
> completed result to a struct io_event.
> I made a quick test program to verify the patch, and it runs fine here:
>
> Index: linux-2.6.21-rc5.fds/include/linux/aio_abi.h
> ===================================================================
> --- linux-2.6.21-rc5.fds.orig/include/linux/aio_abi.h	2007-03-31 12:45:30.000000000 -0700
> +++ linux-2.6.21-rc5.fds/include/linux/aio_abi.h	2007-03-31 12:46:31.000000000 -0700
> @@ -84,7 +84,11 @@
>  
>  	/* extra parameters */
>  	__u64	aio_reserved2;	/* TODO: use this for a (struct sigevent *) */
> -	__u64	aio_reserved3;
> +	__u32	aio_reserved3;
> +	/*
> +	 * If different from 0, this is an eventfd to deliver AIO results to
> +	 */
> +	__u32	aio_resfd;
>  }; /* 64 bytes */
>  

What is the motivation for adding aio_resfd to an individual iocb 
instead of the entire io context?  It seems redundant, as you can 
already create multiple io contexts to wait on.

[also, minor nit: sys_eventfd() can legitimately return 0, but you're 
banning its use in aio.  userspace could easily dup() and close(), but...]

-- 
error compiling committee.c: too many arguments to function

-
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