From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1' Date: Fri, 1 Dec 2017 04:54:39 +0000 Message-ID: <20171201045439.GO21978@ZenIV.linux.org.uk> References: <20171201013304.GM21978@ZenIV.linux.org.uk> <20171201034859.GN21978@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Shmulik Ladkani , Willem de Bruijn , Daniel Borkmann , Pablo Neira Ayuso , Linus Torvalds , David Miller , LKML , Network Development , Christoph Hellwig , Thomas Garnier , Jann Horn To: Kees Cook Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:55338 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752217AbdLAEys (ORCPT ); Thu, 30 Nov 2017 23:54:48 -0500 Content-Disposition: inline In-Reply-To: <20171201034859.GN21978@ZenIV.linux.org.uk> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Dec 01, 2017 at 03:48:59AM +0000, Al Viro wrote: > Something similar to get_prog_path_type() above might make for a usable > primitive, IMO... Incidentally, bpf_obj_get_user()/bpf_obj_do_get() should just use user_path(), rather than wanking with getname()+kern_path(pname->name)+putname(). Note that kern_path() will do getname_kernel() to get struct pathname... Would cause problems for tracepoints in there, though. And that, BTW, is precisely why I don't want tracepoints in core VFS, TYVM - makes restructuring the code harder...