Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5995182ybe; Tue, 10 Sep 2019 11:54:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyW1EBbpblfTgDkRMIDwWWiq9M/lSUAiaudKP7/oQLNkf0jMqHeeVQWWAhnYjRZBMEbAGqk X-Received: by 2002:aa7:da51:: with SMTP id w17mr383649eds.70.1568141651409; Tue, 10 Sep 2019 11:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568141651; cv=none; d=google.com; s=arc-20160816; b=SGV5nouXNUmPwDJw2HGl10vcq0lj2wZwLY6XG/ez3YuOxiN8n2stbXQHbdQwzTj00W 1ZIHfJuqHNKfSlv6Jyy25n3cwRNr54DfnxwfPRVXOkOeB61lYWyOU2PDdjbTaEia6d7N qsknuq4ZAYsmT3WG7/fc9kb35+AdUGBAT2Un0DpDdGB5chotF1TB0trFYrhi9614vLI4 2y2f1T2GcWlVoRW0fdde+LnFM1Yd2YQ3oX87pOx+Myy0u/wbJdf0zcshVopAEUTn+gmd bxAV1Vs+5tu1PV27UxkPz0m5BUZleOtZFDCb9UlOBsMzJbHETdpdD6YxNbyjsqZ30j1e X1XA== 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=YrD7opUTCKF/Dc+PRvwx3vIbiJXUFvJEMZmsR+GeGLI=; b=LrEZf7pMs+yuLH52UsTCo/OHn6fCY6im28HuvxwJSHMy1kASJkHmEV9jF74fn1dh1w A/WIUAHg03IuVEM7jRhgkbavc0zuqNTomXNE+NLApyk11WwCBxY8mVqxObGex9t2ghJt 9+eubWp5tjQm0trVF7G41oyyvqNE/bhQvbDfKbtF7nOEdwPX4jPZwI0dBfJ6uM61N8JU VUX3bMe9Y/kZjaHpp8nHeyYHk9UIuF06hl7QHnMsvp9Wjhmy9fjGDw+jQxwAaPQLR6+8 0HHfDfcf8b22Ro/S49n2rpH6JcY4wCRbMheD85OIJ4S8uto90o4CrNRKO7ZEQanLmS3Y 3MKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="mj/kwfMF"; 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 g10si8913291edp.57.2019.09.10.11.53.47; Tue, 10 Sep 2019 11:54:11 -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="mj/kwfMF"; 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 S2391983AbfIJKGb (ORCPT + 99 others); Tue, 10 Sep 2019 06:06:31 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:41219 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388027AbfIJKGb (ORCPT ); Tue, 10 Sep 2019 06:06:31 -0400 Received: by mail-io1-f68.google.com with SMTP id r26so36038895ioh.8 for ; Tue, 10 Sep 2019 03:06:30 -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=YrD7opUTCKF/Dc+PRvwx3vIbiJXUFvJEMZmsR+GeGLI=; b=mj/kwfMFsOlg1W0Tg86x5PW0kMxOd/8jOfYxBbRuhq/VBKoYHYgwmHMlAch25hIwCX hsumRlADSP8BuzHfk9kQkZonqsY7Tar7qr+8fyW7GHaAQR7wXo2cJ8rOcr++w82KypHE pqYszKBozCCxdsQd4QzZHsxITHg9KRV8G5miLdN8jGQ5jY1XN9kERdLvBSDW4vnVs22F 56ecEc349oYv4wzwfbNezEKgN7yvZtTW1/gNhDJGAp0t4aG51+yyvxDOPHsUvI8tjQSV D1RgLvAZZ3VMnvYGXc1w4LxkIOm7ODnR7PYHHXSDRlpjTSoyvuRXrJx53VQ1ZH+2CwUn hegw== 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=YrD7opUTCKF/Dc+PRvwx3vIbiJXUFvJEMZmsR+GeGLI=; b=ufcvp8nCoJEdlUtmSIAXTUXELmx0xeW3EIcUd5m7UNcgVVfqGLY3KIz8CUVyXt+mxh qEPdGMFbQjoCgxP6bIu4lD6qVVLh4CsDo3gRcRdA6FCqT44qb2sLhE9J0ta9Sb9vri+b FTgUdY6L98PITz54bu4oC9TpzdqljMHOZoELBND+2DFDh/Gb0k+CN3tl8jJM+v9JxNuy g9xxy6UcEfG769y9HT0CmF9fVzn/MmyKL2ZLcpUxzZ5CscepuMYDNmO7XlN4e9VEn8Nl wd3GsAfi0uk6ul8943jt4UZHknsraKFKGNfxwk5pi+SxL+SV4rr73w5FzDhHOWV/ihSI 3vWw== X-Gm-Message-State: APjAAAW1fQ1rYJs90wmuNxWlHSwJE1akz+TO7XH5LCB6K7lCmoZbw25u yhLID79PVGJDbqePaTRDN8v071QD8xq6cLvXPrCmUQ== X-Received: by 2002:a6b:5f11:: with SMTP id t17mr1107180iob.169.1568109989802; Tue, 10 Sep 2019 03:06:29 -0700 (PDT) MIME-Version: 1.0 References: <20190820001805.241928-1-matthewgarrett@google.com> <20190820001805.241928-4-matthewgarrett@google.com> <3440.1567182506@warthog.procyon.org.uk> In-Reply-To: From: Matthew Garrett Date: Tue, 10 Sep 2019 06:06:17 -0400 Message-ID: Subject: Re: [PATCH V40 03/29] security: Add a static lockdown policy LSM To: David Howells Cc: James Morris , LSM List , Linux Kernel Mailing List , Linux API , Kees Cook 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 Wed, Sep 4, 2019 at 12:51 PM Matthew Garrett wrote: > On Fri, Aug 30, 2019 at 9:28 AM David Howells wrote: > > > +static int lock_kernel_down(const char *where, enum lockdown_reason level) > > > > Is the last parameter the reason or the level? You're mixing the terms. > > Fair. Actually, on re-reading, I think this correct - this is setting the lockdown level, it's just that the lockdown level is an enum lockdown_reason for the sake of convenience.