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:   Mon, 2 Sep 2019 09:07:53 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Rasmus Villemoes' <linux@...musvillemoes.dk>,
        Joe Perches <joe@...ches.com>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Uwe Kleine-König <uwe@...ine-koenig.org>,
        Petr Mladek <pmladek@...e.com>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Juergen Gross <jgross@...e.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] printf: add support for printing symbolic error codes

From: Rasmus Villemoes
> Sent: 30 August 2019 23:51
...
> > But why not just extend check_pointer_msg?
> 
> Partly because that would rely on all %p<foo> actually eventually
> passing ptr through to that (notably plain %p does not), partly because
> the way check_pointer_msg works means that it has to return a string for
> its caller to print - which is ok when the errcode is found, but breaks
> if it needs to format a decimal. It can't even snprintf() to a stack
> buffer and return that, because, well, you can't do that, and it would
> be a silly recursive snprintf anyway.

Perhaps you could use NULL or "" to mean 'just print the value'.
Then you might manage to use the test for NULL to print the errno strings.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ