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]
Message-ID: <20170802200644.GA2395@linux-80c1.suse>
Date:   Wed, 2 Aug 2017 13:06:44 -0700
From:   Davidlohr Bueso <dave@...olabs.net>
To:     Guillaume Knispel <guillaume.knispel@...ersonicimagine.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Manfred Spraul <manfred@...orfullife.com>,
        Kees Cook <keescook@...omium.org>,
        Alexey Dobriyan <adobriyan@...il.com>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Serge Hallyn <serge@...lyn.com>,
        Andrey Vagin <avagin@...nvz.org>,
        Marc Pardo <marc.pardo@...ersonicimagine.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ipc: optimize semget/shmget/msgget for lots of keys

On Mon, 31 Jul 2017, Guillaume Knispel wrote:
> static int __init ipc_init(void)
> {
>-	sem_init();
>-	msg_init();
>+	int err_sem, err_msg;
>+
>+	err_sem = sem_init();
>+	WARN(err_sem, "ipc: sysV sem_init failed: %d\n", err_sem);
>+	err_msg = msg_init();
>+	WARN(err_msg, "ipc: sysV msg_init failed: %d\n", err_msg);
> 	shm_init();

This shows the ugliness of the underlying ipc init asymmetry. Specifically,
140d0b2108f (Do 'shm_init_ns()' in an early pure_initcall) was the final
nail in the coffin to fix an exit_shm() race.

While normally we could just initialize the ipc_ids fields statically and
be over with initcall dependencies, your patch will require inits be done
dynamically for the rhashtable_init(). Oh well.

Also, why do you do this?

> -pure_initcall(ipc_ns_init);
> +core_initcall(ipc_ns_init);

Thanks,
Davidlohr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ