Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1440102pxm; Thu, 24 Feb 2022 03:15:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzeFnLyaM9LHe4ryqOrwfls6rBBKbVhyre2Ekh4AhfM32xgTvQaKx6d6gtq3SupvB3zBAWK X-Received: by 2002:a17:903:1246:b0:14f:e51e:baa7 with SMTP id u6-20020a170903124600b0014fe51ebaa7mr2032200plh.159.1645701349561; Thu, 24 Feb 2022 03:15:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645701349; cv=none; d=google.com; s=arc-20160816; b=pvUZWCIGSFOQ8v27uSFj16/Nlg/tYo95CU6eel3QPNEhitKvzMtgfMuX1Ukgv+c0zV 3YqlCHUX3A6hgIO+Kek4asmz0wkvMbVuNC75ilNJ3Dj0C/RntDyx+ltld0MdP+PObzJl 0I5kbP15lLAu7JOOLDd0r4lqJ2P2YuPDRt6bRR2PWI+GW4fysGah03qj5RZ1V9eFhGSq WXVdu1i0mKGWaimE3ujYEKppp3tEEc6Ly2deKtiBSX1CyFFoYWrmHMTnaNTm4DA3954w +bleOZKolHT3spzSOtgrJPkdA7HIBQxmpKrR5KUqSCZVJci4jMNcdQ8X0FSblbqFrkB4 xnTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1V+eeGIMHEAUcmSPoAjJe4scrso4dthiajYfpkV+NvM=; b=Zk3doJTwZ7aqCHaH9wb3qwD8LfHpwvPoYl9dUMwhc81uAAaZV3VHtiIi8k4PbCDoZE w7AhPnpMSih0jocm97zeS9LSuGE3zv5rsxdFvUz36kQTS6ThCmm9WKwgZ4Q2aBPriVX0 /KaZS1FEpuwUffNw2fgkU8tWZjPmXQstUOexbr8swnEg2DXU3LB3v5EtCP1SyX9y8Zam 8QA53Jv5d1HLvf/Je95I/6cpoMsucESeJzcOeVuKwO5bthMAvA87m9Pg1v9zOGUv1r2t 7F3EUUnc2WbCGc8+hkLY1MbwZG3bpAS6hYRWbdOh189DdH061JjZGb/c1ookg4HVqyEh R7Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uKMo67CX; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t11si2319596pgi.545.2022.02.24.03.15.33; Thu, 24 Feb 2022 03:15:49 -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=@kernel.org header.s=k20201202 header.b=uKMo67CX; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233497AbiBXKbR (ORCPT + 99 others); Thu, 24 Feb 2022 05:31:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233478AbiBXKbM (ORCPT ); Thu, 24 Feb 2022 05:31:12 -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 A553420A3B8; Thu, 24 Feb 2022 02:30:42 -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 438F76162C; Thu, 24 Feb 2022 10:30:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CAB6C340F5; Thu, 24 Feb 2022 10:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645698641; bh=UVBFu/2kd+72msKvbsEhY06n98IaQ0VgsAo0y3uTQ2c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uKMo67CXZRSwdhBzi8/EEN9oztBr9soHLP8RvL0hIDZzDAQWECQ7f8/Z8eugIY42z hdfwcBluy+paiOgWEjWvgQKMnK4adKDRPYUcdzCO1eHFfPr8N0p6F+ynpzpVaLf9iv CZRG6rIeJEwNiFrzJtmKDTMeHAoxInP0LBcoot5lwoVNesSWsfBfyAK/NsNtQnkts0 AMlDmrllC81ZcK3cvVTbMA9khRkXj8pu1dHnRsqHjwpW8ZIpgngP/5/BCpTl75RUUI vy/3K30H2fYs4D+RRMADFd4EhSy9aqCosQIJHK8SpqR9iXdhesbYPT0MaBTAKEOI9x ItmMoXkR49BCQ== Received: by mail-vk1-f176.google.com with SMTP id k9so922391vki.4; Thu, 24 Feb 2022 02:30:41 -0800 (PST) X-Gm-Message-State: AOAM53356GDXiNzYC3BdaVZfnWdnLdzuU6RTWh+kwNDoTN7fiPNJdVzG q40iGuFT0bflOc33OENuEZJUDBMJ9+7vj4FN45I= X-Received: by 2002:a1f:2355:0:b0:32a:e5bb:29a1 with SMTP id j82-20020a1f2355000000b0032ae5bb29a1mr790584vkj.2.1645698640594; Thu, 24 Feb 2022 02:30:40 -0800 (PST) MIME-Version: 1.0 References: <20220224085410.399351-1-guoren@kernel.org> <20220224085410.399351-12-guoren@kernel.org> In-Reply-To: From: Guo Ren Date: Thu, 24 Feb 2022 18:30:29 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V6 11/20] riscv: compat: syscall: Add compat_sys_call_table implementation To: Arnd Bergmann Cc: Palmer Dabbelt , Anup Patel , gregkh , liush , Wei Fu , Drew Fustini , Wang Junqiang , Christoph Hellwig , linux-arch , Linux Kernel Mailing List , linux-riscv , linux-csky@vger.kernel.org, linux-s390 , sparclinux , linuxppc-dev , Parisc List , "open list:BROADCOM NVRAM DRIVER" , Linux ARM , "the arch/x86 maintainers" , Guo Ren Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 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 Thu, Feb 24, 2022 at 5:38 PM Arnd Bergmann wrote: > > On Thu, Feb 24, 2022 at 9:54 AM wrote: > > > > From: Guo Ren > > > > Implement compat sys_call_table and some system call functions: > > truncate64, ftruncate64, fallocate, pread64, pwrite64, > > sync_file_range, readahead, fadvise64_64 which need argument > > translation. > > > > Signed-off-by: Guo Ren > > Signed-off-by: Guo Ren > > Cc: Arnd Bergmann > > Cc: Palmer Dabbelt > > Here, I was hoping you'd convert some of the other architectures to use > the same code, but the changes you did do look correct. > > Please at least add the missing bit for big-endian architectures here: > > +#if !defined(compat_arg_u64) && !defined(CONFIG_CPU_BIG_ENDIAN) > +#define compat_arg_u64(name) u32 name##_lo, u32 name##_hi > +#define compat_arg_u64_dual(name) u32, name##_lo, u32, name##_hi > +#define compat_arg_u64_glue(name) (((u64)name##_hi << 32) | \ > + ((u64)name##_lo & 0xffffffffUL)) > +#endif > > with the lo/hi words swapped. With that change: Got it, I would change it in next version of patch. > > Reviewed-by: Arnd Bergmann -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/