linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] add printk specifier %px, unique identifier
@ 2017-11-27 23:40 Tobin C. Harding
  2017-11-27 23:40 ` [PATCH 1/5] docs: correct documentation for %pK Tobin C. Harding
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Tobin C. Harding @ 2017-11-27 23:40 UTC (permalink / raw)
  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, Radim Krčmář,
	linux-kernel, kvm, kernel-hardening

Linus,

I know you are bored of this patch set already and this pits your vast
experience against my eight months kernel dev experience ;)

I humbly maintain that hashing %p and suggesting people use %x
_correctly_ isn't a WIN solution.

Please don't go easy on me because I'm new, if I'm out of line - say
so.

This set is based on the following assumptions.

1. We now have leaking_addresses.pl illuminating leaking addresses.
2. We have no _clear_ strategy for fixing leaks once found.
3. We do not have a proposed non opt-in solution.
4. There is a distinct use case for this specifier.

Patch 1: Corrects the docs for %pK.

Patch 2: Refactors %pK code out of pointer() into helper function.

Patch 3: Adds specifier %px, small 'x' was chosen because the hashed hex
         value is printed in lower case.

Patch 4/5: Provides example usage of new specifier.

The hashing code is based on the work done hashing %p during 4.14 dev
cycle.

Finally, with this patch set in place, we have the added benefit that
newbies (me) can quietly go around the kernel 'sweeping up' after
leaking addresses. This as apposed to using a hammer and hashing all
%p. And if this is deemed too little and too slow we can always search
and replace '%p' with '%px'.

thanks,
Tobin.

Tobin C. Harding (5):
  docs: correct documentation for %pK
  vsprintf: refactor pK code out of pointer()
  vsprintf: add specifier %px, unique identifier
  KVM: use %px to print token identifier
  vfio_pci: use %px to print token identifier

 Documentation/printk-formats.txt  |   2 +-
 drivers/vfio/pci/vfio_pci_intrs.c |   2 +-
 lib/test_printf.c                 |  74 +++++++++++++++++
 lib/vsprintf.c                    | 166 ++++++++++++++++++++++++++++----------
 scripts/checkpatch.pl             |   2 +-
 virt/kvm/eventfd.c                |   2 +-
 6 files changed, 202 insertions(+), 46 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-11-28 18:11 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-27 23:40 [PATCH 0/5] add printk specifier %px, unique identifier Tobin C. Harding
2017-11-27 23:40 ` [PATCH 1/5] docs: correct documentation for %pK Tobin C. Harding
2017-11-28  0:46   ` Kees Cook
2017-11-27 23:40 ` [PATCH 2/5] vsprintf: refactor pK code out of pointer() Tobin C. Harding
2017-11-27 23:40 ` [PATCH 3/5] vsprintf: add specifier %px, unique identifier Tobin C. Harding
2017-11-27 23:40 ` [PATCH 4/5] KVM: use %px to print token identifier Tobin C. Harding
2017-11-27 23:40 ` [PATCH 5/5] vfio_pci: " Tobin C. Harding
2017-11-28  0:03 ` [PATCH 0/5] add printk specifier %px, unique identifier Linus Torvalds
2017-11-28  1:09   ` Linus Torvalds
2017-11-28  6:26     ` Eric W. Biederman
2017-11-28 10:12       ` David Laight
2017-11-28 17:33       ` Linus Torvalds
2017-11-28 17:41         ` Joe Perches
2017-11-28 18:04           ` Linus Torvalds
2017-11-28 18:11             ` Linus Torvalds
2017-11-28 17:44         ` David Laight
2017-11-28  0:57 ` Kees Cook
2017-11-28  1:43   ` Tobin C. Harding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).