Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp445933ybg; Sun, 26 Jul 2020 09:33:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrcru3Rh3136Sx3K2F7873F+NAaJcAnJq4tDjxbaSUDf5botRdSUx4kUXOCLl9mdr5iEsp X-Received: by 2002:a17:906:6b8b:: with SMTP id l11mr6441601ejr.136.1595781208058; Sun, 26 Jul 2020 09:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595781208; cv=none; d=google.com; s=arc-20160816; b=wj2ANZbVkUvYEnc7RSgWSdeKz8W6N/bb+CQBuAIWvD3guURLavs60FRMx7CKUnzCfX xIDwMgB4fJ5LgXyzfF1MY3JzTQ2s6S6jDC6Ti+rbLdqiatoYCzcQueeO7x87tTHQeyFZ 1C2kLEt2ddbEKLFWb6P7IhWQqIdyCg3S16m6Elu/iLzOXc/PV0cTSbdzTIIQ/od7PQfI v+ciFh2i9WTa1tDeLXMu/lzb+NzOMcJV/ef5WUUaqh55SJvVhSZjsW9Syn+b0Gadgxo1 cjFNWQNS/U39810b+So5xiwAh2CP4et8WJfnPG2W8F1UZaKNlDL6mkvWrQGUHf3GgVSp dQww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=5UFcAf2CeeI7rIjDz2pAcdC1UOhynx0nY1mneB+E2FA=; b=i+E2sJbgrNGlMZpn6r2g7Vu8Ck5G7pVKuSF3GVbz0hWK7nURKEOwq5EETV1TQsJjB/ rYV/UrhBqyGOY2CL5yiAnwSuOl0h5qwx19pnWxndjUAe7u6xeYq1ocWGyXHupVcRlbDa LAtZ3ApxnT9L9zo5e5Hz/EGYU9G2GnzNo85INt1EHnUj9HLywUNkQUKyfqE+FJhngkpo q96H22QsdCpk18GyI3DUv0ict5sm7Ffst82NaeYb4OyuN2UZdQy9Klf+Q6Egk16RjYdM hkOsmqVrPXSzGJ9zkN0iAtGxsSTR5mgEhWWZr+geCe1p0LmCJ5Z+ag0tQA0ivTTpucU0 keBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si4207089ejd.17.2020.07.26.09.33.06; Sun, 26 Jul 2020 09:33:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727840AbgGZQcW (ORCPT + 99 others); Sun, 26 Jul 2020 12:32:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbgGZQcV (ORCPT ); Sun, 26 Jul 2020 12:32:21 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03B4EC0619D2; Sun, 26 Jul 2020 09:32:21 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzjZO-0035x3-IE; Sun, 26 Jul 2020 16:32:14 +0000 Date: Sun, 26 Jul 2020 17:32:14 +0100 From: Al Viro To: Christoph Hellwig Cc: x86@kernel.org, Jan Kara , linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH 4/4] quota: simplify the quotactl compat handling Message-ID: <20200726163214.GS2786714@ZenIV.linux.org.uk> References: <20200726160401.311569-1-hch@lst.de> <20200726160401.311569-5-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200726160401.311569-5-hch@lst.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 26, 2020 at 06:04:01PM +0200, Christoph Hellwig wrote: > Fold the misaligned u64 workarounds into the main quotactl flow instead > of implementing a separate compat syscall handler. I can live with that (and drop the local quota-related stuff from copy_in_user/compat_alloc_user_space elimination series). One question, though: > +static int compat_copy_fs_qfilestat(struct compat_fs_qfilestat __user *to, > + struct fs_qfilestat *from) > +{ > + if (copy_to_user(to, from, sizeof(*to)) || > + put_user(from->qfs_nextents, &to->qfs_nextents)) > + return -EFAULT; > + return 0; > +} do we have any need of that put_user()? Note that you don't even call that thing unless compat_need_64bit_alignment_fixup() is true. And AFAICS all such cases are little-endian...