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 00:47:58 +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

Some improvements I noticed that I'll include when sending v2.

Chris Down writes:
>+static void remove_printk_fmt_sec(const struct module *mod)
>+{
>+	struct printk_fmt_sec *tmp = NULL, *ps = NULL;
>+	const char **fptr = NULL;

fptr can be scoped to list_for_each_entry_safe, I'll move it.

>+static int proc_pf_show(struct seq_file *s, void *v)
>+{
>+	const struct printk_fmt_sec *ps = NULL;
>+	const char **fptr = NULL;

Ditto for list_for_each_entry.

>+
>+	mutex_lock(&printk_fmts_mutex);
>+
>+	list_for_each_entry(ps, &printk_fmts_list, list) {
>+		const char *mod_name = ps_get_module_name(ps);
>+
>+		for (fptr = ps->start; fptr < ps->end; fptr++) {
>+			seq_puts(s, mod_name);
>+			seq_putc(s, ',');
>+			seq_puts(s, *fptr);
>+			seq_putc(s, '\0');
>+		}
>+	}

Not sure why I didn't just use seq_printf here. I'll do that.

I'll wait a few days for feedback then will send v2 either way. :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ