Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp974396imm; Fri, 5 Oct 2018 15:28:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV61w/7guyiMPFcrczMHvd82J2jhPLS+zPRLqAaJ1zSdIu3XS3oZi8iRC9j2D8VwVW/wcMusy X-Received: by 2002:a63:dc14:: with SMTP id s20-v6mr1802065pgg.398.1538778499350; Fri, 05 Oct 2018 15:28:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538778499; cv=none; d=google.com; s=arc-20160816; b=dXMENCGsUhl0HI2u5NsJsbFPEayV/57EXKQTwz5AT/qeou2Tr9QzJ4ZF1D5GDwWys0 KHqPSGCTg2fC12SeLgWpMvlAIOAamv2Pghh21YnVZEIIL8qQAsMAODKxowGM7DR1RRJZ S1HEzqPed8VzkSHd/aqzU2V7yt7ABLNsB32nu8vTHRIk2Q+IJEUklGJJhQ7ZOM6KM3hH QNJ3Hvc+9UhFdhSDHGMoNrMfZm84ziwQHRhdZiY9P4hRbojGx5MaiaYyRpPJ9cfe+xwl dqqV44jW9PtXATd/tMhCeWX2wzOPMqjuxSkaoXTbteQYm42I/d8MeiBcYShtSjteOIYn u3eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Nq7sfuDcl8PWT1hmaQIotPDxXd5/W1IvtSFKuf5NWKE=; b=y8HKz5KJZ2R+Em9ORveJNVyi58MRwVUnrl8iuTbQrCRKj59TtDxShrgvqUdO409VNO y/AP4Fqo0pnZNEEvSUKKXCFABmyl4mPTeFTtPtG67Gi9RMKJ4px55XW0uHxgQ+jGh0us bmv+G9iPFBEvbp2/o0OY9CD9mPtVHihwMS5whwUqr4+OjwqU8ZANZLNSus+yJFD8wyuc 9TytgXXmlVhdDUr/VrVvRobV1/5nGeyXGQDo9ZuzbRHAXEacrKD/1MAnQeVwdsDIU1Us v0qQTuBm6foG7pmsu4e64/Jr3f/a71oBeWXUPELUpXqeJNwW+paLm2wtdCc4N8c+9CXP TVCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FYDjuzcq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4-v6si10529021pfe.142.2018.10.05.15.28.03; Fri, 05 Oct 2018 15:28:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FYDjuzcq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728805AbeJFF2n (ORCPT + 99 others); Sat, 6 Oct 2018 01:28:43 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:45638 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726577AbeJFF2n (ORCPT ); Sat, 6 Oct 2018 01:28:43 -0400 Received: by mail-pf1-f194.google.com with SMTP id u12-v6so2564706pfn.12; Fri, 05 Oct 2018 15:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Nq7sfuDcl8PWT1hmaQIotPDxXd5/W1IvtSFKuf5NWKE=; b=FYDjuzcqGEEZyP14+93XgVuw2jR0VcPXwmEEGkcKbWcsN0kyzPyZI8fcNEpPwRW7P8 hTtSyvcjtSmxE+EygcpeLzyUmwwfcqt+E8ZKOBDCtJTttBgizRvJW/4SInChcdNGDP5A Y6/6x8nQU2+tfHx/ynvPxA0fZig/pnTQTiHSMxwblPviSHYcRyG3sw0trcP37CXtqoCt 5tZft5kvZlXFWQCRmdV8lWfsZcRcMHXwS/H9/0kbQGfUpWR1zpnk6E/3hDbfpSu/TN4t UGUhTSE7cZrhEYCfrH1XpPv7a2TRW7ynGDw+emBuv/GTNQKqanvJ5Fe/BIU6g1JNDDBm f3Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Nq7sfuDcl8PWT1hmaQIotPDxXd5/W1IvtSFKuf5NWKE=; b=pOuEE4lKyY4DHFFvXXTxuYsi7xThWdzPyXIFohdJp2uCyEIqOcwVBNTOpzMuYuaBu3 Hmtqaqw7I2JwWThY0VKaTG7bLL22gHAdlE5/2Or/hdHqAxuCmhS1vnRfZowKG+Ovh9w+ 8Hx0WvDTdSz2fInneCb79sIHw4jRCE/IrVoK1EVUkL63rr9v7h+T/F5e2i3CJTj7xGe/ xkwdBO19w4mFhCnR1ddIdx9gDXHHTqW5cpeo4ee+DKJHgM+tg4AMLgBIamQ6hX7c9NDs eSAzByyFmEUD3fVSQfA1Myzi7PU09sco+oRet1slZgVWumU3nHZkkqKXEsiXDKFYwSEe v1TQ== X-Gm-Message-State: ABuFfoispL5KOfzrMFdMr+/m5/u3Xw0vhYdHf7nkG/RKtkbKeeuuLZmZ p8KTUcTcUlQTmCzLMw1JrHzPC+DK X-Received: by 2002:a65:40cd:: with SMTP id u13-v6mr11920280pgp.334.1538778476644; Fri, 05 Oct 2018 15:27:56 -0700 (PDT) Received: from ast-mbp.dhcp.thefacebook.com ([2620:10d:c090:200::4:fc91]) by smtp.gmail.com with ESMTPSA id c21-v6sm15182546pfe.93.2018.10.05.15.27.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 15:27:55 -0700 (PDT) Date: Fri, 5 Oct 2018 15:27:54 -0700 From: Alexei Starovoitov To: Andy Lutomirski Cc: Al Viro , Alexei Starovoitov , "David S. Miller" , Daniel Borkmann , Network Development , LKML , kernel-team Subject: Re: [PATCH bpf-next 1/6] bpf: introduce BPF_PROG_TYPE_FILE_FILTER Message-ID: <20181005222752.l5da54rpww6tlyfy@ast-mbp.dhcp.thefacebook.com> References: <20181004025750.498303-1-ast@kernel.org> <20181004025750.498303-2-ast@kernel.org> <20181005044659.GU32577@ZenIV.linux.org.uk> <20181005220518.747ri4q34obrnaoc@ast-mbp.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 05, 2018 at 03:09:20PM -0700, Andy Lutomirski wrote: > On Fri, Oct 5, 2018 at 3:05 PM Alexei Starovoitov > wrote: > > > > On Fri, Oct 05, 2018 at 05:46:59AM +0100, Al Viro wrote: > > > > > Another problem is your direct poking in ->i_ino. It's not > > > something directly exposed to userland at the moment and it should > > > not become such. > > > > The patch is not making i_ino directly exposed. > > Only 'struct bpf_file_info' is exposed to user space / bpf programs. > > I think Al is saying that the valie of i_ino is not something that > user code is permitted to know regardless of how you format it because > it may or may not actually match the value returned by stat(). > Another way of saying that is that your patch is digging into an > internal data structure and is doing it wrong. several fs implementation I've looked at just do generic_fillattr() for these fields. Are you saying some FS don't use inode->i_ino at all? And it's bogus, hence shouldn't be read?