From nobody Mon May 20 21:31:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmx.de ARC-Seal: i=1; a=rsa-sha256; t=1664284397; cv=none; d=zohomail.com; s=zohoarc; b=TeZTVpeG7jZaszoyUw86pagmqsMCRxD7PyhINe/LsVdDGtPKhinQLSbEWWuRKbNhXcsxtKxJ8TMW7PWVb9kSfYS/UsvKlsDiFWEf9ZIhbb/khXa+2WVCTTlAcbZjm1lMNig9wul0hdYH7l3ZaqCPI7MoYM05jZtM8s1sOJLkWGA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664284397; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=g4PKK5p9vfy1skcw+lRu8GK2UzQ5TUdH+4gWhU0KXC0=; b=VO/xP7bJqSiyDsFd0QPZDnfS/6Frx+9OYuSRsmQdlmRgXSFe8D5GHxLtAlI7yFx6fuj3XWH4Zl6jl1vi2U3FD8StxT3H1oI4k2xR66hKYYEK5tOTfRHrKA9suAiAVlCQ+vG6Ceg48x7NxvF+UqNZi4WwIj6hdzge7Rpzl9wJvoU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1664284397459388.45752942157776; Tue, 27 Sep 2022 06:13:17 -0700 (PDT) Received: from localhost ([::1]:50180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odAOh-00050I-DB for importer@patchew.org; Tue, 27 Sep 2022 09:13:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od8eb-0000om-LQ for qemu-devel@nongnu.org; Tue, 27 Sep 2022 07:21:35 -0400 Received: from mout.gmx.net ([212.227.17.20]:58433) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od8eZ-0000Yo-K8 for qemu-devel@nongnu.org; Tue, 27 Sep 2022 07:21:33 -0400 Received: from p100 ([92.116.138.255]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MGz1f-1oPgVY3Fw3-00E1hI; Tue, 27 Sep 2022 13:21:27 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1664277687; bh=+fCikU8oGewwV5fb2gZaw3RxXW570qCENzy9my8B3ZY=; h=X-UI-Sender-Class:Date:From:To:Subject; b=Z3uI4yvp0ugIVc32YEQYaO3gXHChbZuRcQ9V4iNbBBgV9BafKYep73wa4r6sd2cL9 Vg3woN+3wQjCwjJU2Nkdvb4mk51rZzYKinS3DG5Si34AdormMh8AwPhO+JNGpIUiqp nvhSg7DS22YdimMNsXHXRLs2tC9u5RdKmIiSznUE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Date: Tue, 27 Sep 2022 13:21:24 +0200 From: Helge Deller To: Laurent Vivier , qemu-devel@nongnu.org, Richard Henderson Subject: ddd Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Provags-ID: V03:K1:gg/pa041vPkrDBSWx+lg1bJ0vxAALOt7vnU6b1008aj6t0NQ9OS 04dn8VvGpP1fGtT4R+cQzZkJ7eG5+ad++boqc3tcAcYG+AOIAaMe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1ggMNwp6igA3xg6BT9iuTfRgbdFE2xEdFNo/Z+2NXZj3SayntE4FxCJF1Do 5wKe41zPURXJbUz9aMgTnqGP87FTkIIG37tD3Brp/JpLviLSwjPEX+gemEa21xy5jeq3ypPr8 BYfh8CffbjZEc+vX8nfY1BvlVtExGXZaWngc4o4Np04Qx0mXpf1/q343OEH1Ho0P+ZcqXAuH9 vCIUFpp6D2D7J3rWLXt5S8Gc9yB5F2F80r/3rO0yPXl1hIxW2Ge3rEi5FoUGUlp/NiDkdrfeJ L60neZYtNO7WG71FhiZ9K3VMgi Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.227.17.20; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmx.net) X-ZM-MESSAGEID: 1664284398193100003 Content-Type: text/plain; charset="utf-8" Add faccessat2() with strace output. Signed-off-by: Helge Deller --- v2: Resending with minor commit message changes. diff --git a/linux-user/strace.c b/linux-user/strace.c index 7d882526da..307d19f5d0 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1931,7 +1931,7 @@ print_execv(CPUArchState *cpu_env, const struct sysca= llname *name, } #endif -#ifdef TARGET_NR_faccessat +#if defined(TARGET_NR_faccessat) || defined(TARGET_NR_faccessat2) static void print_faccessat(CPUArchState *cpu_env, const struct syscallname *name, abi_long arg0, abi_long arg1, abi_long arg2, diff --git a/linux-user/strace.list b/linux-user/strace.list index 72e17b1acf..ef120ddd11 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -177,6 +177,9 @@ #ifdef TARGET_NR_faccessat { TARGET_NR_faccessat, "faccessat" , NULL, print_faccessat, NULL }, #endif +#ifdef TARGET_NR_faccessat2 +{ TARGET_NR_faccessat2, "faccessat2" , NULL, print_faccessat, NULL }, +#endif #ifdef TARGET_NR_fadvise64 { TARGET_NR_fadvise64, "fadvise64" , NULL, NULL, NULL }, #endif diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f409121202..f51c4fbabd 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -399,6 +399,9 @@ _syscall3(int, ioprio_set, int, which, int, who, int, i= oprio) #if defined(TARGET_NR_getrandom) && defined(__NR_getrandom) _syscall3(int, getrandom, void *, buf, size_t, buflen, unsigned int, flags) #endif +#if defined(TARGET_NR_faccessat2) && defined(__NR_faccessat2) +_syscall4(int, faccessat2, int, dirfd, char *, pathname, int, mode, int, f= lags) +#endif #if defined(TARGET_NR_kcmp) && defined(__NR_kcmp) _syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type, @@ -9098,6 +9101,15 @@ static abi_long do_syscall1(CPUArchState *cpu_env, i= nt num, abi_long arg1, unlock_user(p, arg2, 0); return ret; #endif +#if defined(TARGET_NR_faccessat2) && defined(__NR_faccessat2) + case TARGET_NR_faccessat2: + if (!(p =3D lock_user_string(arg2))) { + return -TARGET_EFAULT; + } + ret =3D get_errno(faccessat2(arg1, p, arg3, arg4)); + unlock_user(p, arg2, 0); + return ret; +#endif #ifdef TARGET_NR_nice /* not on alpha */ case TARGET_NR_nice: return get_errno(nice(arg1));