From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E950FC3F2C6 for ; Tue, 3 Mar 2020 13:34:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF16B20838 for ; Tue, 3 Mar 2020 13:34:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="eEQq5fiM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729447AbgCCNey (ORCPT ); Tue, 3 Mar 2020 08:34:54 -0500 Received: from mail-il1-f194.google.com ([209.85.166.194]:43237 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727913AbgCCNey (ORCPT ); Tue, 3 Mar 2020 08:34:54 -0500 Received: by mail-il1-f194.google.com with SMTP id o18so2724124ilg.10 for ; Tue, 03 Mar 2020 05:34:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=d8UZDr3lZGFyJivNM6em5ybzB9qz5QGiZZazZdznXqk=; b=eEQq5fiMKdVd42vqfExJKz3i8PtBQaz26xc++cNx+VS/zkeI5e09ipMisnSMiHdrf5 u+xmYZFz/xI0z/5+EySdWurVl96IIsUyghbPc5Vppji0ZZ9iQNhE7e1tgdNfKcxWAAes y80ESNGhn+KNkkn+eLigS588MUERmZAN3AgMs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d8UZDr3lZGFyJivNM6em5ybzB9qz5QGiZZazZdznXqk=; b=HUoXz8pRJzujbm0WLUOiQHxpRD+TN74EFHA00KItCB3o8ha4TmmUIvSCcbJJpe8Z5J N/OC5PieHdA5f0bxhVOfUK8oUssJEfOulxogbhPg0MXIqrqhiuBVUmYXiyGv8UlojrDc aYKofgrjCaeNWBwX4yvR9jIGzJX0CBRBzHu1rKS2+vsId1GGAiyDLp9ob5vxiqtVNjAF a+88ZAV7jcFeVNpAcxALQiJSV6WMNC1RwZ+odis2+czuBNjnuK0crxS0jEcG7/CpG9+g b3AeBbf8ulOM+uig5pL4TbfCI7xrrFW7lyM4JIpQD/RYYrNhugqfcAr5YGtPNgTNGmHL UPFA== X-Gm-Message-State: ANhLgQ20G/dPNX8/98evCErzj7iirUckEMIjRw+jaSQj93L451J0kC2x CMXBEvR7luzcX3fV5ZhcJjvBVQVpspOWodu+MN+l3g== X-Google-Smtp-Source: ADFU+vse5bB7gLvCvFy8XryGmsALFqGE4Oyf3LKEtJstP+x5Mc4KlKOxwSw8ylASXSSbsPp5ZHBKAyS4fw1aRsVzAO8= X-Received: by 2002:a92:8847:: with SMTP id h68mr4667878ild.212.1583242493712; Tue, 03 Mar 2020 05:34:53 -0800 (PST) MIME-Version: 1.0 References: <1582644535.3361.8.camel@HansenPartnership.com> <20200228155244.k4h4hz3dqhl7q7ks@wittgenstein> <107666.1582907766@warthog.procyon.org.uk> <0403cda7345e34c800eec8e2870a1917a8c07e5c.camel@themaw.net> <1509948.1583226773@warthog.procyon.org.uk> <20200303113814.rsqhljkch6tgorpu@ws.net.home> <20200303130347.GA2302029@kroah.com> <20200303131434.GA2373427@kroah.com> In-Reply-To: <20200303131434.GA2373427@kroah.com> From: Miklos Szeredi Date: Tue, 3 Mar 2020 14:34:42 +0100 Message-ID: Subject: Re: [PATCH 00/17] VFS: Filesystem information and notifications [ver #17] To: Greg Kroah-Hartman Cc: Karel Zak , David Howells , Ian Kent , Christian Brauner , James Bottomley , Steven Whitehouse , Miklos Szeredi , viro , Christian Brauner , Jann Horn , "Darrick J. Wong" , Linux API , linux-fsdevel , lkml Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, Mar 3, 2020 at 2:14 PM Greg Kroah-Hartman wrote: > > Unlimited beers for a 21-line kernel patch? Sign me up! > > > > Totally untested, barely compiled patch below. > > Ok, that didn't even build, let me try this for real now... Some comments on the interface: O_LARGEFILE can be unconditional, since offsets are not exposed to the caller. Use the openat2 style arguments; limit the accepted flags to sane ones (e.g. don't let this syscall create a file). If buffer is too small to fit the whole file, return error. Verify that the number of bytes read matches the file size, otherwise return error (may need to loop?). Thanks, Miklos