Received: by 2002:a05:6a10:ffa2:0:0:0:0 with SMTP id hs34csp1385119pxb; Wed, 16 Feb 2022 19:16:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/dcIr6YgyRe1uelKzYYohOzK17+XeHUW5jIG0OuhpUH9hLikpSU/TGShk+30UB26X539q X-Received: by 2002:a17:906:aad7:b0:6cc:c9aa:d9ad with SMTP id kt23-20020a170906aad700b006ccc9aad9admr797436ejb.726.1645067773684; Wed, 16 Feb 2022 19:16:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645067773; cv=none; d=google.com; s=arc-20160816; b=riDXgfi3Yh5bpezfkPwzyR4Jat09HaTw6msfPD9g610BOTWwwZMjdkOMrXLC5sE35E 2qYvae+PT1wrn5Yxyg5P+pBbTHErMfs7hcAfEBG8Yvxp2yloteMNv3cauRQJvMfp9C1F c7oz3cxmcxSGtUBPnmWdbQfkyim8nojmjNI2laYRU1poauFP7UJvZ8baJwYmAWd6OGJR dVUrlTRvbzERrllT1vzhrBQFPmOy/oD7X1ZWH+xejVmKSAs50xYzK6j8LBJldqLlKkR1 qYwybhmA7beW7XCtETmEQGAgT0qDkjxtXUHyYxx5FNAQPstZlD89nTQZGXEhkc8tkkWf POCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=K5+ueLEsnxS9ZuuiJq0mp4hy9PsaPCTAQJHHHsw/Wgo=; b=TQR8C5JQpZ8+bvj8ziNDyafmquoGgBUSvy0aSiWckgu0T2Bin2Z7f11vEwpWbGjR20 68VChbIQTpKBd3rFtQRgza6bCZe88LoHzc3vdzYBpvDmxsQR9XXV2o3m9TGveX9b7/Xw UdfVCH+eWU25W9i05IsMeAmj7VpEEu8+xB0aVIDqq6Xpd9oGTfKnXpg8vSPUyZNuX3z8 Iyb1xyJIf6LAW1bvj3no0rIw7FPEAKtFNpwqg28k6qge3MvN7myIior2ogvNH9+aYZ2g JKaZNpywDklTb728KGL4TAu/YtQaFC/KceAuDKNcRq79jx7UPK0XDJYg1yZl+ZsFzqsj lO5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Dq1v+rUo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7si2912481edk.189.2022.02.16.19.15.51; Wed, 16 Feb 2022 19:16:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Dq1v+rUo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237329AbiBPRs3 (ORCPT + 99 others); Wed, 16 Feb 2022 12:48:29 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237121AbiBPRs1 (ORCPT ); Wed, 16 Feb 2022 12:48:27 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EDA8254A46; Wed, 16 Feb 2022 09:48:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E1DA260F6D; Wed, 16 Feb 2022 17:48:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B52DAC340E8; Wed, 16 Feb 2022 17:48:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645033694; bh=P0xCoobi3PX2V5oBKTfTY1baelnZ+APwbOUC4Rkw/mw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Dq1v+rUoe2FpPJGFuqDUodPgLvzQCLHuayIj0VVCSvEISd4clE8/41zsxytE3gser 8T6D2eGqnIedjy7sevCAsK/uWM3moR0nXbwhJX2v9ZQypHt7L3Nq21Tu4lUi9l8ZHq iL4OaNpL24iXjhJxQGtiCj5FMGQSy485+zPO9cTY= Date: Wed, 16 Feb 2022 18:48:11 +0100 From: Greg KH To: JeffleXu Cc: dhowells@redhat.com, linux-cachefs@redhat.com, xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, torvalds@linux-foundation.org, willy@infradead.org, linux-fsdevel@vger.kernel.org, joseph.qi@linux.alibaba.com, bo.liu@linux.alibaba.com, tao.peng@linux.alibaba.com, gerry@linux.alibaba.com, eguan@linux.alibaba.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 05/23] cachefiles: introduce new devnode for on-demand read mode Message-ID: References: <20220215111335.123528-1-jefflexu@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 16, 2022 at 08:49:35PM +0800, JeffleXu wrote: > >> +struct cachefiles_req_in { > >> + uint64_t id; > >> + uint64_t off; > >> + uint64_t len; > > > > For structures that cross the user/kernel boundry, you have to use the > > correct types. For this it would be __u64. > > OK I will change to __xx style in the next version. > > By the way, I can't understand the disadvantage of uintxx_t style. The "uint*" types are not valid kernel types. They are userspace types and do not transfer properly in all arches and situations when crossing the user/kernel boundry. They are also in a different C "namespace", so should not even be used in kernel code, although a lot of people do because they are used to writing userspace C code :( thanks, greg k-h