Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5418676imm; Tue, 31 Jul 2018 10:33:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpez4WyNXxu7pWip8AsPuJCexTOpjAFrY/RjR349vu62srYYh1iytVFp8+pWSpNtZJclBKQ5 X-Received: by 2002:a63:1b17:: with SMTP id b23-v6mr21530352pgb.275.1533058397276; Tue, 31 Jul 2018 10:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533058397; cv=none; d=google.com; s=arc-20160816; b=xINV+OrNW+lziTh8ZBXZdWZhaMdytPAIyTY25tZMMJhXCNGCBwAZAwaAevZFn2Dg3f IsKqftcMWW4f6BQbFNFwVOIH35ylKoUBp4erGTFAowaop0kE3WikKysNJdtgyfKSUKsA WKGBpjcQQuSom3jGCiYPJduIvFLNCciv8d8NkzgMRFi8zPgPPEDNLHuGCKRW1qPcgphz nfnDvpL7iym229IWDxWynhNVvke26of5zb/PbC35dRge+T3y8fRupViMAML3ZtZPepGO RoZ+OoJ8FoGKwmTuZK5sF1t8sVYUJjnHy6g46mjs5UEvn68CkH3/R+mkL5YDC4BkBoMA ydRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=CdgK6owJuOhDuZv6vy0UL4XLn9EFLS28d1Ta2pJNAnA=; b=fdSrm0eCB6TxRsmYjbgcTxrjbdDM0K76GYvxgw6ys9lW1CiMoHatETGd+OWpdOV7dJ W9y6tgBIO3W9HNmDmrfigarCwpUvaRQfXtjbNekiTsd0D0nV1DWyZLddk5XA/CtAjVuA QtRL1bf4qqu7k2ko6qn3d1VgYH9e2Tk/hlNjqnl4ap8/J45gAlH48Cqx40AB4FzoEPeZ 1avB3I7E45/EvAMa6YcGnznI0YA/M7Pynl6Spt0N8hZy3dITp4HpvI3CeuZmcXJwYXwG kPLcMTT+wBTn8Owg+NhAaCzmTY3mK9lp2R5EFQO7056rqAtADh2C0JLZJIfjMhymCHJj LkpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i23-v6si14852110pgb.246.2018.07.31.10.33.02; Tue, 31 Jul 2018 10:33:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729963AbeGaTNA (ORCPT + 99 others); Tue, 31 Jul 2018 15:13:00 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37974 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727495AbeGaTNA (ORCPT ); Tue, 31 Jul 2018 15:13:00 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 181974023461; Tue, 31 Jul 2018 17:31:40 +0000 (UTC) Received: from treble (ovpn-120-73.rdu2.redhat.com [10.10.120.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 652311C596; Tue, 31 Jul 2018 17:31:38 +0000 (UTC) Date: Tue, 31 Jul 2018 12:31:36 -0500 From: Josh Poimboeuf To: Andreas Dilger Cc: Jeremy Cline , Theodore Ts'o , linux-ext4 , Linux Kernel Mailing List , stable@vger.kernel.org Subject: Re: [PATCH 1/3] ext4: super: Fix spectre gadget in ext4_quota_on Message-ID: <20180731173136.rnhzvvvt3wtt2xdg@treble> References: <20180727162357.30801-1-jcline@redhat.com> <20180727162357.30801-2-jcline@redhat.com> <20180727174654.bnooz26puuo7456w@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 31 Jul 2018 17:31:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 31 Jul 2018 17:31:40 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jpoimboe@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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