Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1568900rdd; Thu, 11 Jan 2024 03:14:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtMCgdllbMzdjbtyvvjnSNK1RJRlt8v1rUzFol3N2p6bVpc+p5MGYYcUG7Z6Y4udUN8J+Z X-Received: by 2002:a05:620a:4905:b0:783:40da:3198 with SMTP id vy5-20020a05620a490500b0078340da3198mr694756qkn.146.1704971660555; Thu, 11 Jan 2024 03:14:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704971660; cv=none; d=google.com; s=arc-20160816; b=PvzkXlZ5hDCAUK2vzc+wKfUR3EiOg25+IC3heX4rVyBfU7iLQatZiXu+d7+Xa6cqX4 ANA7pCxSyWt2jAR42ne+BF9yRjuGQRtfJCp65nXZxMdOCVeo9l53FmvZJl0Du3caUCld Yb3l9R61p0kdTYTP1EZPLRllWVBzpLAhnhtY4tlKxSTFIN//vS8qJDz7eVyTBlAy1TO7 mz3pG7ua9aKf5r79+a6tAwQHUT5T7yQdGzBlJJWTKMpJOunD3jp0QvHoNpxkNTY+Dqe7 opn1HDYEbGrtQfA9OENkYXOIyUwVvfs3TmrlKyhIjWVB3AdS+q7toCrYby/ah32o8bim vkPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6UjlLcl4kUIN9IvHho7eH7yxriVVGoihzbVB5b46qp0=; fh=vvAaODUpQ8ByfUBZKRiMZLQkxv/IqlZfbP7xpm0vuuA=; b=NxjH02wjKJ8+owO9PchDXM5BH/cSdjFp28CojoRHPfeAMS3Wd5ONzdKPgkUKBjv3qD 4hTk2MdSN8qAo2LRl/Sg+j/ObLqTqDsZ88puIh8dZk94LrqpYZFdTVX/l1CkTCKxJ/Hl htDiPAuJpYExQlJohqkzUWTdVg/1P99huIE6mCeaQtuy5RU/VHOVyLF0U/eY50N6Klur M1F+nt4ooORBcZB+4516+u0AX+X67NnD75n6k5sSv6k1vxITzyfN+3PKp4If6qRvzfFj h1+OpAVK2vjk6ATs+dlcdiZ4e1pVU2JZBn+wfZE9/lfxZsu+XnF9HfBABXzzTtxJJpl9 0mFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=cKmWR6dd; spf=pass (google.com: domain of linux-kernel+bounces-23461-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23461-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t11-20020a05620a450b00b007832e5a7226si698064qkp.276.2024.01.11.03.14.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 03:14:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23461-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=cKmWR6dd; spf=pass (google.com: domain of linux-kernel+bounces-23461-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23461-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 536391C21D39 for ; Thu, 11 Jan 2024 11:14:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42F8D14F97; Thu, 11 Jan 2024 11:13:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="cKmWR6dd" Received: from smtp-42ac.mail.infomaniak.ch (smtp-42ac.mail.infomaniak.ch [84.16.66.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30F9E14F8A for ; Thu, 11 Jan 2024 11:13:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=digikod.net Received: from smtp-3-0000.mail.infomaniak.ch (unknown [10.4.36.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4T9hqx0cJqzMq1bb; Thu, 11 Jan 2024 11:13:49 +0000 (UTC) Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4T9hqv3yjdzr0; Thu, 11 Jan 2024 12:13:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1704971628; bh=+Dx1y3NlPG0Oz8roNtugh3aPtZh2p+5yMmqeI1QIBEo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cKmWR6dd9MEc0f1sWvXvwPne86uMgX6Rg0KeJVVsscclRS1cSJCPmDmTNkT/1XtcZ M9CkaQ17CndY2CFXQa2yAo/NkWO74ADRLKDwND8coyTVI9ArZiO6sunp1VX8yJVUIp eaoribqixdWDGKshebZ45tTsKaao8crTDJDZXE9U= Date: Thu, 11 Jan 2024 12:13:46 +0100 From: =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= To: Huyadi Cc: "jmorris@namei.org" , "serge@hallyn.com" , "shuah@kernel.org" , "mathieu.desnoyers@efficios.com" , "linux-api@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-security-module@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "514118380@qq.com" <514118380@qq.com> Subject: Re: =?utf-8?B?5Zue5aSNOiBbUEFUQ0ggdjJdIHNlbGZ0ZXN0cy9tb3ZlX21v?= =?utf-8?Q?unt=5Fset=5Fgroup=3AMake?= tests build with old libc Message-ID: <20240111.aeth4shoo0Oo@digikod.net> References: <20240110072901.5873-1-hu.yadi@h3c.com> <20240110.Yap9Aw9aeghu@digikod.net> <6c398076d4624691a97766bad168d975@h3c.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6c398076d4624691a97766bad168d975@h3c.com> X-Infomaniak-Routing: alpha On Thu, Jan 11, 2024 at 02:25:03AM +0000, Huyadi wrote: > > >On Wed, Jan 10, 2024 at 03:29:01PM +0800, Hu Yadi wrote: > >> From: "Hu.Yadi" > >> > >> Replace SYS_ with __NR_. Using the __NR_ > >> notation, provided by UAPI, is useful to build tests on systems > >> without the SYS_ definitions. > > > >This looks a lot like that... > >https://git.kernel.org/stable/c/87129ef13603ae46c82bcd09eed948acf0506dbb > > Yes, I picked up comments from above commit in order for consistent, > I would send v3 patch if it is inappropriate. This is not an issue at all to use the same wording if it makes sense. Actually, the description of v3 is less explanatory. It might just be appropriate to reference past similar work. That would justify your work, add a precedent, and if there is any issue we could fix both changes. You can append this to the commit message (with the v2 description): Similar changes: commit 87129ef13603 ("selftests/landlock: Make tests build with old libc") Acked-by: Mickaël Salaün > > >> > >> Replace SYS_move_mount with __NR_move_mount > >> > >> Signed-off-by: Hu.Yadi Suggested-by:Jiao > >> Reviewed-by:Berlin > >> --- > >> Changes v1 -> v2: > >> - Fix mail of Suggested-by and Reviewed-by > >> > >> .../move_mount_set_group/move_mount_set_group_test.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git > >> a/tools/testing/selftests/move_mount_set_group/move_mount_set_group_te > >> st.c > >> b/tools/testing/selftests/move_mount_set_group/move_mount_set_group_te > >> st.c index 50ed5d475dd1..bcf51d785a37 100644 > >> --- > >> a/tools/testing/selftests/move_mount_set_group/move_mount_set_group_te > >> st.c > >> +++ b/tools/testing/selftests/move_mount_set_group/move_mount_set_grou > >> +++ p_test.c > >> @@ -218,7 +218,7 @@ static bool move_mount_set_group_supported(void) > >> if (mount(NULL, SET_GROUP_FROM, NULL, MS_SHARED, 0)) > >> return -1; > >> > >> - ret = syscall(SYS_move_mount, AT_FDCWD, SET_GROUP_FROM, > >> + ret = syscall(__NR_move_mount, AT_FDCWD, SET_GROUP_FROM, > >> AT_FDCWD, SET_GROUP_TO, MOVE_MOUNT_SET_GROUP); > >> umount2("/tmp", MNT_DETACH); > >> > >> @@ -363,7 +363,7 @@ TEST_F(move_mount_set_group, complex_sharing_copying) > >> CLONE_VM | CLONE_FILES); ASSERT_GT(pid, 0); > >> ASSERT_EQ(wait_for_pid(pid), 0); > >> > >> - ASSERT_EQ(syscall(SYS_move_mount, ca_from.mntfd, "", > >> + ASSERT_EQ(syscall(__NR_move_mount, ca_from.mntfd, "", > >> ca_to.mntfd, "", MOVE_MOUNT_SET_GROUP > >> | MOVE_MOUNT_F_EMPTY_PATH | MOVE_MOUNT_T_EMPTY_PATH), > >> 0); > >> -- > >> 2.23.0 > >>