From patchwork Mon Nov 27 23:40:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobin Harding X-Patchwork-Id: 10078383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 001BA6028E for ; Mon, 27 Nov 2017 23:41:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E790828F8B for ; Mon, 27 Nov 2017 23:41:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBFE92908E; Mon, 27 Nov 2017 23:41:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id F04A828F8B for ; Mon, 27 Nov 2017 23:41:58 +0000 (UTC) Received: (qmail 7530 invoked by uid 550); 27 Nov 2017 23:41:41 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 7422 invoked from network); 27 Nov 2017 23:41:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobin.cc; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=dEFFOFMEgbzoDUdS+ udHs5W/BBuf3zYghRorLnKRiFo=; b=lJZnXybj+GkyoJ1a5A/hVrYuhJtlVwP7D oAxTAAblUEa1FOsXS1I2U0QEuBABVwTMVHG7A4jutZ9tQ8Gx2/1bcjEvr21P+wvB dWi7MtN1AtwE6m+LyVifZJG1KcxBFLuVnwj3wFqw4cPexaACTtl80MDM6M3nMkEb vB6UNVRMv5RfYW/xQj3xmtM9woDRLWrbE+vK1jYMn6mLxHAFhsiXAqGiStKnTwuh dAajlf+BpO4sZ+ErYMryLNoxQb/Z1SIWrwlgg+YBemgw6UcvdLy09m6NxS6acaiO JCiS/Uf4Kt6EJy1ITrj/D4ESPDyg4f6Q3TaOZR0TdWqIKlUvvUO1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=dEFFOFMEgbzoDUdS+udHs5W/BBuf3zYghRorLnKRiFo=; b=M31jOlT3 7m925PWzJ63ScsxLHDXo+Nb26twHf+fEInFHqVuZAgHIVvqowPrF5HR8ZrSHKaRA TPfvFjjq5Qct6CTEs3nOk8TfwO4l20iM/xZ7G1PlQ8IkKF4NFcXaeDMdnZT3xr4x Yg6yjovfvEhfIquve6G/HtpEm4OL0ZawMhAQrwnv9q29EdrMLb9RYGkiFvxnkQi8 FMyLsPyG/gl7H6vC/4D/0YmoF2pPCbY8YsXbedFGEFE63n0KpDBo3pVJlOMaHc/6 zxoDAlzI+4JEL+nauUZClxu6/CUBjW4VUGRIeZ2clCu1RkTqWQLzr03V3s9jHK9c 6CBQ496/1T2v4g== X-ME-Sender: From: "Tobin C. Harding" To: Linus Torvalds Cc: "Tobin C. Harding" , "Jason A. Donenfeld" , Theodore Ts'o , Kees Cook , Paolo Bonzini , Tycho Andersen , "Roberts, William C" , Tejun Heo , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kernel-hardening@lists.openwall.com Date: Tue, 28 Nov 2017 10:40:57 +1100 Message-Id: <1511826058-2563-5-git-send-email-me@tobin.cc> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511826058-2563-1-git-send-email-me@tobin.cc> References: <1511826058-2563-1-git-send-email-me@tobin.cc> Subject: [kernel-hardening] [PATCH 4/5] KVM: use %px to print token identifier X-Virus-Scanned: ClamAV using ClamSMTP Currently token address is printed using %p. This exposes the address of the token in dmesg and potentially leaks sensitive information to userspace. In this instance the address is being used as a unique identifier for the token, we can use the newly defined printk specifier %px for exactly this purpose. Use the new %px specifier to print a unique identifier for the token. Signed-off-by: Tobin C. Harding --- virt/kvm/eventfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index f2ac53ab8243..9c700fdf571c 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c @@ -416,7 +416,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args) irqfd->consumer.start = kvm_arch_irq_bypass_start; ret = irq_bypass_register_consumer(&irqfd->consumer); if (ret) - pr_info("irq bypass consumer (token %p) registration fails: %d\n", + pr_info("irq bypass consumer (token %px) registration fails: %d\n", irqfd->consumer.token, ret); } #endif