Return-path: Received: from mga14.intel.com ([192.55.52.115]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fFSKk-00079N-4d for speck@linutronix.de; Mon, 07 May 2018 00:40:46 +0200 Subject: [MODERATED] Re: [PATCH 3/5] SSB extra 1 References: =?utf-8?q?=3Cd4ffdf?= =?utf-8?q?50f25bca207b3942fc4a390d2273487517=2E1525383411=2Egit=2Edave=2E?= =?utf-8?q?hansen=40intel=2Ecom=3E?= <1bf0c44d-c972-2c2e-5d90-4f51b8f2c4c9@linux.intel.com> <20180504160408.GG75137@tassilo.jf.intel.com> <20180504162813.GH75137@tassilo.jf.intel.com> <30de6834-6580-4d88-f5f8-23d8fa8a4bad@linux.intel.com> From: Dave Hansen Message-ID: <325e107b-3c9a-0c55-1c69-24cf604fb026@linux.intel.com> Date: Sun, 6 May 2018 15:40:43 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On 05/06/2018 02:48 PM, speck for Thomas Gleixner wrote: > 1) I read about trusted and untrusted BPF programs. How is that > determined/defined? There's a rather steep learning curve, I fear. There's bpf_map->unpriv_array which tells whether or not you have to deploy Spectre V1 mitigations. That's just derived from CAP_SYS_ADMIN when the map is allocated. Separately, I've seen some hard-coded checks against BPF_PROG_TYPE_*, like may_access_direct_pkt_data(). So I think the trust ends up being anchored in the interfaces that allocated the program (or map?) to begin with, but it's somewhat hard to follow. Is that what you meant?