Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp41734imb; Thu, 28 Feb 2019 15:22:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzqI76jVv1fmYLWZIM78wcD6rJP4va+m1PHYvP6Pji0H3Z1pByBDN0simJ1KgF5e++ls8TA X-Received: by 2002:a63:eb56:: with SMTP id b22mr1698534pgk.287.1551396129961; Thu, 28 Feb 2019 15:22:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551396129; cv=none; d=google.com; s=arc-20160816; b=uQmVXgjYmHHXKyqerSvjhDpDSV7J3ueml8OZhhuuCD1liOehSBIVzRHBPcn+gy1ioA /IZuxPOxiHkAcFa74dMkyeHs2yGCoFhm07vlK5muW2FqdtT3NHiTb9fn8fMSkXv56l5y x91enbVcEYaRBrJnDUmDr3lfS3R1XKiJlJIA8AObQL9Ww5foUzzwaA1eMRlquFtxYOnx 2wWraL5956EV6e+zpgAat4zrbqm4NbAWYt96K8TYqryyFvQhtATmUsYbvzDlzMSmIAdT MZgQ+LVuSgxTGx1014UQIXbWQ0TNgVFyH/txEUKZ3NCHhW3ukENDN0DemReqAKGWaXOE W1YQ== 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=7o31AusohNb959PRfakB/D1YmTnIqZCzH/ljQnTAp4Y=; b=V/QXy6B+IgkrJM6Zcz9N2YF2RioD7/voPEGnFAdUy6vw6PrnE+Y4+ZySK8aowzKdJe n80HB9F1X1dZULfUJz632PDOsum8+Sg3qZKSoutyImeMKRWi7ohFLYTkH9XnVBXFvmnL mlixXeU2V9xaHyC/hGjc0GTPghpDRTvnufTWEpamBfl99Xgp4jolDZuZeBwXRPqCaaz2 xvJPEjfhcU7cqgYgWhOih484shV4wsifXvO5jou1FF1c5TAxAioYqCP5L3tAcWpDgwiO 5uAHEipWskHKiMIgSlOam6TfNhhHH9/0S0uMYqfVZts+Wt9N9ZLpJOk7XEUQ81BFlp4u 8h1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oMSabQYS; 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 g5si18566867pfi.60.2019.02.28.15.21.54; Thu, 28 Feb 2019 15:22:09 -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=oMSabQYS; 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 S2388228AbfB1XNS (ORCPT + 99 others); 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-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