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:	Mon, 16 May 2016 15:02:52 -0700
From:	Calvin Owens <calvinowens@...com>
To:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
CC:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Howells <dhowells@...hat.com>,
	Pranith Kumar <bobby.prani@...il.com>,
	David Woodhouse <David.Woodhouse@...el.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Ard Biesheuvel <ard.biesheuvel@...aro.org>,
	Petr Mladek <pmladek@...e.com>, Tejun Heo <tj@...nel.org>,
	Vasily Averin <vvs@...tuozzo.com>,
	Thierry Reding <treding@...dia.com>,
	Geliang Tang <geliangtang@....com>,
	Ivan Delalande <colona@...sta.com>,
	<linux-kernel@...r.kernel.org>, <kernel-team@...com>
Subject: Re: [RFC][PATCH] printk: Add option to append kernel version to the
 dict

On Sunday 05/15 at 15:36 +0900, Sergey Senozhatsky wrote:
> Hello,
> 
> On (05/13/16 13:58), Calvin Owens wrote:
> [..]
> > +#if defined(CONFIG_PRINTK_APPEND_UNAME)
> > +static ssize_t msg_print_ext_uname(char *buf, size_t size)
> > +{
> > +	return scnprintf(buf, size, " UNAME=%s\n", init_utsname()->release);
> > +}
> > +#else
> > +static ssize_t msg_print_ext_uname(char *buf, size_t size)
> > +{
> > +	return 0;
> > +}
> > +#endif
> > +
> >  /* /dev/kmsg - userspace message inject/listen interface */
> >  struct devkmsg_user {
> >  	u64 seq;
> > @@ -2305,6 +2317,8 @@ skip:
> >  						sizeof(ext_text) - ext_len,
> >  						log_dict(msg), msg->dict_len,
> >  						log_text(msg), msg->text_len);
> > +			ext_len += msg_print_ext_uname(ext_text + ext_len,
> > +						sizeof(ext_text) - ext_len);
> >  		}
> 
> what if there is no place left for init_utsname() after
> msg_print_ext_header() + msg_print_ext_body()?

It ends up being truncated, like either of the preceeding calls would.

> do you need init_utsname in every message? or just in WARN/ERR ones?

I need it added to anything which netconsole actually emits: so I could
filter based on loglevel here if you like.

Thanks,
Calvin

> 
> 	-ss

Powered by blists - more mailing lists