On 28.01.2015 18:28, Mark Salyzyn wrote::-)
- Precious little user-space content goes to kmsg (otherwise youSure it does too: MAC addresses, UUIDs, serial numbers. With mobile
can ask why is there a syslogd?), there is a reason for this, user
space is notorious for containing Personal Identifiable Information
whereas kernel information does not.
devices these are actually PII.
I probably should have changed the ramoops.txt content with the addition of pmsg :-)- pmsg0 can take a lot of content (with a ramoops backend) andDocumentation/ramoops.txt says it is for logging kernel oopses
will not disrupt/DOS the kernel logs.
and panics not user logs.
Hmmm, I managed to get content corrupted
- /dev/pmsg0 write is atomic
devkmsg_write + vprintk_emit are atomic too.
It is more serendipity than design, once this feature was highlighted, it became a must-have for the security concerns. The current boot instance contains an environment of files, programs and state information that combined would be useful for cracking a large amount of PII. Once a kernel panics what remains is a trace of user-space activities that can be correlated with kernel activities in order to replay or triage what lead up to the kernel panic. Yet crippled enough to not be as useful as a vector.- /dev/pmsg0 is write only, there is no access to the live contentWhy do you consider this an advantage?
_unless_ there is a reboot.
When you delete /sys/fs/pstore/pmsg-ramoops-0 after moving it to secure storage, it is gone. Same is separately true for /sys/fs/pstore/console-ramoops-0, so yes, similar characteristics. The issue is separation. The issue is also no ability to read the live content of the user space data until it becomes relevant (kernel panic triage).- Personal identification which abounds in user space could be placedRead access to /dev/kmsg can be limited too.
into /dev/pmsg0, and there is no way except a reboot in order to
extract the content, and then /sys/fs/pstore/pmsg-ramoops-0 can be
deleted, or heavily MAC and DAC controlled to enforce protection
(doing so to kmsg would be unlivable)
Not a bad idea. But with multiple kmsg instances, you also get to add code in pstore to divide it up along with a device tree that decides how much storage is provided for each instance. I would wager a desire will be expressed to make sure the live co There is a vacuum.ntent be accessible with a netlink socket and a new flag in dmesg which would be counter to our security concerns.
I think that the goals you present can be met with less code.
You could try adding support for multiple /dev/kmsg instances
for example. How about that?