Bug 1757104 - mount doesn't parse context= option correctly
Summary: mount doesn't parse context= option correctly
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-30 15:02 UTC by Giuseppe Scrivano
Modified: 2019-10-08 19:59 UTC (History)
23 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-08 17:43:21 UTC
Type: Bug


Attachments (Terms of Use)

Description Giuseppe Scrivano 2019-09-30 15:02:44 UTC
1. Please describe the problem:

the context mount option causes EINVAL

2. What is the Version-Release number of the kernel:

5.4.0-0.rc0.git6.1.fc32.x86_64


3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

yes


4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

$ unshare -rm mount -t tmpfs tmpfs /tmp -o 'context="system_u:object_r:container_file_t:s0:c475,c690"'
mount: /tmp: wrong fs type, bad option, bad superblock on tmpfs, missing codepage or helper program, or other error.


5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:

yes

6. Are you running any modules that not shipped with directly Fedora's kernel?:

no

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

Sep 30 16:50:42 kernel: tmpfs: Unknown parameter 'c690"'

Comment 1 Ed Santiago 2019-09-30 15:18:07 UTC
Can confirm: problem not present in 5.4.0-0.rc0.git3.1.fc32.x86_64

Comment 2 Laura Abbott 2019-10-07 14:43:17 UTC
there were some changes to the mount API parsing merged so I suspect it's a regression there. I e-mailed the maintainers last week about this but I didn't hear anything back. I'll e-mail again.

Comment 3 Lukas Slebodnik 2019-10-08 08:20:34 UTC
Is there some workaround ?

Comment 4 Laura Abbott 2019-10-08 14:11:51 UTC
https://koji.fedoraproject.org/koji/taskinfo?taskID=38143602 this is a scratch build with a potential fix.

Comment 5 Giuseppe Scrivano 2019-10-08 16:21:12 UTC
thanks, it solves the issue.

$ unshare -rm mount -t tmpfs tmpfs /tmp -o 'context="system_u:object_r:container_file_t:s0:c475,c690"'
$ uname -a
Linux fedora-ws 5.4.0-0.rc2.git0.1.rhbz1757104.fc32.x86_64 #1 SMP Tue Oct 8 14:21:23 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Comment 6 Laura Abbott 2019-10-08 17:43:21 UTC
I applied the patch to rawhide. I expect this will be the final fix but at the very least it fixes things for now. This should show up in the git2 build on Wednesday

Comment 7 Steve Dickson 2019-10-08 19:44:20 UTC
(In reply to Laura Abbott from comment #4)
> https://koji.fedoraproject.org/koji/taskinfo?taskID=38143602 this is a
> scratch build with a potential fix.

Did you post this patch to upstream?

Comment 8 Laura Abbott 2019-10-08 19:53:29 UTC
THis patch was from Al Viro https://lore.kernel.org/linux-fsdevel/20191008012622.GP26530@ZenIV.linux.org.uk/

Comment 9 Steve Dickson 2019-10-08 19:59:38 UTC
(In reply to Laura Abbott from comment #8)
> THis patch was from Al Viro
> https://lore.kernel.org/linux-fsdevel/20191008012622.GP26530@ZenIV.linux.org.
> uk/

Thank you!!!


Note You need to log in before you can comment on or make changes to this bug.