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, 17 May 2023 19:19:32 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Luca Weiss <luca.weiss@...rphone.com>
Cc:     Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Jonathan Corbet <corbet@....net>,
        ~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] docs: printk-formats: Clarify %*pb format parameters

On Tue, May 16, 2023 at 08:52:43AM +0200, Luca Weiss wrote:
> Since it's rather unusual for printk formats to require two parameters,

I don't think this is "unusual". The %*... is very well described in the
printf(3) (the meaning of *). It applies here for %*p... as well.

> expand the documentation to clearly mention that in the printk format
> for bitmaps.
> 
> As an extra example, for example from include/net/bluetooth/hci_core.h
> we have a bitmap DECLARE_BITMAP(dev_flags, __HCI_NUM_FLAGS);
> This can be printed with ("%*pb", __HCI_NUM_FLAGS, hdev->dev_flags)

I think this change is not needed. But try to convince PRINTK maintainers.
Maybe they will be okay with it if it covers all %*p... cases (like %*ph).

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ