From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22745C43381 for ; Thu, 28 Feb 2019 23:13:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DEE122133D for ; Thu, 28 Feb 2019 23:13:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="oMSabQYS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388243AbfB1XNS (ORCPT ); Thu, 28 Feb 2019 18:13:18 -0500 Received: from mail-io1-f74.google.com ([209.85.166.74]:48110 "EHLO mail-io1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388172AbfB1XNP (ORCPT ); Thu, 28 Feb 2019 18:13:15 -0500 Received: by mail-io1-f74.google.com with SMTP id p12so16957928iod.14 for ; Thu, 28 Feb 2019 15:13:15 -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=7o31AusohNb959PRfakB/D1YmTnIqZCzH/ljQnTAp4Y=; b=oMSabQYSh5BEnjbYGEt+9TN7Xn+nTrX7vyeNAkn7Hg7wqae8z2ha9ZxQUgPwIa4uOT D9EqfjspaqUQMQD9DR0P64E7c6/9e5DTMbgrejyEbgKt8/B2ED1B2AfeToabME/vKcJS F1s2URj9svBxho3mIVh7eI2Hh0m1OzlMX3SwFyWICfJ3RBuyZUo5kQC+PhEEiHyqWCVK 92QW9m+UzGGHovCtmYgAEoRQsDilDe/a2lqHWWKbGmKCrI+VFgd8IOQR7iOqB+vAN4fb P3tFWNnSXJ2+GjPS14Xl0ue2sairI2sv5DUJIqT1o7fqRGM1PNkKwcYFw//QEsu3B8ib iT6Q== 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=7o31AusohNb959PRfakB/D1YmTnIqZCzH/ljQnTAp4Y=; b=o5yZppoFv4GCjkl3MGiPuHsq4OVnkuUVWhATS3PQhVMUdchb2ykBhu03ta2SRS0gDn GxYwWaXjrpfpYLHezvDPA1lM7DBOldnyZPxlUwel7hLccLUHeBjuiCwEZ8ckFZEpmGwS 3qjQcxoYxcA764kA5cbOKaf9fbgPBzvtvIJcP2WwifprdTTu8RowI49Rk3zOusJRxuGI +ML+xQHK2D5RfiSuCjZJnnkYyDJX3oabqjHql74SwIOH5yXMjQnmF2lbwV+hNCR6ZGVx BdFFNkcMlNKm+7LWcJ+IpBlFUFibpcffzNk5PFkTpKdaWabBeT5pBuC+u7bCKaTNldvk sgKQ== X-Gm-Message-State: APjAAAUGpAvisQHpkgv6CNCMfuoWiu/Ak0RRGp8bg52Oz9BKACJq+KgL TqViBfDKGAhB23Q0Ut0/Bk6cJHK7anOgeQlP6n3brw== X-Google-Smtp-Source: APXvYqz85FIjQCIycs1HBz9ec4dvIvyrWTRZIyhimnBeV4YZuCRUEi0ZSjJmX6p4cWT4jfxZgD/dNItVttOpZKRT+49geA== X-Received: by 2002:a24:5dc9:: with SMTP id w192mr1465559ita.33.1551395594739; Thu, 28 Feb 2019 15:13:14 -0800 (PST) Date: Thu, 28 Feb 2019 15:12:03 -0800 In-Reply-To: <20190228231203.212359-1-matthewgarrett@google.com> Message-Id: <20190228231203.212359-27-matthewgarrett@google.com> Mime-Version: 1.0 References: <20190228231203.212359-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 --- 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