Re: printk: Add kernel parameter to disable writes to /dev/kmsg

From: Steven Rostedt
Date: Tue Apr 26 2016 - 15:47:51 EST


On Tue, 26 Apr 2016 20:44:58 +0200
Pavel Machek <pavel@xxxxxx> wrote:

> > I simply propose a way to let us kernel developers keep user space from
> > interfering, by adding a new kernel command line parameter that will
> > disable writing to /dev/kmsg. Any attempt to open the file in write
> > mode will return a -EPERM error.
>
> chmod 400 /dev/kmsg? With udev, it should be possible to make it persistent...

But this opened while initramdisk is used. I'm thinking this wont work,
or does udev run before main root is mounted?

-- Steve