lkml.org 
[lkml]   [2021]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] printk: Userspace format enumeration support
Petr Mladek writes:
>> - 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 ...

Sure thing.

>> - 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.

You mean, have a `struct module` entry for this? I somewhat suspect that
module.c maintainers are not likely to be happy about injecting non-generic
code into there if it's possible to be avoided, but maybe I'm misunderstanding?

>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.

You can join the club on that one... ;-)

Let me know if I understood you correctly on the `struct module` point, and
after that I'll start work on v5. Thanks!

\
 
 \ /
  Last update: 2021-02-18 15:37    [W:0.254 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site