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 06700C3F2CD for ; Tue, 3 Mar 2020 13:34:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC44220842 for ; Tue, 3 Mar 2020 13:34:55 +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 S1729459AbgCCNey (ORCPT ); Tue, 3 Mar 2020 08:34:54 -0500 Received: from mail-il1-f194.google.com ([209.85.166.194]:44058 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727167AbgCCNey (ORCPT ); Tue, 3 Mar 2020 08:34:54 -0500 Received: by mail-il1-f194.google.com with SMTP id x7so2716980ilq.11 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=IoYUrXED3NxodQ8fkOzSOfydRl8+Ir3mA00ZD+YVayHROS7ZXVPJXIzcOTdsCbtqFT Q5N9ctvffp9s1Rr100AAfCOT2Cfp+LvHyLMVituctp2N2ph51Pg7Et16Flib2qd5Ysd/ o9dsT2wwORG/Gb5yg15nfRW1xJSWVTphJb0aDj19a+zhBeqsVhRFAI34xDQXlrPjO78l vPFxj6F5H+jImsDh/s/dHNi8CvtFvtAe2XeLDJhgYx2a5hiLYGzJS1l4sHzwK9T2MSoX 5t0Hc7JxpC3NtfTnAiXIqE4bvLPcaU7bcV2f5zZBj+OLYyzSw8kvV4iDHxf3c2lBgEV0 zdRw== X-Gm-Message-State: ANhLgQ3IlPRuY+rsLM0ji8s7xietbqlaRfIn13aKlEtg8WnJxvdTGvKk W2ZKAdEOusJvsEP8HjFtx1EZxhfCnZcH7q6jjzpSTQ== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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