Re: [PATCH 3/4] printk: Add consoles to a virtual "console" bus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 03/08 at 16:53 +0100, Petr Mladek wrote:
> On Fri 2019-03-01 16:48:19, Calvin Owens wrote:
> > This patch embeds a device struct in the console struct, and registers
> > them on a "console" bus so we can expose attributes in sysfs.
> > 
> > Early console structures must still be static, since they're required
> > before we're able to allocate memory. The least ugly way I can come up
> > with to handle this is an "is_static" flag in the structure which makes
> > the gets and puts NOPs, and is checked in ->release() to catch mistakes.
> 
> I wonder if it might get detected by is_kernel_inittext().

I don't think inittext() in particular would work, since these actually need
to exist forever if you pass "earlyprintk=[...],keep" so they aren't __init.

But I bet you're right that we could catch the static case without needing
the explicit flag, something like is_module_address() (but it would also need
to work for the built-in case). I'll see if I can get this to work.

Thanks,
Calvin
 
> Best Regards,
> Petr




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux