Re: linux-next 20180327 - "SELinux: (dev dm-3, type ext4) getxattr errno 34"

From: Theodore Y. Ts'o
Date: Thu Mar 29 2018 - 21:32:31 EST


On Thu, Mar 29, 2018 at 02:35:44PM -0400, Stephen Smalley wrote:
> >
> > broke a longstanding assumption by SELinux that it could call getxattr with a NULL buffer and 0 size to probe whether the filesystem supports the security xattrs at mount time.
> >
> > Options for fixing:
> > - Revert or revise that patch to not return -ERANGE if buffer is NULL (prior behavior),
> > - Change SELinux sb_finish_set_opts() to treat -ERANGE as a non-error result.
>
> Per https://bugzilla.kernel.org/show_bug.cgi?id=199185#c4, other callers besides SELinux are also broken by this change, so a revert or revision of the ext4 commit seems necessary regardless.

Yes, the breakage is my fault; my apologies. The new version of the
patch is already posted in bugzilla (and on linux-ext4). I'll be
pushing out a refreshed ext4.git branch shortly.

- Ted