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:   Fri, 5 Feb 2021 14:26:11 +0000
From:   Chris Down <chris@...isdown.name>
To:     linux-kernel@...r.kernel.org
Cc:     Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        John Ogness <john.ogness@...utronix.de>,
        Johannes Weiner <hannes@...xchg.org>,
        Andrew Morton <akpm@...ux-foundation.org>, kernel-team@...com
Subject: Re: [PATCH] printk: Userspace format enumeration support

Oh, and one more I just spotted and will fix in v2 after other feedback is in:

Chris Down writes:
>+static void store_printk_fmt_sec(const struct module *mod, const char **start,
>+				 const char **end)
>+{
>+	struct printk_fmt_sec *ps = NULL;
>+	const char **fptr = NULL;
>+	size_t size = 0;
>+
>+	ps = kmalloc(sizeof(struct printk_fmt_sec), GFP_KERNEL);
>+	if (!ps)
>+		return;
>+
>+	ps->module = mod;
>+	ps->start = start;
>+	ps->end = end;
>+
>+	for (fptr = ps->start; fptr < ps->end; fptr++)
>+		size += strlen(*fptr) + 1;

This still works, but is out of date and doesn't account for the module and 
comma, so results in one more unnecessary round trip doing seq_buf_alloc.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ