diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2018-10-11 10:42:48 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2018-10-12 11:24:41 +0200 |
commit | ec12bc2909f9759747ab5ad3709472353c43a750 (patch) | |
tree | 7c3bca08162b8d12fc2aa26557ded249c1f1ac4e /Documentation/core-api/printk-formats.rst | |
parent | lib/vsprintf: Prepare for more general use of ptr_to_id() (diff) | |
download | linux-ec12bc2909f9759747ab5ad3709472353c43a750.tar.xz linux-ec12bc2909f9759747ab5ad3709472353c43a750.zip |
lib/vsprintf: Hash legacy clock addresses
On platforms using the Common Clock Framework, "%pC" prints the clock's
name. On legacy platforms, it prints the unhashed clock's address,
potentially leaking sensitive information regarding the kernel layout in
memory.
Avoid this leak by printing the hashed address instead. To distinguish
between clocks, a 32-bit unique identifier is as good as an actual
pointer value.
Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p")
Link: http://lkml.kernel.org/r/20181011084249.4520-3-geert+renesas@glider.be
To: "Tobin C . Harding" <me@tobin.cc>
To: Andrew Morton <akpm@linux-foundation.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'Documentation/core-api/printk-formats.rst')
-rw-r--r-- | Documentation/core-api/printk-formats.rst | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Documentation/core-api/printk-formats.rst b/Documentation/core-api/printk-formats.rst index 25dc591cb110..d39798c25585 100644 --- a/Documentation/core-api/printk-formats.rst +++ b/Documentation/core-api/printk-formats.rst @@ -420,9 +420,8 @@ struct clk %pC pll1 %pCn pll1 -For printing struct clk structures. %pC and %pCn print the name -(Common Clock Framework) or address (legacy clock framework) of the -structure. +For printing struct clk structures. %pC and %pCn print the name of the clock +(Common Clock Framework) or a unique 32-bit ID (legacy clock framework). Passed by reference. |