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]
Message-ID: <YC5flsiUEZnPs7qz@alley>
Date:   Thu, 18 Feb 2021 13:37:42 +0100
From:   Petr Mladek <pmladek@...e.com>
To:     Chris Down <chris@...isdown.name>
Cc:     linux-kernel@...r.kernel.org,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        John Ogness <john.ogness@...utronix.de>,
        Johannes Weiner <hannes@...xchg.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Kees Cook <keescook@...omium.org>, kernel-team@...com
Subject: Re: [PATCH v4] printk: Userspace format enumeration support

On Thu 2021-02-18 12:21:55, Chris Down wrote:
> Thanks for all your feedback, Petr and Steven. :-)
> 
> Petr, I believe this is a comprehensive checklist of everything we discussed
> for v5 -- any chance you could double check I'm not missing anything you
> folks wanted? Thanks!
> 
> - Use seq_file iterator again instead of simple_open + size
> - Remove debugfs file first to avoid ENOENT
> - Tear down datastructures if debugfs fails
> - Human readable output format
> - Display file/line
> - Rename to CONFIG_PRINTK_INDEX, or... something
> - Move to another file, kernel/printk/debug_formats.c or similar

Just to be sure. The filename should be ideally based on the configure
option and API names, e.g. formats_index.c or so.

The printk_ prefix is not strictly necessary. The file is in printk/
directory. IMHO, we should have used ringbuffer.c but ...


> - Use `struct module *mod` instead of calling it module
> - Add documentation for printk_fmt_sec (or whatever it will be called)
> - Rename things to pf_, pi_, or something
> - See if it's safe to pass a printk_fmt_sec to seq_file instead of a module

Also it might be needed to store the pointer to struct module.

Both things together might allow to remove the global hash table and likely
even the mutex.

> - Handle cont + level
> - Don't expose level/KERN_SOH directly

I can't remember anything else. I am curious how v5 would look like.

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ