* [PATCH} ntfs3: fix [df]mask display in /proc/mounts
@ 2022-08-10 20:28 Marc Aurèle La France
2022-09-30 15:41 ` Konstantin Komarov
0 siblings, 1 reply; 2+ messages in thread
From: Marc Aurèle La France @ 2022-08-10 20:28 UTC (permalink / raw)
To: Konstantin Komarov, ntfs3, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1075 bytes --]
ntfs3's dmask and fmask mount options are 16-bit quantities but are displayed
as 1-extended 32-bit values in /proc/mounts. Fix this by circumventing
integer promotion.
This change is not eligible for stable@.
Please Reply-To-All.
Thanks and have a great day.
Marc.
Signed-off-by: Marc Aurèle La France <tsi@tuyoix.net>
diff -aNpRruz -X /etc/diff.excludes linux-5.17.1/fs/ntfs3/super.c devel-5.17.1/fs/ntfs3/super.c
--- linux-5.17.1/fs/ntfs3/super.c 2022-03-28 02:03:22.000000000 -0600
+++ devel-5.17.1/fs/ntfs3/super.c 2022-03-28 07:14:10.799008309 -0600
@@ -518,9 +518,9 @@ static int ntfs_show_options(struct seq_file *m, struct dentry *root)
seq_printf(m, ",gid=%u",
from_kgid_munged(user_ns, opts->fs_gid));
if (opts->fmask)
- seq_printf(m, ",fmask=%04o", ~opts->fs_fmask_inv);
+ seq_printf(m, ",fmask=%04o", opts->fs_fmask_inv ^ 0xffff);
if (opts->dmask)
- seq_printf(m, ",dmask=%04o", ~opts->fs_dmask_inv);
+ seq_printf(m, ",dmask=%04o", opts->fs_dmask_inv ^ 0xffff);
if (opts->nls)
seq_printf(m, ",iocharset=%s", opts->nls->charset);
else
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH} ntfs3: fix [df]mask display in /proc/mounts
2022-08-10 20:28 [PATCH} ntfs3: fix [df]mask display in /proc/mounts Marc Aurèle La France
@ 2022-09-30 15:41 ` Konstantin Komarov
0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Komarov @ 2022-09-30 15:41 UTC (permalink / raw)
To: Marc Aurèle La France, ntfs3, linux-kernel
On 8/10/22 23:28, Marc Aurèle La France wrote:
> ntfs3's dmask and fmask mount options are 16-bit quantities but are displayed
> as 1-extended 32-bit values in /proc/mounts. Fix this by circumventing
> integer promotion.
>
> This change is not eligible for stable@.
>
> Please Reply-To-All.
>
> Thanks and have a great day.
>
> Marc.
>
> Signed-off-by: Marc Aurèle La France <tsi@tuyoix.net>
>
> diff -aNpRruz -X /etc/diff.excludes linux-5.17.1/fs/ntfs3/super.c devel-5.17.1/fs/ntfs3/super.c
> --- linux-5.17.1/fs/ntfs3/super.c 2022-03-28 02:03:22.000000000 -0600
> +++ devel-5.17.1/fs/ntfs3/super.c 2022-03-28 07:14:10.799008309 -0600
> @@ -518,9 +518,9 @@ static int ntfs_show_options(struct seq_file *m, struct dentry *root)
> seq_printf(m, ",gid=%u",
> from_kgid_munged(user_ns, opts->fs_gid));
> if (opts->fmask)
> - seq_printf(m, ",fmask=%04o", ~opts->fs_fmask_inv);
> + seq_printf(m, ",fmask=%04o", opts->fs_fmask_inv ^ 0xffff);
> if (opts->dmask)
> - seq_printf(m, ",dmask=%04o", ~opts->fs_dmask_inv);
> + seq_printf(m, ",dmask=%04o", opts->fs_dmask_inv ^ 0xffff);
> if (opts->nls)
> seq_printf(m, ",iocharset=%s", opts->nls->charset);
> else
Thanks for patch, applied!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-30 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-10 20:28 [PATCH} ntfs3: fix [df]mask display in /proc/mounts Marc Aurèle La France
2022-09-30 15:41 ` Konstantin Komarov
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).