(switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface). On Mon, 19 Jul 2021 15:34:00 +0000 bugzilla-daemon@xxxxxxxxxxxxxxxxxxx wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=213785 > > Bug ID: 213785 > Summary: hugetlbfs scrambles mode when sticky bit is set > Product: Memory Management > Version: 2.5 > Kernel Version: >4.19 (certainly >= 5.4) > Hardware: All > OS: Linux > Tree: Mainline > Status: NEW > Severity: normal > Priority: P1 > Component: Other > Assignee: akpm@xxxxxxxxxxxxxxxxxxxx > Reporter: bugs+kernel.org@xxxxxxx > Regression: Yes > > I noticed the following strange behaviour with hugetlbfs mounts for kernel > versions something north of 4.19, but certainly since 5.4: > > when the mode= option of the mount has the sticky bit set, the mode of the > mount point gets scrambled. > > To test the following command line can be used: > mkdir -p /tmp/tlbtest && mount -t hugetlbfs -o mode=.... none /tmp/tlbtest && > stat -c 'mode: %04a' /tmp/tlbtest > > For kernel versions <= 4.19 or if the first byte of mode is 0, stat outputs > what was set using "-o mode". > > But on newer kernel versions if the first byte of mode is 1 the output of stat > is as follows (input -> output): > 1700 -> 1244 > 1750 -> 1326 > 1770 -> 1352 > 1775 -> 1357 > 1777 -> 1361 > > The behaviour is reproducible across different kernel versions and > architectures (5.4.47-amd64, 5.9.8-amd64, 5.10.40-ppc64el, 5.12.15-amd64). > > -- > You may reply to this email to add a comment. > > You are receiving this mail because: > You are the assignee for the bug.