From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Moyer Subject: Re: [PATCH 4/8] aio: add aio_read_pages and aio_write_pages Date: Mon, 26 Oct 2009 13:08:25 -0400 Message-ID: References: <1256243157-16667-1-git-send-email-zach.brown@oracle.com> <1256243157-16667-2-git-send-email-zach.brown@oracle.com> <1256243157-16667-3-git-send-email-zach.brown@oracle.com> <1256243157-16667-4-git-send-email-zach.brown@oracle.com> <1256243157-16667-5-git-send-email-zach.brown@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Zach Brown Return-path: Received: from mx1.redhat.com ([209.132.183.28]:25603 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753373AbZJZRI3 (ORCPT ); Mon, 26 Oct 2009 13:08:29 -0400 In-Reply-To: (Jeff Moyer's message of "Mon, 26 Oct 2009 12:17:52 -0400") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Jeff Moyer writes: > Zach Brown writes: > >> This adds read and write file operations which specify memory with an array of >> page pointers, offsets, and lengths. AIO commands are added which call these >> methods. Fields are added to the iocb to specify the pages which are passed to >> the methods. >> >> This is intended to be used by callers in the kernel. >> >> Signed-off-by: Zach Brown >> diff --git a/include/linux/aio_abi.h b/include/linux/aio_abi.h >> index 2c87316..5b67ed6 100644 >> --- a/include/linux/aio_abi.h >> +++ b/include/linux/aio_abi.h >> @@ -44,6 +44,8 @@ enum { >> IOCB_CMD_NOOP = 6, >> IOCB_CMD_PREADV = 7, >> IOCB_CMD_PWRITEV = 8, >> + IOCB_CMD_PREADP = 9, >> + IOCB_CMD_PWRITEP = 10, > > I question the merits of adding commands to the aio_abi that cannot be > called from userspace. However, I don't know how else you would keep > things consistent. I guess we live with it. Actually, I didn't see code in the patch to prevent userspace from issuing such commands. Shouldn't we check for that and spit an error? It sounds like a security risk if we don't. Cheers, Jeff