Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1356507pxm; Thu, 24 Feb 2022 01:15:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzNA90oTgV2YtGmbHMB9XiVQl7z5u6YJZ4Rhea5VmDQ7rf456jOxi0js9Wz5HTxhohDgS0t X-Received: by 2002:a05:6402:5214:b0:412:996:9ffb with SMTP id s20-20020a056402521400b0041209969ffbmr1348349edd.238.1645694110895; Thu, 24 Feb 2022 01:15:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645694110; cv=none; d=google.com; s=arc-20160816; b=mGIy4lOzVT4yM8C8BQULR0CNdJhcrVbK0aH7mt9zgy2wB7abBSpgVMawq2PLzawSzN hycPxB1ChN3c4V/lZcHj0OvY9us6b8Lo5ob4QVKH2Ii7p7M/4EH2/gS4eboNIFdhv7nG krDFRYON1Uq8Et8mH56IKKJcDpujBbbCETENNV1JAKwAps7iBTdtA6vA6pfqGIH5J4Im duM5iuB8zRlyCKbLCpRPtBwGYW6grISkAmDKS7aqSmufW41PUZ5F67teKNijNlz2POur YMu2DNuNB6C5djAuRwlZd+E4FmV4jZYBbF7gVfxFpzxqCw5KTaanKlUGl47YDf2dtRJT ifXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LGwVDe6FhrGTLUCXZkqlUA568smENKFIvBB/6puME+0=; b=T0X+dadrV1502o4s4Awbr83D0yriLshgXXpwTangtSC0kwLuVvaEcGvL1+mFv/X4w9 cIkPvcR31Cn6ARCehm3droW08zHaM+KLKZxHbF4rhGmz8RRCODAZXfl1fqBDmvDUDK7a Dygh7TFCVQoYwfEOWuSAaQNsEIx895XL+I6CFWw/wZH7qaxqp39U5tu/2HYXpqJoyM/L EJixLvHm3Ai+rCI462lXeOeN9ZeBR7R2O4Fp5yDKdRTp7BMIM5gXxDv1ZcK9Gb3p6v6O 3E+IRzc6GO6XHd/RLwm1+DLs6JmeNlIzHP7vJLW+3ePHywZIh4pWC2gft3BJml1u5plR V9iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G2TeIum+; 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 gh22si1011661ejc.355.2022.02.24.01.14.44; Thu, 24 Feb 2022 01:15:10 -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=G2TeIum+; 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 S232147AbiBXI4l (ORCPT + 99 others); Thu, 24 Feb 2022 03:56:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230354AbiBXI43 (ORCPT ); Thu, 24 Feb 2022 03:56:29 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E2FE170D44; Thu, 24 Feb 2022 00:55:48 -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 ams.source.kernel.org (Postfix) with ESMTPS id C2C95B8235A; Thu, 24 Feb 2022 08:55:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73C23C340F1; Thu, 24 Feb 2022 08:55:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645692945; bh=6RCP1MbfY3qIKsgFkltTUZn3CISwR+fj5txYEFK2Mmc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G2TeIum+OHJmHWs8yO9nTqHhswt+bC4RLvO2I4yygQYjJqFq0Cw5FsalR6m2d86vO OaItziIx4kpCYmqt0qpFwbwZLy40HokbtzDkMWWhalx6j2VLThyIkBceyE09bO+wCm 9wftGAN2RUte6ZHEoCCDhtuYUzZTnqGtzEt+d3sxdgp44RlWB8GxyRG1TMNazMM7sk 34G4F5okozA3VpvxSTdzUDmR/3xrociUPVSB4CgrBb3ArHs+ccxoC7by7bjMxQ9MPi J5Iq8K0Z5CwvVrrD9N9MLE1L9vQmsrvwyh//wvk0gB2hOm0qRx10pF73x6880+gkSv NeS9by0UPPSAA== From: guoren@kernel.org To: guoren@kernel.org, palmer@dabbelt.com, arnd@arndb.de, anup@brainfault.org, gregkh@linuxfoundation.org, liush@allwinnertech.com, wefu@redhat.com, drew@beagleboard.org, wangjunqiang@iscas.ac.cn, hch@lst.de Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-csky@vger.kernel.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-parisc@vger.kernel.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, Guo Ren Subject: [PATCH V6 07/20] syscalls: compat: Fix the missing part for __SYSCALL_COMPAT Date: Thu, 24 Feb 2022 16:53:57 +0800 Message-Id: <20220224085410.399351-8-guoren@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220224085410.399351-1-guoren@kernel.org> References: <20220224085410.399351-1-guoren@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Guo Ren Make "uapi asm unistd.h" could be used for architectures' COMPAT mode. The __SYSCALL_COMPAT is first used in riscv. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann Reviewed-by: Christoph Hellwig --- include/uapi/asm-generic/unistd.h | 4 ++-- tools/include/uapi/asm-generic/unistd.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 1c48b0ae3ba3..45fa180cc56a 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -383,7 +383,7 @@ __SYSCALL(__NR_syslog, sys_syslog) /* kernel/ptrace.c */ #define __NR_ptrace 117 -__SYSCALL(__NR_ptrace, sys_ptrace) +__SC_COMP(__NR_ptrace, sys_ptrace, compat_sys_ptrace) /* kernel/sched/core.c */ #define __NR_sched_setparam 118 @@ -779,7 +779,7 @@ __SYSCALL(__NR_rseq, sys_rseq) #define __NR_kexec_file_load 294 __SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) /* 295 through 402 are unassigned to sync up with generic numbers, don't use */ -#if __BITS_PER_LONG == 32 +#if defined(__SYSCALL_COMPAT) || __BITS_PER_LONG == 32 #define __NR_clock_gettime64 403 __SYSCALL(__NR_clock_gettime64, sys_clock_gettime) #define __NR_clock_settime64 404 diff --git a/tools/include/uapi/asm-generic/unistd.h b/tools/include/uapi/asm-generic/unistd.h index 1c48b0ae3ba3..45fa180cc56a 100644 --- a/tools/include/uapi/asm-generic/unistd.h +++ b/tools/include/uapi/asm-generic/unistd.h @@ -383,7 +383,7 @@ __SYSCALL(__NR_syslog, sys_syslog) /* kernel/ptrace.c */ #define __NR_ptrace 117 -__SYSCALL(__NR_ptrace, sys_ptrace) +__SC_COMP(__NR_ptrace, sys_ptrace, compat_sys_ptrace) /* kernel/sched/core.c */ #define __NR_sched_setparam 118 @@ -779,7 +779,7 @@ __SYSCALL(__NR_rseq, sys_rseq) #define __NR_kexec_file_load 294 __SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) /* 295 through 402 are unassigned to sync up with generic numbers, don't use */ -#if __BITS_PER_LONG == 32 +#if defined(__SYSCALL_COMPAT) || __BITS_PER_LONG == 32 #define __NR_clock_gettime64 403 __SYSCALL(__NR_clock_gettime64, sys_clock_gettime) #define __NR_clock_settime64 404 -- 2.25.1