lkml.org 
[lkml]   [2018]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] ext4: super: Fix spectre gadget in ext4_quota_on
On Tue, Jul 31, 2018 at 12:39:41AM -0600, Andreas Dilger wrote:
> > Also it looks like XQM_MAXQUOTAS, MAXQUOTAS, and EXT4_MAXQUOTAS all
> > have the same value (3). Maybe they can be consolidated to just use
> > MAXQUOTAS everywhere?
>
> No, the filesystem-specific MAXQUOTAS values were separated from
> the kernel MAXQUOTAS value for a good reason. This allows some
> filesystems to support new quota types (e.g. project quotas) that
> not all other filesystems can handle. This may potentially change
> again in the future, so they shouldn't be tightly coupled.

But isn't that what sb->s_quota_types is for? To allow different
filesystems to support different quota types?

Also I don't see any bounds checks for EXT4_MAXQUOTAS. It seems like
the ext4 code assumes that MAXQUOTAS and EXT4_MAXQUOTAS are the same.

--
Josh

\
 
 \ /
  Last update: 2018-07-31 19:32    [W:0.067 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site