From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F4F2C433DF for ; Sun, 26 Jul 2020 16:35:45 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6AC78204EA for ; Sun, 26 Jul 2020 16:35:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="A2mYh56Y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6AC78204EA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fUUt3nt8oWfaPYe8E9YMiUNM6GbqRxhXn+U/v1Dm290=; b=A2mYh56Yj5CeoOVss6cLBvvn9 XbbjaLPl8+7tlmxHykw1agwcsP7+dVqvGzp52tzhWv2R0y1gJSEZhlKbyLFc0lf+tEht0YCSS7m35 PafQLTUH2ZpFmFZnHmmo0xXMXfhBrqp6spVRYv1KnAACJWZFEiUbbJngXVGFwR9OvUx8/qWz2ZVOB XqW1ONcepIKtGkresMdGMmS9I0U7ZBpGz1ybuU4KN+NPt4u2ukIfGXpa5Rt2nm4djrWps87pRO7lh p5r8UIQXiKf31HsmWWGhiRXOfw/8RyNaj/G3lAMYda0lLTqDCExE8rDS3y77k9MWQl8WvAd5Jo34F sW6ZqjBaw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzjbX-0007bl-7K; Sun, 26 Jul 2020 16:34:27 +0000 Received: from verein.lst.de ([213.95.11.211]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzjbV-0007bB-6D for linux-arm-kernel@lists.infradead.org; Sun, 26 Jul 2020 16:34:25 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id BF3B368B05; Sun, 26 Jul 2020 18:34:22 +0200 (CEST) Date: Sun, 26 Jul 2020 18:34:22 +0200 From: Christoph Hellwig To: Al Viro Subject: Re: [PATCH 4/4] quota: simplify the quotactl compat handling Message-ID: <20200726163422.GA24657@lst.de> References: <20200726160401.311569-1-hch@lst.de> <20200726160401.311569-5-hch@lst.de> <20200726163214.GS2786714@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200726163214.GS2786714@ZenIV.linux.org.uk> User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200726_123425_378409_62CD9487 X-CRM114-Status: UNSURE ( 9.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, linux-api@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Jan Kara , linux-fsdevel@vger.kernel.org, Christoph Hellwig , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Jul 26, 2020 at 05:32:14PM +0100, Al Viro wrote: > > +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... The main reason it is there is to preserve the previous semantics. And no, I don't think we actually need it on x86. But what if some poor souls adds a BE version that needs this? E.g. arm oabi has similar weird alignment, and now imagine someone adding arm64 compat code for that.. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel