Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6700320ybl; Wed, 15 Jan 2020 08:50:02 -0800 (PST) X-Google-Smtp-Source: APXvYqx7CWJjM6WQAbmXuyYP6ZoWiDPaISO7Uf6kgWsjc/TGDzh74GsVnc/Zfh5M05wusb0G+Ktr X-Received: by 2002:a9d:6857:: with SMTP id c23mr3212180oto.351.1579107002690; Wed, 15 Jan 2020 08:50:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579107002; cv=none; d=google.com; s=arc-20160816; b=xuYQs5jKFLHMNzpbNDrwoNGY9l7a7SdCX+/xZYjalHaAWEAQ9q+SbhmLk7cG7/qwTh IOXyrFsVrsVitU7uH0xZLJISfdRucmhKcxGGBCgezc2x7E1FklPMQjXz9LcVmXvDziWj yq773op2EDUiJ9w9+NOyx+TOjDiQ4pY/x/eRZgfsuGJzN5wpnT3NAyuWmgMTF935wM+A wzLn3PBqqTbja82+OWzi379HZLJDMtrSJsf52IQImOAGp7cMKHnAvtxDv0kzYvPj1o+r Iya0pFESu2r1whGVllTg60QWS12H0GvbVkxqB933Hn/Uy2tsWletyYgMEyr6eTMMfDEE ck9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=4I2yKtQUgcbe23JnCfXYZDznxnRDcLRMRljkUDkzTlw=; b=EG3xITPODRVDLCFyfyVyQGLv8bbjYYJkwwrjdZ+9w2+Dnpud+FY0raxYMtHRX1rbdO YZ/xMxAUj2eQxmVFcACtPHdfMoV0HLypKKU0YqaZuyWHusLJidsAiMuxFJYtESrap4Ij W8HScu2EuYGj5JcElBxp1vhdDs2Ht5jgIdz5hTVhOSJt3sKbH+LUZIqxapWBL0+wYtdi we1i+H9l3D+eXTlOBCThQSAnwnZqkN/sgsUiaz7m9W5GsZxa69rEcOFUD5hqp3a0koOO T3zgTg+QqA3yKyr/eis3AyvL2kBvQ8gdcH9kXVumHRnx4FI5FfCyuBBfsnlrP3/isH2B n9Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DOTUaiCI; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c26si11942079otf.288.2020.01.15.08.49.50; Wed, 15 Jan 2020 08:50:02 -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=@kernel.org header.s=default header.b=DOTUaiCI; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728946AbgAOQry (ORCPT + 99 others); Wed, 15 Jan 2020 11:47:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:39458 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726418AbgAOQrw (ORCPT ); Wed, 15 Jan 2020 11:47:52 -0500 Received: from linux-8ccs.suse.de (x2f7fcc1.dyn.telefonica.de [2.247.252.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8BE7624679; Wed, 15 Jan 2020 16:47:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579106872; bh=Wo3VvGdgYgOnlotGPGTZ3ecuBSDmuAqHMz6pbLgoclo=; h=From:To:Cc:Subject:Date:From; b=DOTUaiCItx4UxdrtsbeVi+zw6Shrw/f7zthwJ9eXxzdIK7799k3icz7s5rcBT+gSa s7IfeiSBlQZHiIm1rHPKh+wtvKw4xKI0GNrZxB/b2S+yeHyNP/sB7cgbcumno+B7AQ vI9S1acyXaSTHqbErYhQmiWZ8QUMma3hA8zhNnQ4= From: Jessica Yu To: linux-kernel@vger.kernel.org Cc: Jessica Yu Subject: [PATCH] modsign: print module name along with error message Date: Wed, 15 Jan 2020 17:47:27 +0100 Message-Id: <20200115164727.12797-1-jeyu@kernel.org> X-Mailer: git-send-email 2.16.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is useful to know which module failed signature verification, so print the module name along with the error message. Signed-off-by: Jessica Yu --- This patch was sent last year, but apparently I forgot to pursue getting it merged (it had a dependency on the lockdown patchset). Now that's merged, I'm resending it. [1] https://lore.kernel.org/lkml/20180530090830.20737-4-jeyu@kernel.org/ kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/module.c b/kernel/module.c index d4d876172e9d..2b5f9c4748bc 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2882,7 +2882,7 @@ static int module_sig_check(struct load_info *info, int flags) reason = "Loading of module with unavailable key"; decide: if (is_module_sig_enforced()) { - pr_notice("%s is rejected\n", reason); + pr_notice("%s: %s is rejected\n", info->name, reason); return -EKEYREJECTED; } -- 2.16.4