Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753309AbdLDJ6M (ORCPT ); Mon, 4 Dec 2017 04:58:12 -0500 Received: from www62.your-server.de ([213.133.104.62]:51167 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752634AbdLDJ6B (ORCPT ); Mon, 4 Dec 2017 04:58:01 -0500 Subject: Re: netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1' To: Al Viro Cc: Kees Cook , Shmulik Ladkani , Willem de Bruijn , Pablo Neira Ayuso , Linus Torvalds , David Miller , LKML , Network Development , Christoph Hellwig , Thomas Garnier , Jann Horn References: <20171201013304.GM21978@ZenIV.linux.org.uk> <20171201034859.GN21978@ZenIV.linux.org.uk> <20171201045439.GO21978@ZenIV.linux.org.uk> <20171201173941.GP21978@ZenIV.linux.org.uk> <7bbe72a8-dbbe-3343-765d-cc53eb40e0cd@iogearbox.net> <20171202184850.GQ21978@ZenIV.linux.org.uk> From: Daniel Borkmann Message-ID: <86b5eb89-39cb-cbf5-024c-ce804876e46f@iogearbox.net> Date: Mon, 4 Dec 2017 10:57:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171202184850.GQ21978@ZenIV.linux.org.uk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1296 Lines: 30 On 12/02/2017 07:48 PM, Al Viro wrote: > On Fri, Dec 01, 2017 at 09:47:00PM +0100, Daniel Borkmann wrote: >>> Might want to replace security_path_mknod() with something saner, while we are >>> at it. >>> >>> Objections? >> >> No, thanks for looking into this, and sorry for this fugly hack! :( Not >> that this doesn't make it any better, but I think back then I took it >> over from mqueue implementation ... should have known better and looking >> into making this generic instead, sigh. The above looks good to me, so >> no objections from my side and thanks for working on it! >> >>> PS: mqueue.c would also benefit from such primitive - do_create() there would >>> simply pass attr as callback's argument into vfs_mkobj(), with callback being >>> the guts of mqueue_create()... > > OK... See vfs.git#untested.mkobj; it really needs testing, though - mq_open(2) > passes LTP tests, but that's not saying much, and BPF side is completely > untested. I pulled vfs.git#untested.mkobj into my local tree and ran tests for both progs and maps on it, all went fine and the patch looks good to me. For 'bpf_obj_do_pin(): switch to vfs_mkobj(), quit abusing ->mknod()' when you push the fix to Linus, feel free to add: Acked-by: Daniel Borkmann Thanks for your help, Al!