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:   Wed, 20 Sep 2017 12:20:56 +0200
From:   Helge Deller <deller@....de>
To:     David Laight <David.Laight@...LAB.COM>,
        'Sergey Senozhatsky' <sergey.senozhatsky.work@...il.com>
Cc:     Fenghua Yu <fenghua.yu@...el.com>,
        "Luck, Tony" <tony.luck@...el.com>,
        "linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
        Petr Mladek <pmladek@...e.com>, Jessica Yu <jeyu@...nel.org>,
        "James E . J . Bottomley" <jejb@...isc-linux.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Paul Mackerras <paulus@...ba.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate
 %pF/%pf printk specifiers

On 20.09.2017 10:41, David Laight wrote:
> From: Helge Deller
>> Sent: 19 September 2017 21:08
> ...
>>> Using 'unsigned long' for any kind of pointer is an accident
>>> waiting do happen.
>>> It also makes it difficult to typecheck the function calls.
>>> Using 'void *' isn't any better.
>>> Either a pointer to an undefined struct, or a struct containing
>>> a single 'char' member, is likely to be safest.
>>
>> David, you might be right in most cases, but in this case I'd prefer
>> unsigned long too. I think this will create the least amount of
>> typecasts here.
> 
> I've not looked at the specifics case...
> 
> Another option is using a struct with a single member and
> passing it by value.

Actually, we do already have correct structs which could be referenced:
parisc: struct Elf64_Fdesc
ia64:	struct fdesc
ppc64:	struct ppc64_opd_entry

One could "#define platform_opd_entry" to each of those depending on the platform and use it.
It might be misleading though, because the pointer which is handed over to
dereference_function_descriptor() can be such a pointer but isn't necessary.
I'll leave it up to Sergey to decide.

Helge

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ