linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3 v3] Move groups_sort outisde of set_groups (fwd)
@ 2017-12-08 12:30 Thiago Rafael Becker
  2017-12-09 17:20 ` Matthew Wilcox
  0 siblings, 1 reply; 2+ messages in thread
From: Thiago Rafael Becker @ 2017-12-08 12:30 UTC (permalink / raw)
  To: linux-fsdevel, Alexander Viro, Martin Schwidefsky, Heiko Carstens
  Cc: linux-nfs, linux-s390

Hello,

People in linux-nfs seem happy with this patch set. I'm looking for 
comments from VFS and s390 maintainers.

Thanks,
trbecker

---------- Forwarded message ----------
Date: Tue,  5 Dec 2017 12:05:09 -0200
From: Thiago Rafael Becker <thiago.becker@gmail.com>
To: bfields@fieldses.org, neilb@suse.com
Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
     linux-kernel@vger.kernel.org, Thiago Rafael Becker <thiago.becker@gmail.com>
Subject: [PATCH 0/3 v3] Move groups_sort outisde of set_groups

In cases where group_info is cached (e.g. sunrpc), multiplpe
threads may call set_groups with a freshly created group_info
cache (e.g. nfsd), and attempt to sort them simultaneously,
which configures a race condition that can overwrite some
groups in the cache and lead to errors. In the case of nfsd,
the client was receiving EPERM if the group used to provide
authorization was overwritten by this race condition.

In an email exchange with bfields, we agreed that it seems
unintuitive that the groups are sorted on set_groups, and that
it would be better to move the responsibility of sorting to
the caller of set_groups.

These patches:
  - Export groups_sort in include/linux/cred.h
  - Add a call to groups_sort after the groups are inserted in
    group_info
  - Remove the call to sort_groups from set_groups

Thiago Rafael Becker (3):
   kernel: make groups_sort globally visible
   kernel: Move groups_sort to the caller of set_groups.
   kernel: set_groups doesn't call groups_sort anymore.

  include/linux/cred.h      | 1 +
  kernel/groups.c           | 6 ++++--
  kernel/uid16.c            | 1 +
  net/sunrpc/svcauth_unix.c | 7 +++++++
  4 files changed, 13 insertions(+), 2 deletions(-)

-- 
2.9.5

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 0/3 v3] Move groups_sort outisde of set_groups (fwd)
  2017-12-08 12:30 [PATCH 0/3 v3] Move groups_sort outisde of set_groups (fwd) Thiago Rafael Becker
@ 2017-12-09 17:20 ` Matthew Wilcox
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2017-12-09 17:20 UTC (permalink / raw)
  To: Thiago Rafael Becker
  Cc: linux-fsdevel, Alexander Viro, Martin Schwidefsky, Heiko Carstens,
	linux-nfs, linux-s390

On Fri, Dec 08, 2017 at 10:30:24AM -0200, Thiago Rafael Becker wrote:
> Hello,
> 
> People in linux-nfs seem happy with this patch set. I'm looking for comments
> from VFS and s390 maintainers.

Well ... you sent a response to your 2/3 saying "please ignore", and I don't see a replacement 2/3.

Also, there's no need to split this up into three separate patches.
It's small enough to all be done as one.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-09 17:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-08 12:30 [PATCH 0/3 v3] Move groups_sort outisde of set_groups (fwd) Thiago Rafael Becker
2017-12-09 17:20 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).