Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4527376imb; Wed, 6 Mar 2019 16:01:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxTlCrWJuAvVIUHPYMEAPh41kJcGZvL5cF1E4qeV5Ly0Q06scSoyliDyoZN0q/RAho6FeS0 X-Received: by 2002:aa7:81c5:: with SMTP id c5mr10152782pfn.217.1551916901498; Wed, 06 Mar 2019 16:01:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551916901; cv=none; d=google.com; s=arc-20160816; b=h0pfovcK8Y0pRoTE2wvWtcL8jF22TD6Yu/xpmNBw+v2V3t8/PYzIAEew/iP/tK4HdZ 6nx2ZhdANElNmE/u2SBDuKHIROb9wAoXnh8ozrF8ER1p6/4rRKgi4yndsjYRkjejbpHU FDYtZOruQdk4asSYS1o4wGvD564boc6CHZ1NMe54tleHRIZHZnkggmISvRMpvhx6fQAc iZB4iGmyAXAb0gYsuTZJM6+oalSyJ4oOR04D/y6VAxHIKV/WzQ8/sXONFpIrHvRH498s x1D8ljnxH+y1uzZkIoKD9whu7lVAE69g29HER/2PAwdYNLp17bzsjY+wrbEIu8S63Dko eTDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=Sa+SgQnAHCfBo1mo2uJRDE5jhlzcMXQqHsZYr3YiEB0=; b=F0ZBqmiC7bmvMoYVfy2KjaMiTSffQXsZ8tKnmgIWs/cVOye/BJSiYU6r8zxJqhQ1tj NyaWpqcthe1Qoo/AGAElypwc4eEItP4PW7LDzhwa2Z6WweoBa07Lh+aJsIMAMYBnVy4m QAN4BnUjCeam7xzfOI5RYFVbVKnHIMmJ+y3vwuCH3TvglnCnVbrY0XACRX8qamYseqRQ gOI3fX8/fkQCoeUPMNtpva/aBmVCT8BdCDjZZu6t2nv8qxCU5BhJLRjOfhYwIZhsrzTb pyufcRfYZMl41ZkM4ORfaXiB5bpizrOMzbkXYyJm5Nv0Lvr89DQMUWKEsPHg9mK/cqcO bOtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XHVjtwKc; 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 n1si2492266pgv.545.2019.03.06.16.01.25; Wed, 06 Mar 2019 16:01:41 -0800 (PST) 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=XHVjtwKc; 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 S1726775AbfCGAAn (ORCPT + 99 others); Wed, 6 Mar 2019 19:00:43 -0500 Received: from mail-io1-f73.google.com ([209.85.166.73]:34712 "EHLO mail-io1-f73.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726762AbfCGAAj (ORCPT ); Wed, 6 Mar 2019 19:00:39 -0500 Received: by mail-io1-f73.google.com with SMTP id b14so7190946ioh.1 for ; Wed, 06 Mar 2019 16:00:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=Sa+SgQnAHCfBo1mo2uJRDE5jhlzcMXQqHsZYr3YiEB0=; b=XHVjtwKczBVt6maHMDsBdQD040XvH2+tNtSVuU/nCfJ3PvcWW6Bmf9bvU+Tzoa+W4R FCbE0UrP5nNV1jU5XjJOZkqnPv4x8ko6PJzMBy4FlEKFmjjVjxqmkjJCAzcJTFvEnrsw Un33zXRpj5Edgxlf98Lt0dcO/fZfeodDmrbtLvSJZJUXfyz0FNW2iHBLnNV13g+qlrrT Nq6DCE8jBi4q/GiJCJ2yZyIcUV0AkF4YICved/SAe8Y82vMT0X5J2Gp4dWSpra1gXiOc s+QbGBDccRLIxR+/sSp8jSFkaLhOBcXALLPuavGxyzenZ2EnYEFK759MKEqj781jAqsV A0ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=Sa+SgQnAHCfBo1mo2uJRDE5jhlzcMXQqHsZYr3YiEB0=; b=FIZprgLn0OMJMk4HDu2Mv+sMTvOSYXVqblMNUrNxcPlv+3KHIb8ONuUTXyJzr7Fsc6 tSKfuuS+VmnjLboghKGsO1ul9fkt5fqru2x0fYd7E2NEFT1nhTG7VfjNOnXFHDlmX1ev 8rAvS2TEsltAQhj4iVDXfDdkf+twWaT9lvUvFwM2Oz8+jzrxN8F76mGna7jwuFpgad3m 01/YbmuizDqJ+XBTPiTfaHz4JvpOA53dz2x2DoEFp7XcoyeTN2rSPeoGSUdV8q/ih4/l QD10JE/OObbVxer7a9kp8MhoypVUjKiJkMoLueTW27L9cvD7cx348NB3OQBmLHWk1JBs qZ4w== X-Gm-Message-State: APjAAAXnL+44xgjsqsqUrY1HV8LEaSoNBhDVSl9w0EGUJfvrrUrPKARq tY9SPbvxBHakylAp1v/3SDrF7MRUR6hIKS1uECNBAw== X-Received: by 2002:a24:6cd5:: with SMTP id w204mr7949254itb.16.1551916838783; Wed, 06 Mar 2019 16:00:38 -0800 (PST) Date: Wed, 6 Mar 2019 15:59:13 -0800 In-Reply-To: <20190306235913.6631-1-matthewgarrett@google.com> Message-Id: <20190306235913.6631-28-matthewgarrett@google.com> Mime-Version: 1.0 References: <20190306235913.6631-1-matthewgarrett@google.com> X-Mailer: git-send-email 2.21.0.352.gf09ad66450-goog Subject: [PATCH 27/27] lockdown: Print current->comm in restriction messages From: Matthew Garrett To: jmorris@namei.org Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, dhowells@redhat.com 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 From: David Howells Print the content of current->comm in messages generated by lockdown to indicate a restriction that was hit. This makes it a bit easier to find out what caused the message. The message now patterned something like: Lockdown: : is restricted; see man kernel_lockdown.7 Signed-off-by: David Howells Signed-off-by: Matthew Garrett --- security/lock_down.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/lock_down.c b/security/lock_down.c index cfbc2c39712b..5243b55b3c1f 100644 --- a/security/lock_down.c +++ b/security/lock_down.c @@ -58,8 +58,8 @@ void __init init_lockdown(void) bool __kernel_is_locked_down(const char *what, bool first) { if (what && first && kernel_locked_down) - pr_notice("Lockdown: %s is restricted; see man kernel_lockdown.7\n", - what); + pr_notice("Lockdown: %s: %s is restricted; see man kernel_lockdown.7\n", + current->comm, what); return kernel_locked_down; } EXPORT_SYMBOL(__kernel_is_locked_down); -- 2.21.0.352.gf09ad66450-goog