[lkml]   [2017]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4/5] KVM: use %px to print token identifier
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);
 \ /
  Last update: 2017-11-28 00:41    [W:0.085 / U:17.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site