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]
Date:	Tue, 7 Jul 2015 15:11:24 +0200
From:	Petr Mladek <pmladek@...e.com>
To:	Marcin Niesluchowski <m.niesluchow@...sung.com>
Cc:	Richard Weinberger <richard.weinberger@...il.com>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"open list:ABI/API" <linux-api@...r.kernel.org>,
	Jonathan Corbet <corbet@....net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Tejun Heo <tj@...nel.org>, Kay Sievers <kay@...y.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Joe Perches <joe@...ches.com>,
	Karol Lewandowski <k.lewandowsk@...sung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Subject: Re: [RFC 0/8] Additional kmsg devices

On Fri 2015-07-03 17:09:03, Marcin Niesluchowski wrote:
> On 07/03/2015 01:21 PM, Richard Weinberger wrote:
> >On Fri, Jul 3, 2015 at 12:49 PM, Marcin Niesluchowski
> ><m.niesluchow@...sung.com> wrote:
> >>Dear All,
> >>
> >>This series of patches extends kmsg interface with ability to dynamicaly
> >>create (and destroy) kmsg-like devices which can be used by user space
> >>for logging. Logging to kernel has number of benefits, including but not
> >>limited to - always available, requiring no userspace, automatically
> >>rotating and low overhead.
> >>
> >>User-space logging to kernel cyclic buffers was already successfully used
> >>in android logger concept but it had certain flaws that this commits try
> >>to address:
> >>* drops hardcoded number of devices and static paths in favor for dynamic
> >>   configuration by ioctl interface in userspace
> >>* extends existing driver instead of creating completely new one
> >So, now we start moving syslogd into kernel land because userspace is
> >too broken to provide
> >decent logging?
> >
> >I can understand the systemd is using kmsg if no other logging service
> >is available
> >but I really don't think we should encourage other programs to do so.
> >
> >Why can't you just make sure that your target has a working
> >syslogd/rsyslogd/journald/whatever?
> >All can be done perfectly fine in userspace.
> * Message credibility: Lets imagine simple service which collects
> logs via unix sockets. There is no reliable way of identifying
> logging process. getsockopt() with SO_PEERCRED option would give pid
> form cred structure, but according to manual it may not be of actual
> logging process:
>   "The returned credentials are those that were in effect at the
> time of the call to connect(2) or socketpair(2)."
>       - select(7)
> 
> * Early userspace tool: Helpful especially for embeded systems.
> 
> * Reliability: Userspace service may be killed due to out of memory
> (OOM). This is kernel cyclic buffer, which size can be specified
> differently according to situation.

But then many services will fight for the space in the kernel ring
buffer. We will need a mechanism to guarantee a space for each
service. We will need priorities to throttle various services
various ways. It will be easier to lost messages. It might be
harder to get the important messages on the console when
the system is going down. It will be harder to handle continuous
lines. I am not sure that we want to go this way.

Best Regards,
Petr
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists