[lkml]   [2017]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 5/5] vfio_pci: 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 <>
drivers/vfio/pci/vfio_pci_intrs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
index 1c46045b0e7f..73d3ae8b5784 100644
--- a/drivers/vfio/pci/vfio_pci_intrs.c
+++ b/drivers/vfio/pci/vfio_pci_intrs.c
@@ -346,7 +346,7 @@ static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev,
ret = irq_bypass_register_producer(&vdev->ctx[vector].producer);
if (unlikely(ret))
- "irq bypass producer (token %p) registration fails: %d\n",
+ "irq bypass producer (token %px) registration fails: %d\n",
vdev->ctx[vector].producer.token, ret);

vdev->ctx[vector].trigger = trigger;
 \ /
  Last update: 2017-11-28 00:41    [W:0.102 / U:3.812 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site