Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4630468img; Tue, 26 Mar 2019 13:20:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/6kODy1k6lBd/nODzTUwnZ3V/o2u7O1Nzm4vaE/dLXKk+dpb9EN4L8ikweW7loeNHdAO+ X-Received: by 2002:a62:cd8c:: with SMTP id o134mr31150505pfg.84.1553631620746; Tue, 26 Mar 2019 13:20:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553631620; cv=none; d=google.com; s=arc-20160816; b=tk8eehRmeTX+///w9ii0REUxObM3sjwXbzmlRTx4UM9U1ZYaR9aLsuyouh4FmIyMWs 3RxH+d2lAYtmTbdzo1Y2rMa2MmxCh8iczVzlVdAi7o0Gg3or4ibZTOLrtQmPzYVvh/mR PU2WLblB2mSaI+nHKr6+FqwB8IRf4R25NVvUgr9AEpQovGqh41Gx1JDDRti4gwUBSxFJ Rh31d6zBKLqQ/NPaquHNNyJwahZ2ZNgJs77mKM7hqcX4OR4mmJFv/GCKvD5pzAaChbi2 Gz1N4KEtStQZsgzL2Pps51zsVe3e7190zw+L53sq+F5uz+tra+V6JXiFzBuvW7s9JnTV LT7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=hB29KTCJlsbqFhKCwkDQh+R5X5tiePaO6kD9ZEWJZbo=; b=nC2PgQIty2GMRUm94R2iBZQ7irqIY1+iSLQsoIx9AHbt33+5KMvm1Ref27LLHOB0hB hYEDyTnl/Xc7DHZd4+i0uL3I71YYPmFsfn/JerfV+On1g9RohcuLJnxE3tfVuY8qdweX VAvYRzjGt/DTz4mcDt9wYJq2Xz8j0ftDcFAuxH9sW9XjO/ELqSbQg/7bcqUlAqbdkvVy zNeGOeU2DqaSW3vypnAmdqtBdCpOmPSz1BhqDGPRJ2YByQ40JifahoAQ0oJNcc3zXVhM 7qt9KOVXsnONF3WGdaaUxB1YvvuwtOMP0bh8N2STOhorNCos3cMiBoMq6kXxqPWzEMPP lmjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=OQ0tJ4hP; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d40si17956103pla.114.2019.03.26.13.20.05; Tue, 26 Mar 2019 13:20:20 -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=@google.com header.s=20161025 header.b=OQ0tJ4hP; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732709AbfCZUTY (ORCPT + 99 others); Tue, 26 Mar 2019 16:19:24 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:37198 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731701AbfCZUTX (ORCPT ); Tue, 26 Mar 2019 16:19:23 -0400 Received: by mail-io1-f68.google.com with SMTP id x7so12052798ioh.4 for ; Tue, 26 Mar 2019 13:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hB29KTCJlsbqFhKCwkDQh+R5X5tiePaO6kD9ZEWJZbo=; b=OQ0tJ4hPqATnNwystXYKaNCD6UwL4/fn6mB5FjSIT7nVHn9ZHVjLZh0CMgN/brQrXT aYz6NoTlh8J65LM3tlc86k0Txf9ueKoV3gRloJbdspXVXYX3WkMeKgqh3qDeQu2+0HoG B6no9aLMDIzH7YGkM2iTOkVbPUV9sOoBR5zkQNw++/AlKs12qosWNOOIF0O9XMm8epIg LsVRWZqQ9vHJ52cyp1QlthYMFfGoqNfiA/0A/qNH1ZSPh8qCrf93jJwP2XUSJptAo2kC xZiVKKYya8uktZ9LPP9n7+jki09yQRga4RnKJtsnmH0rxosZa9KcuAloNQaKsLiEVL9x lQ5g== 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=hB29KTCJlsbqFhKCwkDQh+R5X5tiePaO6kD9ZEWJZbo=; b=ThA37iHCe86KFGFJRZggVFD442xMTcMP61TG39vZcOR9gRmcZzh7s5oQsw8gKj6D0q F9Q/alVti11RJ6O2fm5PHpRHlGYvgFq8It+7w2ioc1tTXg+xtDRSFMXrKj9gcQMbL0tg rPTousJejvdvZ9akvFJwxK/vGxZkT9AtaHnm1Pw1+LyxfCZYKApyFchfsIZ/e92qgTo0 Qmkj2AyiJm3S/laQdGOE79ZoRyt6gV6YSET8mzNkAeY4kw7xxcTHb77XrEUkRDth+uh/ NZ0Pg6eSrjCR0mpesi7JVOOYCeE/7RvGav60xXavZKPCEuXHqfuubLoiz6vNuTuNoq7W ij1Q== X-Gm-Message-State: APjAAAUWC8mDnWg4ow5kXuQVme/3+CdZEUIkgyVz5h8VjIGL8nlaVrij dDgGViRFYp4rE79vntpiG0zVlF90ywk+AaNu03kzTw== X-Received: by 2002:a6b:e509:: with SMTP id y9mr22448630ioc.169.1553631562467; Tue, 26 Mar 2019 13:19:22 -0700 (PDT) MIME-Version: 1.0 References: <20190325220954.29054-1-matthewgarrett@google.com> <20190325220954.29054-24-matthewgarrett@google.com> <20190325164221.5d8687bd@shemminger-XPS-13-9360> In-Reply-To: From: Matthew Garrett Date: Tue, 26 Mar 2019 13:19:10 -0700 Message-ID: Subject: Re: [PATCH 23/27] bpf: Restrict kernel image access functions when the kernel is locked down To: James Morris Cc: Andy Lutomirski , Stephen Hemminger , Linux API , LSM List , LKML , David Howells , Alexei Starovoitov , Network Development , Chun-Yi Lee , Daniel Borkmann , Kees Cook , Will Drewry 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 26, 2019 at 11:57 AM James Morris wrote: > - Assign an ID to each lockdown point > - Implement a policy mechanism where each ID is mapped to 0 or 1 > - Allow this policy to be specified statically or dynamically One of the problems with this approach is what the default behaviour should be when a new feature is added. If an admin fails to notice that there's now a new policy element, they run the risk of kernel integrity being compromised via the new feature even if the rest of the kernel is locked down.