lkml.org 
[lkml]   [2020]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/time: Add max_time_namespaces ucount
On Mon, Apr 06, 2020 at 06:13:42PM +0100, Dmitry Safonov via Containers wrote:
> Introduce missing time namespaces limit per-userns.
> Michael noticed that userns limit for number of time namespaces is
> missing.
>
> Furthermore, time namespace introduced UCOUNT_TIME_NAMESPACES, but
> didn't introduce an array member in user_table[]. It would make array's
> initialisation OOB write, but by luck the user_table array has
> an excessive empty member (all accesses to the array are limited with
> UCOUNT_COUNTS - so it silently reuses the last free member.
>
> Fixes user-visible regression: max_inotify_instances by reason of the
> missing UCOUNT_ENTRY() has limited max number of namespaces instead of
> the number of inotify instances.
>
> Fixes: 769071ac9f20 ("ns: Introduce Time Namespace")
> Cc: Adrian Reber <adrian@lisas.de>
> Cc: Andrey Vagin <avagin@openvz.org>
> Cc: Christian Brauner <christian.brauner@ubuntu.com>
> Cc: Eric W. Biederman <ebiederm@xmission.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Cc: Containers <containers@lists.linux-foundation.org>
> Cc: Linux API <linux-api@vger.kernel.org>
> Cc: stable@kernel.org # v5.6+
> Reported-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
> Signed-off-by: Dmitry Safonov <dima@arista.com>

Acked-by: Christian Brauner <christian.brauner@ubuntu.com>

\
 
 \ /
  Last update: 2020-04-07 12:44    [W:0.062 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site