Linux filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] quota: Verify special quota formats match sb type
@ 2026-09-02 13:36 Jan Kara
  2026-09-02 13:36 ` [PATCH 1/2] ocfs2: Refuse to enable ocfs2 format for another filesystem Jan Kara
  2026-09-02 13:37 ` [PATCH 2/2] shmem: Refuse to enable tmpfs " Jan Kara
  0 siblings, 2 replies; 7+ messages in thread
From: Jan Kara @ 2026-09-02 13:36 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: linux-mm, ocfs2-devel, Joseph Qi, Hugh Dickins, Baolin Wang,
	Farhad Alemi, Jan Kara

Hello,

there are certain quota formats that are created only for particular
filesystems - ocfs2 and tmpfs quota formats in particular. Make sure these
formats are indeed being enabled only for filesystem of appropriate type.
Otherwise quota format operations can easily crash as was spotted by fuzz
testing. The only gripe I have with this solution is the recognition of
filesystem type based on sb->s_type->name looks a bit hacky. Another way to do
this would be to directly compare against e.g. shmem_fs_type but that is a bit
cumbersome since struct file_system_type is generally declared in a relatively
narrow scope (not available where quota ops are implemented) so the filesystem
would need to provide a helper to compare against it. Let me know what people
prefer.

Once reviewed, I can merge these patches through my tree as they are only quota
related and very unlikely to clash with anything.

								Honza

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

end of thread, other threads:[~2026-09-03  8:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 13:36 [PATCH 0/2] quota: Verify special quota formats match sb type Jan Kara
2026-09-02 13:36 ` [PATCH 1/2] ocfs2: Refuse to enable ocfs2 format for another filesystem Jan Kara
2026-09-02 21:07   ` Mark Fasheh
2026-09-03  1:36   ` Joseph Qi
2026-09-02 13:37 ` [PATCH 2/2] shmem: Refuse to enable tmpfs " Jan Kara
2026-09-03  2:31   ` Hugh Dickins
2026-09-03  8:47     ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox