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, 17 Feb 2014 02:41:52 +0100
From:	Kay Sievers <kay@...y.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	"Banerjee, Debabrata" <dbanerje@...mai.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Jeff Mahoney <jeffm@...e.com>,
	"dbavatar@...il.com" <dbavatar@...il.com>,
	"Hunt, Joshua" <johunt@...mai.com>, stable <stable@...r.kernel.org>
Subject: Re: [PATCH] printk: Fix discarding of records

On Mon, Feb 17, 2014 at 2:19 AM, Kay Sievers <kay@...y.org> wrote:
> On Mon, Feb 17, 2014 at 1:57 AM, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
>> On Sun, Feb 16, 2014 at 4:50 PM, Kay Sievers <kay@...y.org> wrote:
>>>
>>> That should avoid the overflow, yes. I expect it will not print the
>>> first line with a prefix, which we probably should.?
>>
>> Well, it's not printing out the prefix, but it's also not printing out
>> the whole first part of the line, so quite frankly, I think that's
>> actually "more correct".
>>
>> After all, it has already skipped the beginning of the line.
>> Prepending the prefix, then skipping part of the line, and then
>> printing the last part, that sounds truly insane, no?
>
> Yeah, it depends on the idea of what a "line" is; being it a single
> printk() call or a reconstructed continuation line, which happens when
> printk calls could not be merged for some reason into a single record.
>
> But sure, your patch, it sounds fine to just skip the prefix.
>
> The syslog() dump interface never made any promises, and it is not
> used that much anymore today (even dmesg switched away from it since
> quite a while).
>
> For the dumpers, who might use that interface to "page" through the
> data, not printing the prefix sounds actually like the better option
> looking at the stream of pages they ask for.

Your patch seems to work fine here. We now start in the middle of a
cont *line*, with the next cont *record*; do not print the header, and
also do not print more than we should:

  syslog(SYSLOG_ACTION_READ_ALL, "<6>[   73.671533] ---\n<6>[
73.673677] ...", 1088) = 704
  syslog(SYSLOG_ACTION_READ_ALL, "268---------...", 1089) = 1089
  syslog(SYSLOG_ACTION_READ_ALL, "268---------... 1090) = 1089

The current code before the patch does this:

  syslog(SYSLOG_ACTION_READ_ALL, "<4>[  210.190007]
268---------26"..., 445) = 463

Kay
--
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