Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp590959imm; Wed, 22 Aug 2018 09:13:49 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwtslO84y0p38rGGMz2i2Bv/tVld5AR8jAWxVsUVlPPeYC1/3HZ0B8oh0UOlivPXNyKGaHU X-Received: by 2002:a17:902:59cf:: with SMTP id d15-v6mr18247536plj.184.1534954429622; Wed, 22 Aug 2018 09:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534954429; cv=none; d=google.com; s=arc-20160816; b=sUZVGLZci77yeJGe/1YPEyEO3aeL/qcMWac18D9qc88f3mV26UZRWyKw/VkBn1BFpm 4G06ZdUbhcu1ujJGf3dHoT02qkjKbjbW3sQbncK7RUamrVkdSrAvii3lC3keLhIh03Ty DhI0e+mJpXugq5QhvdJxccU53eWNMDgJskRHbh0f1Gl0qsGYu4VhxtNecbmuYua2I0og jXiZuVtl4k/Rm2Ze9rAP/oEtNH+F+Lobgij2+PhixcUnfTtcIYQXywBKyIjYO7FK0Fc+ W6Ykg1U/GvRQkFMBQQdx/qO5dBEsxgfyLaukYZn8vdVvV0gfBO/gV3AUclFdom0qO6TM xMgg== 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=Rkea42SRKETxdmmFFT74XN8vRMHtKJqPZCOlRL3KIz4=; b=toJJeE9sFjnHoAeIO6+7vMf0mz3Lj/hpOzig5crmDmvz8WNObXWlMzeJ7azNHOlwXs +4FJPgixrJGh5A1iv7kI4Ut4MEDid/8FjhmYn3ONL6VvH6pgUg8s5FVLUzEAgkWwvQKP W2i2036E4ikZVQCKnIxGrU/zbGCm2ZmPZDW3aljzk96W3E4qki1WcYByD86G6v6SrCOi bsRan+Mg/kWCQpK5rvGmvtYZ8rw3MmmCladVHiLtOk+KxiEGIi1C2b/COVQRh4Bu3S10 C5tGm89v4l3INK9Rj4Z/NX77Xk1WPuYgFw3RREyrEkjKN41wzSF4RiuqkKYKfDV99bb2 JpBg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j4-v6si1991361pgf.54.2018.08.22.09.13.33; Wed, 22 Aug 2018 09:13:49 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726812AbeHVTh7 (ORCPT + 99 others); Wed, 22 Aug 2018 15:37:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:34474 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726688AbeHVTh7 (ORCPT ); Wed, 22 Aug 2018 15:37:59 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9A975B042; Wed, 22 Aug 2018 16:12:28 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 531581E361C; Wed, 22 Aug 2018 18:12:28 +0200 (CEST) Date: Wed, 22 Aug 2018 18:12:28 +0200 From: Jan Kara To: Josh Poimboeuf Cc: Jeremy Cline , Jan Kara , linux-kernel@vger.kernel.org, Andreas Dilger Subject: Re: [PATCH 0/2] fs/quota: Fix potential spectre v1 gadgets Message-ID: <20180822161228.GG23037@quack2.suse.cz> References: <20180731013731.1987-1-jcline@redhat.com> <20180731184344.yspy7sjbec74d5w6@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180731184344.yspy7sjbec74d5w6@treble> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 31-07-18 13:43:44, Josh Poimboeuf wrote: > On Tue, Jul 31, 2018 at 01:37:29AM +0000, Jeremy Cline wrote: > > Hi folks, > > > > This series unifies XQM_MAXQUOTAS with MAXQUOTAS, which were both being > > used to perform bounds checks on arrays, and then sanitizes 'type' so it > > can't be used in speculative out-of-bounds array access. > > > > Jeremy Cline (2): > > fs/quota: Replace XQM_MAXQUOTAS usage with MAXQUOTAS > > fs/quota: Fix spectre gadget in do_quotactl > > > > fs/quota/quota.c | 14 +++++++------- > > include/linux/quota.h | 8 +------- > > include/uapi/linux/dqblk_xfs.h | 5 ----- > > 3 files changed, 8 insertions(+), 19 deletions(-) > > Looks good to me, though this might hinge on the discussion with > Andreas: > > https://lkml.kernel.org/r/E3E7B6AF-3819-4998-9B12-DACB4EBC14F1@dilger.ca Actually, XQM_MAXQUOTAS is a different kind of beast than EXT4_MAXQUOTAS and friends. XQM_MAXQUOTAS is maximum allowed type number for some quotactl(8) syscall commands. After quite some effort we have unified the interfaces for all quotactl commands so they support the same set of quota types and we don't really plan for these two diverge in the future again. So the cleanup makes sense. OTOH EXT4_MAXQUOTAS defines how many quota types ext4 filesystem supports and that definitely needs to stay a separate constant from the number of quota types generic infrastructure supports... So here I agree with Andreas. Honza -- Jan Kara SUSE Labs, CR