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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 6DEDBC433E0 for ; Sun, 26 Jul 2020 16:32:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5694B2065F for ; Sun, 26 Jul 2020 16:32:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727032AbgGZQcV (ORCPT ); Sun, 26 Jul 2020 12:32:21 -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-api-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-api@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... 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=-3.8 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 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 BD6BAC433E1 for ; Sun, 26 Jul 2020 16:33:59 +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 8A64F2065F for ; Sun, 26 Jul 2020 16:33:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jH43vIR2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A64F2065F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zeniv.linux.org.uk 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=0M0QJ1FBNE1XUZKTW1/TlKGhC8VaGj/eQIt/VtHfRTc=; b=jH43vIR2NdiRxTXVFqeX4QFqa +CqcHkzH4jiTajvMY9Jh8jl2AvZo9Vv+KhJ0Y8zAua9GeVJ0b1PGZ1H6Pii73zXmEvkb7a14x8+mb US89e9YjP3w5msCqulXGogu7AmfD3s9K8KDV7jS7Q/3RJa3M7Jw8OIfo7oVkoyXBn/tfmsjPKdM6Y 7aR7q1dImodXwBVDV73J945INoBTEhpZHEoitLzpF7tnKGJQRzhS3ZGCBEeaDL/x/f53jJuidVYT2 hYxTBMWovgqIZLuJ6elQTNEvvsggB6I+IeAqsoDv+ega+EZuT1wrYl4BXNoxwhZdmzTUVIMGGZaOm ACuOawDGQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzjZZ-0007QO-OW; Sun, 26 Jul 2020 16:32:25 +0000 Received: from [2002:c35c:fd02::1] (helo=ZenIV.linux.org.uk) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzjZX-0007PG-5l for linux-arm-kernel@lists.infradead.org; Sun, 26 Jul 2020 16:32:24 +0000 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 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-Disposition: inline In-Reply-To: <20200726160401.311569-5-hch@lst.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200726_123223_221639_5752C5FD X-CRM114-Status: UNSURE ( 9.35 ) 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, 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 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... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel