[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180102210431.GA20405@bombadil.infradead.org>
Date: Tue, 2 Jan 2018 13:04:31 -0800
From: Matthew Wilcox <willy@...radead.org>
To: NeilBrown <neilb@...e.com>
Cc: Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
dhowells@...hat.com,
Thiago Rafael Becker <thiago.becker@...il.com>,
viro@...iv.linux.org.uk, schwidefsky@...ibm.com,
bfields@...ldses.org, linux-nfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Documentation: security/credentials.rst: explain need to
sort group_list
On Wed, Jan 03, 2018 at 08:01:15AM +1100, NeilBrown wrote:
>
> +When replacing the group list, the new list must be sorted before it
> +is added to the credential, as a binary search is used to test for
> +membership. In practice, this means ``groups_sort()`` should be
For a .rst file, shouldn't we be using :c:func:`groups_sort` instead of
``groups_sort()``?
> +called before ``set_groups()`` or ``set_current_groups()``.
> +``groups_sort()`` must not be called on a ``struct group_list`` which
> +is shared as it may permute elements as part of the sorting process
> +even if the array is already sorted.
>
> When the credential set is ready, it should be committed to the current process
> by calling::
> --
> 2.14.0.rc0.dirty
>
Powered by blists - more mailing lists