lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 7 Sep 2017 08:01:08 +0200
From:   Helge Deller <deller@....de>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:     linux-kernel@...r.kernel.org,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Petr Mladek <pmladek@...e.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 00/14] Fix wrong %pF and %pS printk format specifier
 usages

On 07.09.2017 02:45, Sergey Senozhatsky wrote:
> On (09/06/17 22:27), Helge Deller wrote:
>> This patch series fixes the wrong usages of the %pF and %pS printk format
>> specifiers throughout the kernel code.
>>
>> Both specifiers have the same result on most architectures. But on ia64, ppc64
>> and parisc64 architectures the %pF specifier does an extra conversion because
>> there function pointers are actually function descriptors.
> 
> hm...
> can we fix it in lib/vsprintf.c instead?

There is nothing to fix in vsprintf, because it is already providing 
both %pF and %pS for the two different architecture-specific API call
implementations.

> a) the patch set has "there is no problem on platform A, but still
>    let's just change it"
> 
>    which is probably fine. but
> 
> b) you tweak/fix the currently existing users, OK. but there, most
>    likely, will be new users that will require fixes in the future.

Please read the documentation in Documentation/printk-formats.txt.

It's really as simple that if you use function pointers you *need to*
use %pF, and if you use raw addresses of functions, you *need to* use
%pS. If you use the correct specifier the output will automatically
be correct for all architectures. If you don't, then the output on
ia64, ppc64 and parisc64 architectures will be wrong and may lead 
to kernel crashes in the worst case.

My patch series simply fixes that code which has it wrong.
It has no impact at all on users on x86, ARM, mips and  
other platforms.

Helge

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ