BACKPORT: vsprintf: add printk specifier %px

printk specifier %p now hashes all addresses before printing. Sometimes
we need to see the actual unmodified address. This can be achieved using
%lx but then we face the risk that if in future we want to change the
way the Kernel handles printing of pointers we will have to grep through
the already existent 50 000 %lx call sites. Let's add specifier %px as a
clear, opt-in, way to print a pointer and maintain some level of
isolation from all the other hex integer output within the Kernel.

Add printk specifier %px to print the actual unmodified address.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
(cherry picked from commit 7b1924a1d930eb27fc79c4e4e2a6c1c970623e68)
Signed-off-by: Sandeep Patil <sspatil@android.com>

Bug: 78533979
Test: Build and boot cuttlefish
Change-Id: I735db3b72abb318f535d55122f1745d0ead0dbe7
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
index 83baf0a..54504c5 100644
--- a/Documentation/printk-formats.txt
+++ b/Documentation/printk-formats.txt
@@ -35,7 +35,8 @@
 
 Pointers printed without a specifier extension (i.e unadorned %p) are
 hashed to give a unique identifier without leaking kernel addresses to user
-space. On 64 bit machines the first 32 bits are zeroed.
+space. On 64 bit machines the first 32 bits are zeroed. If you _really_
+want the address see %px below.
 
 	%p	abcdef12 or 00000000abcdef12
 
@@ -72,6 +73,18 @@
 	users. The behaviour of %pK depends on the kptr_restrict sysctl - see
 	Documentation/sysctl/kernel.txt for more details.
 
+Unmodified Addresses:
+
+	%px	01234567 or 0123456789abcdef
+
+	For printing pointers when you _really_ want to print the address. Please
+	consider whether or not you are leaking sensitive information about the
+	Kernel layout in memory before printing pointers with %px. %px is
+	functionally equivalent to %lx. %px is preferred to %lx because it is more
+	uniquely grep'able. If, in the future, we need to modify the way the Kernel
+	handles printing pointers it will be nice to be able to find the call
+	sites.
+
 Struct Resources:
 
 	%pr	[mem 0x60000000-0x6fffffff flags 0x2200] or