From patchwork Tue Jul 13 13:41:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1504661 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPMzg1n91z9sWd for ; Wed, 14 Jul 2021 00:13:03 +1000 (AEST) Received: from localhost ([::1]:46942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3J9h-0005Xn-0q for incoming@patchwork.ozlabs.org; Tue, 13 Jul 2021 10:13:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifn-0000L2-52 for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:07 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:37829) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifk-00067R-Rs for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:06 -0400 Received: from quad ([82.142.17.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MPXQi-1lqhlo2gug-00MYbj; Tue, 13 Jul 2021 15:41:54 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 01/12] linux-user/syscall: Fix RF-kill errno (typo in ERFKILL) Date: Tue, 13 Jul 2021 15:41:41 +0200 Message-Id: <20210713134152.288423-2-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713134152.288423-1-laurent@vivier.eu> References: <20210713134152.288423-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:8MFXMEi9VvtHtmSkLfksD14c3gnzNr3YMakgEWHpUMCk70ZtASL 97c8Z3Swe2k0M1Pt2Th6JCxeRWJ1NqmsRlv9ezJIiZ0+uNj2GHqHjQ0TbeOrX7KXV7KMIWz 6ns5+g2dYiXJyfPXIh4frVRHFQbxtlXRvENcUZWBYfyN4/kd39dPzB+krBZ1Nd6ZLB1s1sk QcbJ3crqxYJeLQtNLhz4Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:VwZBF7/bTnw=:gg3Us2HzguusUIwN1rhjsb 8aYeSxvmPduZPM2E47hiYxji/UAs4fNTZ12bzk4tw247GL5Y1IkFBIK7uSdtkrBfsEtEZqZF2 OqCb/V+fqHyIfHSf4LL6PpnyWIO0i3uHu2/0eI00cHtKhH8BGmTwEyuStHDlsL81ohCoXBGYr ROotbpNOwNvuy/ZMVcr0CQ1ZWMg8IwUUidmv5+iBvBF8XbVd/Oj1An9YeAFIpW/QiakOeFbE+ vQE8KwUq2A/YJhF9x8qX2esViE1s9+MByR6QfkCWMsuXStKYIiRN4cPPBZY52529yDKvOxVIV 0z3z1Fnk5Igq7iZkiPotZe255ldBCZga2ayJIlJ0I7po0hjfoVm9RfOM/A8Qim0ztbOI/OLqy 9KxYyAswGmugIiKcPPJ8J0TqAxq6nGpulI4TUiHuowvCa+ff55Jhv/a/LZYoO9PzCVOuPmHSC gVFlBcO9I8ufpZfyXGra0Gwp0x6s+e6xo0utmhZWzlAO3cNb+ZqTCK6Koe0hHbKrN9Jfwj8k6 1qh5eXLLrWPLzIc/D4Ulcx8s56Gfq2Tovhw7Jq+dfNytGWpnSPLnLau0iF1r2L3/n55Q2MfbL Z9AULGMpKVbJrgGEhv+e4D4FDKRsWhwBpSS/iUhMEbLBJN5r2IlOWItYmqXRuzCDe9Ft/hjn5 vq2nsYFG+c9PgTzuprrwn73hlEM5D8cMMEcgEBrNFd+JZDKVHDByZcfH66nxaWhC9SVy/6ssq lQ3sulj8aD/JZDbRxX2biZBulb+Z7a80xgbfoYs5UoAijURDGyArzgs77zc7IPrkasdQyvq42 UBzzT92Lc8vqpnsaQD7vk0cae2YLdUAiIhFQvUnw8MCfODc4qjznorojl2zHSyCfy41J9Dj Received-SPF: none client-ip=217.72.192.74; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Affected targets: alpha, hppa, mips/64, sparc Fixes: fe8ed7d5794 ("linux-user: Handle ERFKILL and EHWPOISON") Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210708170550.1846343-2-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 2e826206d227..4842a1987b79 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -629,7 +629,7 @@ static uint16_t host_to_target_errno_table[ERRNO_TABLE_SIZE] = { #ifdef ENOMSG [ENOMSG] = TARGET_ENOMSG, #endif -#ifdef ERKFILL +#ifdef ERFKILL [ERFKILL] = TARGET_ERFKILL, #endif #ifdef EHWPOISON From patchwork Tue Jul 13 13:41:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1504655 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPMt602WPz9sWd for ; Wed, 14 Jul 2021 00:08:14 +1000 (AEST) Received: from localhost ([::1]:59190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3J51-0003K1-P7 for incoming@patchwork.ozlabs.org; Tue, 13 Jul 2021 10:08:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifo-0000Oo-0S for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:08 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:60595) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifl-00068J-Qv for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:07 -0400 Received: from quad ([82.142.17.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MbjBo-1lRDIb0Qbm-00dH4Z; Tue, 13 Jul 2021 15:41:55 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 02/12] linux-user/sparc: Rename target_errno.h -> target_errno_defs.h Date: Tue, 13 Jul 2021 15:41:42 +0200 Message-Id: <20210713134152.288423-3-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713134152.288423-1-laurent@vivier.eu> References: <20210713134152.288423-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:isS95RAXg48ZRUeQDv5n4W5eRPRdJsQXJRhMg1Xk4Q7yM7YPWnV F+3wCiVO0pUCAWOPt2bKt2S0CTOLCgx9zkXXM2NtSv+NlDZfjOp04a2JLmYkl0k6JAz32aV XLVZ5reVf/jArCEfCtzELC+J/+ZdljKqq9gbGwzGGcqkMbq9whBohqYpSuCTqn6uxzr+xej kbbsaosyrCeouYDHWq0Cw== X-UI-Out-Filterresults: notjunk:1;V03:K0:OmYBNZTHEDE=:88wGgim1srk48nIK+jGPhj KwiyGifvYXOkoXxYIbM9+GgN5sW018lld6sHA4HgCEcarhOztNCK/k45e+t+aTA6P/pgf3qFE 0tyiPYJOTHk5Ydv51m2c7KP4qut2XPtp8pW0Lao2XNcpWoOdmDaeHnJH4Vtt4OK41Zv6ueSYq kBiKO2DHVMqCIOmIDWjJaN4gqyRHdi2ymin+H9is0AdsLPO0DmPLRW+49JpeQQUHetWMLBx7J HWtnnNO0P8n8wlo1IuylZDd7hkXr54Q1C52Tw15Eb7iF4Z9oe24mf08Gl0aoaxjhNZNpfwh8f 1G5V3gXQAu8FjlqvdzCqtfOFcjchJhY+OpmHB64kSGZPmk/G30VvyGsoqxscNZUvzyfEp7+CT DM9SzOYbSG83mV5JoEDc5i2WGK5c/+agb01mz+ov4GpsFTQoHVvrjUogrz53HWcyoNl3lSjWF FOviyODg9nx6SQNq9nYqsnlGArsJjBVLiMflbMuia3PX40zCxOc9cBRnxitoxP0Lu3+QC4tn+ FdDS4/73dhcV/hXrZCA+ok9Zxy1qmvYJz2V4EpAi1QPHBsj7/0ulRuKO+oUA9zba9zcSga/9S O3XrZaTBnLnBgEY2g7KVVAus6baIRElYyzt4elJ2tdN4TZuWjcrbJ/SkYpyJbnVWQp7CdshCP cekX3CAEPvsxKGrp+4PadODHUO+2mAiYjLgL89U4Qa7EVz8T2HGZiWW/b+mAFmqQqtaz18gnL 8FsyLadizFIwoa+L2/pmKwWQ5NnbEhFt7C3ea68I9otE5Y4T0V7Tz5mY1TAZklMff/qKn19Mp z4IwYyF79KHFZK4lbMPKxm3emFA4f4O7VVLCnh//W6W7yikB05DjKy98TnrtiGzFCKuCMpM Received-SPF: none client-ip=212.227.17.13; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé We want to have one generic target_errno.h (API to access target errno), and will add target errno definitions in target_errno_defs.h. The sparc target already have its errnos in an header, simply rename it. Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210708170550.1846343-3-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/{target_errno.h => target_errno_defs.h} | 4 ++-- linux-user/sparc/target_syscall.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename linux-user/sparc/{target_errno.h => target_errno_defs.h} (99%) diff --git a/linux-user/sparc/target_errno.h b/linux-user/sparc/target_errno_defs.h similarity index 99% rename from linux-user/sparc/target_errno.h rename to linux-user/sparc/target_errno_defs.h index 9b846899cd4f..e00081098674 100644 --- a/linux-user/sparc/target_errno.h +++ b/linux-user/sparc/target_errno_defs.h @@ -1,5 +1,5 @@ -#ifndef SPARC_TARGET_ERRNO_H -#define SPARC_TARGET_ERRNO_H +#ifndef SPARC_TARGET_ERRNO_DEFS_H +#define SPARC_TARGET_ERRNO_DEFS_H /* Target errno definitions taken from asm-sparc/errno.h */ #undef TARGET_EWOULDBLOCK diff --git a/linux-user/sparc/target_syscall.h b/linux-user/sparc/target_syscall.h index 15d531f38978..dad501d008cd 100644 --- a/linux-user/sparc/target_syscall.h +++ b/linux-user/sparc/target_syscall.h @@ -1,7 +1,7 @@ #ifndef SPARC_TARGET_SYSCALL_H #define SPARC_TARGET_SYSCALL_H -#include "target_errno.h" +#include "target_errno_defs.h" #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) struct target_pt_regs { From patchwork Tue Jul 13 13:41:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1504663 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPN2g3fnSz9sWd for ; Wed, 14 Jul 2021 00:15:39 +1000 (AEST) Received: from localhost ([::1]:54124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3JCD-0001rs-6A for incoming@patchwork.ozlabs.org; Tue, 13 Jul 2021 10:15:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifo-0000Rp-Pm for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:08 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:58153) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifl-00067p-D6 for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:08 -0400 Received: from quad ([82.142.17.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N64JK-1l5qQN2NNQ-016MwD; Tue, 13 Jul 2021 15:41:55 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 03/12] linux-user: Extract target errno to 'target_errno_defs.h' Date: Tue, 13 Jul 2021 15:41:43 +0200 Message-Id: <20210713134152.288423-4-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713134152.288423-1-laurent@vivier.eu> References: <20210713134152.288423-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:MCaCVf4XjPnD8MnF6nCmbDxmvjtEI5ytFeijjSOxFSPtKWLq0iI hYDLrKBf62Dyn3Rhy3XxW2cDvdyh5Dt9OILAabRFHrYEtg+scUifqE/tXOLAP75q4IkUoG7 JvI2NQzD3wF0NTneFdhIk0vyK1WiPPt+5vbiEHikmzoSEcKoHBM0UPf5gc3tJ1WmJ3t24sH 6nSv1iFYkR09EP9wWJeuQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:cRtvW8YfMBI=:ez/wB4Q/1haF+dBMujRGD0 Ct7J1Tr5PMXxTp8VWDlOt+7SWb8HO4zCAD/V5mDfDe8SYWdk4RR/Ah7GGZpLzdbxQ4BnIBxOP 3jCDOtkajjpkv1fAQ+CPRPMk0l0AuQy2jEBDVn0Af1k806ucnz9Vtki96LFhC2yqK4e2+zOp9 AsIpvtDH8W8Nymzl8FDZnoZ5wN/Uyk2kI2TaTyCX6P8NN+2wmRmmGlx6dgmA8VjWiP06c4TYg iAj8gQ5ypEWK+dUnWPyMV+R+bSPhK+vtYbHy+A/j61Wr3W6v79vE8dfP3NpfSP78TbfI/e9en KEnR4EqqYRggy352/xyJXS1P/f47pxEvfIbiPKFe+a0YbLmH2HEcHfG8Qc8G1MbUmJU8+GRRQ Ach6vcAc1j+mtKVyRB3FEOZ1pFY53caAJDHXQ87vkVmQJUsN5ZHug8HymSlb14xVTDg9YokNX Fd7Kj86oXvXMglsVqBgHVLUK0KwuqAaDrTvQdCwqCUoYFgXXBriSYoJPGj2lDmJ63Szj9MUjc K2RmWRGTecf6xcNicAp/FexPt02862uwgLLTWgECcQC0QdlYAnsOOaa2gh5yjP1OyWyFE9Yhz o/+fyfmL9SLIZHqf986LsmJNtQmqMmKPFEuMy8vj96XI2AxGKXhm7pT+85C4E5kAcLZnpWlFi tpNg6y1Z6iFrxfiIfAbb4igdgciKn+1L4qRhth2Lknvbdu3p1ipQNkaBgPe7hKcSUDBoXtO5f iLV8JrPxuVDdeE7tx6JiNX26/aG9HSTw3e7dORx6KxwaPbIunL2QuRMGwo1dpLHxJUKytYHtA hE7pV102kMx34RD2vr/4qgjqEZUrcqanXMfmIpweQtmXx3CV1EB1AjX6vFEqpKibBk7E4ua Received-SPF: none client-ip=217.72.192.73; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé We want to access the target errno indepently of the rest of the linux-user code. Move the header containing the generic errno definitions ('errno_defs.h') to 'generic/target_errno_defs.h', create a new 'target_errno_defs.h' in each target which itself includes 'generic/target_errno_defs.h'. Suggested-by: Richard Henderson Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210708170550.1846343-4-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- linux-user/aarch64/target_errno_defs.h | 7 +++++++ linux-user/alpha/target_errno_defs.h | 6 ++++++ linux-user/arm/target_errno_defs.h | 7 +++++++ linux-user/cris/target_errno_defs.h | 7 +++++++ linux-user/{errno_defs.h => generic/target_errno_defs.h} | 4 ++-- linux-user/hexagon/target_errno_defs.h | 7 +++++++ linux-user/hppa/target_errno_defs.h | 6 ++++++ linux-user/i386/target_errno_defs.h | 7 +++++++ linux-user/m68k/target_errno_defs.h | 7 +++++++ linux-user/microblaze/target_errno_defs.h | 7 +++++++ linux-user/mips/target_errno_defs.h | 6 ++++++ linux-user/mips64/target_errno_defs.h | 6 ++++++ linux-user/nios2/target_errno_defs.h | 7 +++++++ linux-user/openrisc/target_errno_defs.h | 7 +++++++ linux-user/ppc/target_errno_defs.h | 7 +++++++ linux-user/riscv/target_errno_defs.h | 7 +++++++ linux-user/s390x/target_errno_defs.h | 7 +++++++ linux-user/safe-syscall.S | 2 +- linux-user/sh4/target_errno_defs.h | 7 +++++++ linux-user/sparc/target_errno_defs.h | 7 ++++++- linux-user/sparc/target_syscall.h | 2 -- linux-user/syscall_defs.h | 2 +- linux-user/x86_64/target_errno_defs.h | 7 +++++++ linux-user/xtensa/target_errno_defs.h | 7 +++++++ 24 files changed, 139 insertions(+), 7 deletions(-) create mode 100644 linux-user/aarch64/target_errno_defs.h create mode 100644 linux-user/alpha/target_errno_defs.h create mode 100644 linux-user/arm/target_errno_defs.h create mode 100644 linux-user/cris/target_errno_defs.h rename linux-user/{errno_defs.h => generic/target_errno_defs.h} (99%) create mode 100644 linux-user/hexagon/target_errno_defs.h create mode 100644 linux-user/hppa/target_errno_defs.h create mode 100644 linux-user/i386/target_errno_defs.h create mode 100644 linux-user/m68k/target_errno_defs.h create mode 100644 linux-user/microblaze/target_errno_defs.h create mode 100644 linux-user/mips/target_errno_defs.h create mode 100644 linux-user/mips64/target_errno_defs.h create mode 100644 linux-user/nios2/target_errno_defs.h create mode 100644 linux-user/openrisc/target_errno_defs.h create mode 100644 linux-user/ppc/target_errno_defs.h create mode 100644 linux-user/riscv/target_errno_defs.h create mode 100644 linux-user/s390x/target_errno_defs.h create mode 100644 linux-user/sh4/target_errno_defs.h create mode 100644 linux-user/x86_64/target_errno_defs.h create mode 100644 linux-user/xtensa/target_errno_defs.h diff --git a/linux-user/aarch64/target_errno_defs.h b/linux-user/aarch64/target_errno_defs.h new file mode 100644 index 000000000000..461b54772846 --- /dev/null +++ b/linux-user/aarch64/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef AARCH64_TARGET_ERRNO_DEFS_H +#define AARCH64_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/alpha/target_errno_defs.h b/linux-user/alpha/target_errno_defs.h new file mode 100644 index 000000000000..54770108c02a --- /dev/null +++ b/linux-user/alpha/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef ALPHA_TARGET_ERRNO_DEFS_H +#define ALPHA_TARGET_ERRNO_DEFS_H + +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/arm/target_errno_defs.h b/linux-user/arm/target_errno_defs.h new file mode 100644 index 000000000000..fd8437323843 --- /dev/null +++ b/linux-user/arm/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef ARM_TARGET_ERRNO_DEFS_H +#define ARM_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/cris/target_errno_defs.h b/linux-user/cris/target_errno_defs.h new file mode 100644 index 000000000000..1cf43b17a500 --- /dev/null +++ b/linux-user/cris/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef CRIS_TARGET_ERRNO_DEFS_H +#define CRIS_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/errno_defs.h b/linux-user/generic/target_errno_defs.h similarity index 99% rename from linux-user/errno_defs.h rename to linux-user/generic/target_errno_defs.h index aaf5208d62d6..17d85e0b61b6 100644 --- a/linux-user/errno_defs.h +++ b/linux-user/generic/target_errno_defs.h @@ -5,8 +5,8 @@ * Taken from asm-generic/errno-base.h and asm-generic/errno.h */ -#ifndef LINUX_USER_ERRNO_DEFS_H -#define LINUX_USER_ERRNO_DEFS_H +#ifndef GENERIC_TARGET_ERRNO_DEFS_H +#define GENERIC_TARGET_ERRNO_DEFS_H #define TARGET_EPERM 1 /* Operation not permitted */ #define TARGET_ENOENT 2 /* No such file or directory */ diff --git a/linux-user/hexagon/target_errno_defs.h b/linux-user/hexagon/target_errno_defs.h new file mode 100644 index 000000000000..da033a9a9e40 --- /dev/null +++ b/linux-user/hexagon/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef HEXAGON_TARGET_ERRNO_DEFS_H +#define HEXAGON_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/hppa/target_errno_defs.h b/linux-user/hppa/target_errno_defs.h new file mode 100644 index 000000000000..d6e9676ce254 --- /dev/null +++ b/linux-user/hppa/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef HPPA_TARGET_ERRNO_DEFS_H +#define HPPA_TARGET_ERRNO_DEFS_H + +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/i386/target_errno_defs.h b/linux-user/i386/target_errno_defs.h new file mode 100644 index 000000000000..459b2189e2bd --- /dev/null +++ b/linux-user/i386/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef I386_TARGET_ERRNO_DEFS_H +#define I386_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/m68k/target_errno_defs.h b/linux-user/m68k/target_errno_defs.h new file mode 100644 index 000000000000..96485a75431d --- /dev/null +++ b/linux-user/m68k/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef M68K_TARGET_ERRNO_DEFS_H +#define M68K_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/microblaze/target_errno_defs.h b/linux-user/microblaze/target_errno_defs.h new file mode 100644 index 000000000000..91a0bbf9dc05 --- /dev/null +++ b/linux-user/microblaze/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef MICROBLAZE_TARGET_ERRNO_DEFS_H +#define MICROBLAZE_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/mips/target_errno_defs.h b/linux-user/mips/target_errno_defs.h new file mode 100644 index 000000000000..daef95ea7030 --- /dev/null +++ b/linux-user/mips/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef MIPS_TARGET_ERRNO_DEFS_H +#define MIPS_TARGET_ERRNO_DEFS_H + +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/mips64/target_errno_defs.h b/linux-user/mips64/target_errno_defs.h new file mode 100644 index 000000000000..82b0a704f62c --- /dev/null +++ b/linux-user/mips64/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef MIPS64_TARGET_ERRNO_DEFS_H +#define MIPS64_TARGET_ERRNO_DEFS_H + +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/nios2/target_errno_defs.h b/linux-user/nios2/target_errno_defs.h new file mode 100644 index 000000000000..28120013e24b --- /dev/null +++ b/linux-user/nios2/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef NIOS2_TARGET_ERRNO_DEFS_H +#define NIOS2_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/openrisc/target_errno_defs.h b/linux-user/openrisc/target_errno_defs.h new file mode 100644 index 000000000000..cdf159746b18 --- /dev/null +++ b/linux-user/openrisc/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef OR1K_TARGET_ERRNO_DEFS_H +#define OR1K_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/ppc/target_errno_defs.h b/linux-user/ppc/target_errno_defs.h new file mode 100644 index 000000000000..a24a973342fc --- /dev/null +++ b/linux-user/ppc/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef PPC_TARGET_ERRNO_DEFS_H +#define PPC_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/riscv/target_errno_defs.h b/linux-user/riscv/target_errno_defs.h new file mode 100644 index 000000000000..5e377a2fce82 --- /dev/null +++ b/linux-user/riscv/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef RISCV_TARGET_ERRNO_DEFS_H +#define RISCV_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/s390x/target_errno_defs.h b/linux-user/s390x/target_errno_defs.h new file mode 100644 index 000000000000..f4c09700b5ee --- /dev/null +++ b/linux-user/s390x/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef S390X_TARGET_ERRNO_DEFS_H +#define S390X_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/safe-syscall.S b/linux-user/safe-syscall.S index b5df6254aeab..42ea7c40ba36 100644 --- a/linux-user/safe-syscall.S +++ b/linux-user/safe-syscall.S @@ -11,7 +11,7 @@ */ #include "hostdep.h" -#include "errno_defs.h" +#include "target_errno_defs.h" /* We have the correct host directory on our include path * so that this will pull in the right fragment for the architecture. diff --git a/linux-user/sh4/target_errno_defs.h b/linux-user/sh4/target_errno_defs.h new file mode 100644 index 000000000000..e90adb54ab2c --- /dev/null +++ b/linux-user/sh4/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef SH4_TARGET_ERRNO_DEFS_H +#define SH4_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/sparc/target_errno_defs.h b/linux-user/sparc/target_errno_defs.h index e00081098674..de4f1ffb0ac0 100644 --- a/linux-user/sparc/target_errno_defs.h +++ b/linux-user/sparc/target_errno_defs.h @@ -1,7 +1,12 @@ #ifndef SPARC_TARGET_ERRNO_DEFS_H #define SPARC_TARGET_ERRNO_DEFS_H -/* Target errno definitions taken from asm-sparc/errno.h */ +#include "../generic/target_errno_defs.h" + +/* + * Generic target errno overridden with definitions taken + * from asm-sparc/errno.h + */ #undef TARGET_EWOULDBLOCK #define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ #undef TARGET_EINPROGRESS diff --git a/linux-user/sparc/target_syscall.h b/linux-user/sparc/target_syscall.h index dad501d008cd..087b39d39c4c 100644 --- a/linux-user/sparc/target_syscall.h +++ b/linux-user/sparc/target_syscall.h @@ -1,8 +1,6 @@ #ifndef SPARC_TARGET_SYSCALL_H #define SPARC_TARGET_SYSCALL_H -#include "target_errno_defs.h" - #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) struct target_pt_regs { abi_ulong u_regs[16]; diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 18b031a2f6a8..a5ce487dcc38 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2751,7 +2751,7 @@ struct target_drm_i915_getparam { #include "socket.h" -#include "errno_defs.h" +#include "target_errno_defs.h" #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 diff --git a/linux-user/x86_64/target_errno_defs.h b/linux-user/x86_64/target_errno_defs.h new file mode 100644 index 000000000000..cb2a0f6e0be4 --- /dev/null +++ b/linux-user/x86_64/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef X86_64_TARGET_ERRNO_DEFS_H +#define X86_64_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif diff --git a/linux-user/xtensa/target_errno_defs.h b/linux-user/xtensa/target_errno_defs.h new file mode 100644 index 000000000000..66fade2d0c86 --- /dev/null +++ b/linux-user/xtensa/target_errno_defs.h @@ -0,0 +1,7 @@ +#ifndef XTENSA_TARGET_ERRNO_DEFS_H +#define XTENSA_TARGET_ERRNO_DEFS_H + +/* Target uses generic errno */ +#include "../generic/target_errno_defs.h" + +#endif From patchwork Tue Jul 13 13:41:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1504660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPMzB4wSZz9sWd for ; Wed, 14 Jul 2021 00:12:38 +1000 (AEST) Received: from localhost ([::1]:45720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3J9G-0004kA-Aq for incoming@patchwork.ozlabs.org; Tue, 13 Jul 2021 10:12:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifp-0000UJ-DW for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:09 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:51887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifm-00069R-Qz for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:09 -0400 Received: from quad ([82.142.17.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1ML9i0-1lmK3C125C-00IAt1; Tue, 13 Jul 2021 15:41:56 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 04/12] linux-user/alpha: Move errno definitions to 'target_errno_defs.h' Date: Tue, 13 Jul 2021 15:41:44 +0200 Message-Id: <20210713134152.288423-5-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713134152.288423-1-laurent@vivier.eu> References: <20210713134152.288423-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:yq79lh/77TS3yhRxxYGRxNIuWpbOGxBEz+YPAfLRAXgWslKt+TY EilWBQf7tAHyAHK72K4BkJZzeKykkKyf46aHezE0nfJXcozsB/ffgt6Wj7V7z6TCv9coq81 Z+kxnBv2Hz2G/IBNpoY/qgV3sAEsh10CUnvtPVUNw6E8Ik2Bwfl2pjaVgI9HmynqfNuDMWI tza+Ij2ZNyg3zqmesXW5Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:S2SRRlhI3Tc=:HCVMWEHbp4vGtmqfRpVMK2 /9DkfyoAJMRGf/9Zn+9zZT86DaPbbQmHxVM45XCxApldITtkEobDuvX5U/yhHp8/AoI0sxq3Q gZAqSpwhh7ga7dfteGYG02JLmtSInXIkJ3kg+7PiiR6p+1+zW7ZPVYeMlJkbfrAH7TObgHvWc mjFg3l2kuVQw2e0oHN03xpdMBYEufWaFu2ic9uBk8n6tVkC+Go/IFgCtj86hAMIvH2b6SL0yX Q57zwa5/CXtkbShRSn80HhbPtnfwMJcYYy0w6qU0XSLiA+YMs+TKlxw1hJTBFSNUmON8y63jO Xp2ShTDO0LlvHQ+zSYZxGBTMTz8YHcTWcX3BhUJeKGf00enBBaydD9k6FZzGCYP7AUld5uePV a8r/lI9KpCt99ptV1ld6Wxthr7hWMvf2mffZ8M7ut/msyWxH/a2P++QzAEREELPLAb9SEs3E0 8V/WDIidQBDxB1bPZWl24vyZHcX6RrbjKl+niLOummhNzmU0tNA7g9AcQkPDutztjAeZlYSmk xAYJaXQ4P1ISIntzBZvKOIBMuF6FZdiEmskgesmY02aurO6c7vV/4vYGtMzXyiGPDQC4f9u3B Y9N6Qh4WcIJltERQk7Wy3VxdtdiQJBgO1IMLiPDj/AHDWS4XNjCpgx6OUOWgb+IAehwSXscp2 fJkpxQfx2dLvYBCO8nYnnHPIj+sz7GxEtrK37T1O5UjggBxjqz9VX0GOZe8OVZQ7g6glRSMei 6tusuV30b8phaBIb5tVgrpkAeFe+iYYgylVB9XldA4NNdhhv2KdXjyN6jHuYbU10jESeCWtHh GOm/zk8nj1UR3k1aLaasuFr+nExTp4Yh+Qe/7y95OGdss9fdV+1wds88Y84+soCOiO/Vkk0 Received-SPF: none client-ip=212.227.17.10; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, UPPERCASE_50_75=0.008 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210708170550.1846343-5-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- linux-user/alpha/target_errno_defs.h | 198 +++++++++++++++++++++++++++ linux-user/alpha/target_syscall.h | 194 -------------------------- 2 files changed, 198 insertions(+), 194 deletions(-) diff --git a/linux-user/alpha/target_errno_defs.h b/linux-user/alpha/target_errno_defs.h index 54770108c02a..07924b13aafe 100644 --- a/linux-user/alpha/target_errno_defs.h +++ b/linux-user/alpha/target_errno_defs.h @@ -3,4 +3,202 @@ #include "../generic/target_errno_defs.h" +/* + * Generic target errno overridden with definitions taken + * from asm-alpha/errno.h + */ +#undef TARGET_EWOULDBLOCK +#define TARGET_EWOULDBLOCK TARGET_EAGAIN +#undef TARGET_EDEADLK +#define TARGET_EDEADLK 11 +#undef TARGET_EAGAIN +#define TARGET_EAGAIN 35 +#undef TARGET_EINPROGRESS +#define TARGET_EINPROGRESS 36 +#undef TARGET_EALREADY +#define TARGET_EALREADY 37 +#undef TARGET_ENOTSOCK +#define TARGET_ENOTSOCK 38 +#undef TARGET_EDESTADDRREQ +#define TARGET_EDESTADDRREQ 39 +#undef TARGET_EMSGSIZE +#define TARGET_EMSGSIZE 40 +#undef TARGET_EPROTOTYPE +#define TARGET_EPROTOTYPE 41 +#undef TARGET_ENOPROTOOPT +#define TARGET_ENOPROTOOPT 42 +#undef TARGET_EPROTONOSUPPORT +#define TARGET_EPROTONOSUPPORT 43 +#undef TARGET_ESOCKTNOSUPPORT +#define TARGET_ESOCKTNOSUPPORT 44 +#undef TARGET_EOPNOTSUPP +#define TARGET_EOPNOTSUPP 45 +#undef TARGET_EPFNOSUPPORT +#define TARGET_EPFNOSUPPORT 46 +#undef TARGET_EAFNOSUPPORT +#define TARGET_EAFNOSUPPORT 47 +#undef TARGET_EADDRINUSE +#define TARGET_EADDRINUSE 48 +#undef TARGET_EADDRNOTAVAIL +#define TARGET_EADDRNOTAVAIL 49 +#undef TARGET_ENETDOWN +#define TARGET_ENETDOWN 50 +#undef TARGET_ENETUNREACH +#define TARGET_ENETUNREACH 51 +#undef TARGET_ENETRESET +#define TARGET_ENETRESET 52 +#undef TARGET_ECONNABORTED +#define TARGET_ECONNABORTED 53 +#undef TARGET_ECONNRESET +#define TARGET_ECONNRESET 54 +#undef TARGET_ENOBUFS +#define TARGET_ENOBUFS 55 +#undef TARGET_EISCONN +#define TARGET_EISCONN 56 +#undef TARGET_ENOTCONN +#define TARGET_ENOTCONN 57 +#undef TARGET_ESHUTDOWN +#define TARGET_ESHUTDOWN 58 +#undef TARGET_ETOOMANYREFS +#define TARGET_ETOOMANYREFS 59 +#undef TARGET_ETIMEDOUT +#define TARGET_ETIMEDOUT 60 +#undef TARGET_ECONNREFUSED +#define TARGET_ECONNREFUSED 61 +#undef TARGET_ELOOP +#define TARGET_ELOOP 62 +#undef TARGET_ENAMETOOLONG +#define TARGET_ENAMETOOLONG 63 +#undef TARGET_EHOSTDOWN +#define TARGET_EHOSTDOWN 64 +#undef TARGET_EHOSTUNREACH +#define TARGET_EHOSTUNREACH 65 +#undef TARGET_ENOTEMPTY +#define TARGET_ENOTEMPTY 66 +/* Unused 67 */ +#undef TARGET_EUSERS +#define TARGET_EUSERS 68 +#undef TARGET_EDQUOT +#define TARGET_EDQUOT 69 +#undef TARGET_ESTALE +#define TARGET_ESTALE 70 +#undef TARGET_EREMOTE +#define TARGET_EREMOTE 71 +/* Unused 72-76 */ +#undef TARGET_ENOLCK +#define TARGET_ENOLCK 77 +#undef TARGET_ENOSYS +#define TARGET_ENOSYS 78 +/* Unused 79 */ +#undef TARGET_ENOMSG +#define TARGET_ENOMSG 80 +#undef TARGET_EIDRM +#define TARGET_EIDRM 81 +#undef TARGET_ENOSR +#define TARGET_ENOSR 82 +#undef TARGET_ETIME +#define TARGET_ETIME 83 +#undef TARGET_EBADMSG +#define TARGET_EBADMSG 84 +#undef TARGET_EPROTO +#define TARGET_EPROTO 85 +#undef TARGET_ENODATA +#define TARGET_ENODATA 86 +#undef TARGET_ENOSTR +#define TARGET_ENOSTR 87 +#undef TARGET_ECHRNG +#define TARGET_ECHRNG 88 +#undef TARGET_EL2NSYNC +#define TARGET_EL2NSYNC 89 +#undef TARGET_EL3HLT +#define TARGET_EL3HLT 90 +#undef TARGET_EL3RST +#define TARGET_EL3RST 91 +#undef TARGET_ENOPKG +#define TARGET_ENOPKG 92 +#undef TARGET_ELNRNG +#define TARGET_ELNRNG 93 +#undef TARGET_EUNATCH +#define TARGET_EUNATCH 94 +#undef TARGET_ENOCSI +#define TARGET_ENOCSI 95 +#undef TARGET_EL2HLT +#define TARGET_EL2HLT 96 +#undef TARGET_EBADE +#define TARGET_EBADE 97 +#undef TARGET_EBADR +#define TARGET_EBADR 98 +#undef TARGET_EXFULL +#define TARGET_EXFULL 99 +#undef TARGET_ENOANO +#define TARGET_ENOANO 100 +#undef TARGET_EBADRQC +#define TARGET_EBADRQC 101 +#undef TARGET_EBADSLT +#define TARGET_EBADSLT 102 +/* Unused 103 */ +#undef TARGET_EBFONT +#define TARGET_EBFONT 104 +#undef TARGET_ENONET +#define TARGET_ENONET 105 +#undef TARGET_ENOLINK +#define TARGET_ENOLINK 106 +#undef TARGET_EADV +#define TARGET_EADV 107 +#undef TARGET_ESRMNT +#define TARGET_ESRMNT 108 +#undef TARGET_ECOMM +#define TARGET_ECOMM 109 +#undef TARGET_EMULTIHOP +#define TARGET_EMULTIHOP 110 +#undef TARGET_EDOTDOT +#define TARGET_EDOTDOT 111 +#undef TARGET_EOVERFLOW +#define TARGET_EOVERFLOW 112 +#undef TARGET_ENOTUNIQ +#define TARGET_ENOTUNIQ 113 +#undef TARGET_EBADFD +#define TARGET_EBADFD 114 +#undef TARGET_EREMCHG +#define TARGET_EREMCHG 115 +#undef TARGET_EILSEQ +#define TARGET_EILSEQ 116 +/* Same as default 117-121 */ +#undef TARGET_ELIBACC +#define TARGET_ELIBACC 122 +#undef TARGET_ELIBBAD +#define TARGET_ELIBBAD 123 +#undef TARGET_ELIBSCN +#define TARGET_ELIBSCN 124 +#undef TARGET_ELIBMAX +#define TARGET_ELIBMAX 125 +#undef TARGET_ELIBEXEC +#define TARGET_ELIBEXEC 126 +#undef TARGET_ERESTART +#define TARGET_ERESTART 127 +#undef TARGET_ESTRPIPE +#define TARGET_ESTRPIPE 128 +#undef TARGET_ENOMEDIUM +#define TARGET_ENOMEDIUM 129 +#undef TARGET_EMEDIUMTYPE +#define TARGET_EMEDIUMTYPE 130 +#undef TARGET_ECANCELED +#define TARGET_ECANCELED 131 +#undef TARGET_ENOKEY +#define TARGET_ENOKEY 132 +#undef TARGET_EKEYEXPIRED +#define TARGET_EKEYEXPIRED 133 +#undef TARGET_EKEYREVOKED +#define TARGET_EKEYREVOKED 134 +#undef TARGET_EKEYREJECTED +#define TARGET_EKEYREJECTED 135 +#undef TARGET_EOWNERDEAD +#define TARGET_EOWNERDEAD 136 +#undef TARGET_ENOTRECOVERABLE +#define TARGET_ENOTRECOVERABLE 137 +#undef TARGET_ERFKILL +#define TARGET_ERFKILL 138 +#undef TARGET_EHWPOISON +#define TARGET_EHWPOISON 139 + #endif diff --git a/linux-user/alpha/target_syscall.h b/linux-user/alpha/target_syscall.h index 13a71f35eaf3..03091bf0a826 100644 --- a/linux-user/alpha/target_syscall.h +++ b/linux-user/alpha/target_syscall.h @@ -44,200 +44,6 @@ struct target_pt_regs { #define UNAME_MACHINE "alpha" #define UNAME_MINIMUM_RELEASE "2.6.32" -#undef TARGET_EWOULDBLOCK -#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ -#undef TARGET_EDEADLK -#define TARGET_EDEADLK 11 -#undef TARGET_EAGAIN -#define TARGET_EAGAIN 35 -#undef TARGET_EINPROGRESS -#define TARGET_EINPROGRESS 36 -#undef TARGET_EALREADY -#define TARGET_EALREADY 37 -#undef TARGET_ENOTSOCK -#define TARGET_ENOTSOCK 38 -#undef TARGET_EDESTADDRREQ -#define TARGET_EDESTADDRREQ 39 -#undef TARGET_EMSGSIZE -#define TARGET_EMSGSIZE 40 -#undef TARGET_EPROTOTYPE -#define TARGET_EPROTOTYPE 41 -#undef TARGET_ENOPROTOOPT -#define TARGET_ENOPROTOOPT 42 -#undef TARGET_EPROTONOSUPPORT -#define TARGET_EPROTONOSUPPORT 43 -#undef TARGET_ESOCKTNOSUPPORT -#define TARGET_ESOCKTNOSUPPORT 44 -#undef TARGET_EOPNOTSUPP -#define TARGET_EOPNOTSUPP 45 -#undef TARGET_EPFNOSUPPORT -#define TARGET_EPFNOSUPPORT 46 -#undef TARGET_EAFNOSUPPORT -#define TARGET_EAFNOSUPPORT 47 -#undef TARGET_EADDRINUSE -#define TARGET_EADDRINUSE 48 -#undef TARGET_EADDRNOTAVAIL -#define TARGET_EADDRNOTAVAIL 49 -#undef TARGET_ENETDOWN -#define TARGET_ENETDOWN 50 -#undef TARGET_ENETUNREACH -#define TARGET_ENETUNREACH 51 -#undef TARGET_ENETRESET -#define TARGET_ENETRESET 52 -#undef TARGET_ECONNABORTED -#define TARGET_ECONNABORTED 53 -#undef TARGET_ECONNRESET -#define TARGET_ECONNRESET 54 -#undef TARGET_ENOBUFS -#define TARGET_ENOBUFS 55 -#undef TARGET_EISCONN -#define TARGET_EISCONN 56 -#undef TARGET_ENOTCONN -#define TARGET_ENOTCONN 57 -#undef TARGET_ESHUTDOWN -#define TARGET_ESHUTDOWN 58 -#undef TARGET_ETOOMANYREFS -#define TARGET_ETOOMANYREFS 59 -#undef TARGET_ETIMEDOUT -#define TARGET_ETIMEDOUT 60 -#undef TARGET_ECONNREFUSED -#define TARGET_ECONNREFUSED 61 -#undef TARGET_ELOOP -#define TARGET_ELOOP 62 -#undef TARGET_ENAMETOOLONG -#define TARGET_ENAMETOOLONG 63 -#undef TARGET_EHOSTDOWN -#define TARGET_EHOSTDOWN 64 -#undef TARGET_EHOSTUNREACH -#define TARGET_EHOSTUNREACH 65 -#undef TARGET_ENOTEMPTY -#define TARGET_ENOTEMPTY 66 -/* Unused 67 */ -#undef TARGET_EUSERS -#define TARGET_EUSERS 68 -#undef TARGET_EDQUOT -#define TARGET_EDQUOT 69 -#undef TARGET_ESTALE -#define TARGET_ESTALE 70 -#undef TARGET_EREMOTE -#define TARGET_EREMOTE 71 -/* Unused 72-76 */ -#undef TARGET_ENOLCK -#define TARGET_ENOLCK 77 -#undef TARGET_ENOSYS -#define TARGET_ENOSYS 78 -/* Unused 79 */ -#undef TARGET_ENOMSG -#define TARGET_ENOMSG 80 -#undef TARGET_EIDRM -#define TARGET_EIDRM 81 -#undef TARGET_ENOSR -#define TARGET_ENOSR 82 -#undef TARGET_ETIME -#define TARGET_ETIME 83 -#undef TARGET_EBADMSG -#define TARGET_EBADMSG 84 -#undef TARGET_EPROTO -#define TARGET_EPROTO 85 -#undef TARGET_ENODATA -#define TARGET_ENODATA 86 -#undef TARGET_ENOSTR -#define TARGET_ENOSTR 87 -#undef TARGET_ECHRNG -#define TARGET_ECHRNG 88 -#undef TARGET_EL2NSYNC -#define TARGET_EL2NSYNC 89 -#undef TARGET_EL3HLT -#define TARGET_EL3HLT 90 -#undef TARGET_EL3RST -#define TARGET_EL3RST 91 -#undef TARGET_ENOPKG -#define TARGET_ENOPKG 92 -#undef TARGET_ELNRNG -#define TARGET_ELNRNG 93 -#undef TARGET_EUNATCH -#define TARGET_EUNATCH 94 -#undef TARGET_ENOCSI -#define TARGET_ENOCSI 95 -#undef TARGET_EL2HLT -#define TARGET_EL2HLT 96 -#undef TARGET_EBADE -#define TARGET_EBADE 97 -#undef TARGET_EBADR -#define TARGET_EBADR 98 -#undef TARGET_EXFULL -#define TARGET_EXFULL 99 -#undef TARGET_ENOANO -#define TARGET_ENOANO 100 -#undef TARGET_EBADRQC -#define TARGET_EBADRQC 101 -#undef TARGET_EBADSLT -#define TARGET_EBADSLT 102 -/* Unused 103 */ -#undef TARGET_EBFONT -#define TARGET_EBFONT 104 -#undef TARGET_ENONET -#define TARGET_ENONET 105 -#undef TARGET_ENOLINK -#define TARGET_ENOLINK 106 -#undef TARGET_EADV -#define TARGET_EADV 107 -#undef TARGET_ESRMNT -#define TARGET_ESRMNT 108 -#undef TARGET_ECOMM -#define TARGET_ECOMM 109 -#undef TARGET_EMULTIHOP -#define TARGET_EMULTIHOP 110 -#undef TARGET_EDOTDOT -#define TARGET_EDOTDOT 111 -#undef TARGET_EOVERFLOW -#define TARGET_EOVERFLOW 112 -#undef TARGET_ENOTUNIQ -#define TARGET_ENOTUNIQ 113 -#undef TARGET_EBADFD -#define TARGET_EBADFD 114 -#undef TARGET_EREMCHG -#define TARGET_EREMCHG 115 -#undef TARGET_EILSEQ -#define TARGET_EILSEQ 116 -/* Same as default 117-121 */ -#undef TARGET_ELIBACC -#define TARGET_ELIBACC 122 -#undef TARGET_ELIBBAD -#define TARGET_ELIBBAD 123 -#undef TARGET_ELIBSCN -#define TARGET_ELIBSCN 124 -#undef TARGET_ELIBMAX -#define TARGET_ELIBMAX 125 -#undef TARGET_ELIBEXEC -#define TARGET_ELIBEXEC 126 -#undef TARGET_ERESTART -#define TARGET_ERESTART 127 -#undef TARGET_ESTRPIPE -#define TARGET_ESTRPIPE 128 -#undef TARGET_ENOMEDIUM -#define TARGET_ENOMEDIUM 129 -#undef TARGET_EMEDIUMTYPE -#define TARGET_EMEDIUMTYPE 130 -#undef TARGET_ECANCELED -#define TARGET_ECANCELED 131 -#undef TARGET_ENOKEY -#define TARGET_ENOKEY 132 -#undef TARGET_EKEYEXPIRED -#define TARGET_EKEYEXPIRED 133 -#undef TARGET_EKEYREVOKED -#define TARGET_EKEYREVOKED 134 -#undef TARGET_EKEYREJECTED -#define TARGET_EKEYREJECTED 135 -#undef TARGET_EOWNERDEAD -#define TARGET_EOWNERDEAD 136 -#undef TARGET_ENOTRECOVERABLE -#define TARGET_ENOTRECOVERABLE 137 -#undef TARGET_ERFKILL -#define TARGET_ERFKILL 138 -#undef TARGET_EHWPOISON -#define TARGET_EHWPOISON 139 - // For sys_osf_getsysinfo #define TARGET_GSI_UACPROC 8 #define TARGET_GSI_IEEE_FP_CONTROL 45 From patchwork Tue Jul 13 13:41:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1504666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPN5F1XGkz9sX3 for ; Wed, 14 Jul 2021 00:17:53 +1000 (AEST) Received: from localhost ([::1]:34122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3JEM-0007OG-RU for incoming@patchwork.ozlabs.org; Tue, 13 Jul 2021 10:17:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifp-0000UL-Ek for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:09 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:55149) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifm-00069U-R7 for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:09 -0400 Received: from quad ([82.142.17.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MJn4B-1ljHun3o2T-00K5tQ; Tue, 13 Jul 2021 15:41:57 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 05/12] linux-user/hppa: Move errno definitions to 'target_errno_defs.h' Date: Tue, 13 Jul 2021 15:41:45 +0200 Message-Id: <20210713134152.288423-6-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713134152.288423-1-laurent@vivier.eu> References: <20210713134152.288423-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:6B96VGY/VMlRqwxnlus2ygiDd99xsVpNPKrxuY5jsnABZbrL3kN iN+6Gf7AFx7RlzU2Jzj9qHoRItyH+l9URO55/fJwW4UCPo8wgpTEhkK//SzHUNzw//fVxzK uneKVvhosRxvzV6nUXx2ny4VMzgQl5+ricJdS0Cnu20D6ecv6mzuXsa215LEeBUbVkE6S7J jSzUVpl4GYT6gL0KJteaA== X-UI-Out-Filterresults: notjunk:1;V03:K0:24C/Zlr/0W0=:rkc05wYFNKfHkSXqIHrURn bRWlLgRHsDNw+L2L8Go4AahfYcfPby/cDPxSH3lgkly2KwwA/mQnJeKzM3sPWPrDYWAewGvjX CihiviywXRUMzDkIAJ11eTiCX4LLkdbebtFPyVNC0Ci5a5aFubMyoaJwIXI4wFaR0pLh8nLo0 A4q/2uskKlKQ9Ufcgt7PIFpndL+gm3aWkOBpv3uglBpnhHJyr3dFFzsd9fk2al8uLBrSVJI1t 1QVaVWFyopBHZF7841SAJyFWc0xxLDyxcunfExjTqzLIScskzRkGn8tH4802xOfy4IMWEd1R5 qYcdoU1tSBzY9DFKeAYQ9pRMhIf4ktk96DXzdNeygvDzizSf1NQtz8Ut1+pyOpU26KWupm+af A9/oOedpH5Qr/YZja2mCIzcMJZDVldlJhmhgqpzqQhzhKFVwmEWZ47p/xFd5CNcjotX06vWTh 85Xaq6K372wr8ndmR1L9oEf56i/EcBM3zyY/ouFCaTZuQ81iOV0pzyM0j1B6E/91S/z/aguHx jLI/qz5XctjQ/2AvYV2m0ySYJr3qgECKiLD5wVUTvEVc1/zG0t7pDCf6uVZViCNPe2qQb8W/m QPwBtx7SgPQKawS1bdDNj9gW1IuZCVo6L2YWS+lgVZ1BQ6DZ8MyhdP0VST0enIrOJEZK6UOcx qTZxYzBj4PzW8G9NuNR0lOJIAwH0s+fMFF21vyNUCgG7R/amx4NoqDrwx2F8YkhzTdVvvUosh DwWZnRKhdjakrC1nbi8l8ZpmYObif0evpaqzEKz24Zu3dMAl/pNrDmTmj6+LqzLlKJsiCXCAc A/Pr2qzyBFQ9EORvakf07WyBj6ee3/hzg9gan6EgpT5nYjRVXJCibW9hcVMaO1ElMdoA6G2 Received-SPF: none client-ip=212.227.17.13; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, UPPERCASE_50_75=0.008 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210708170550.1846343-6-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- linux-user/hppa/target_errno_defs.h | 214 ++++++++++++++++++++++++++++ linux-user/hppa/target_syscall.h | 210 --------------------------- 2 files changed, 214 insertions(+), 210 deletions(-) diff --git a/linux-user/hppa/target_errno_defs.h b/linux-user/hppa/target_errno_defs.h index d6e9676ce254..b8f728f58632 100644 --- a/linux-user/hppa/target_errno_defs.h +++ b/linux-user/hppa/target_errno_defs.h @@ -3,4 +3,218 @@ #include "../generic/target_errno_defs.h" +/* + * Generic target errno overridden with definitions taken + * from asm-parisc/errno.h + */ +#undef TARGET_EWOULDBLOCK +#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ +#undef TARGET_ENOMSG +#define TARGET_ENOMSG 35 +#undef TARGET_EIDRM +#define TARGET_EIDRM 36 +#undef TARGET_ECHRNG +#define TARGET_ECHRNG 37 +#undef TARGET_EL2NSYNC +#define TARGET_EL2NSYNC 38 +#undef TARGET_EL3HLT +#define TARGET_EL3HLT 39 +#undef TARGET_EL3RST +#define TARGET_EL3RST 40 +#undef TARGET_ELNRNG +#define TARGET_ELNRNG 41 +#undef TARGET_EUNATCH +#define TARGET_EUNATCH 42 +#undef TARGET_ENOCSI +#define TARGET_ENOCSI 43 +#undef TARGET_EL2HLT +#define TARGET_EL2HLT 44 +#undef TARGET_EDEADLK +#define TARGET_EDEADLK 45 +#undef TARGET_ENOLCK +#define TARGET_ENOLCK 46 +#undef TARGET_EILSEQ +#define TARGET_EILSEQ 47 + +#undef TARGET_ENONET +#define TARGET_ENONET 50 +#undef TARGET_ENODATA +#define TARGET_ENODATA 51 +#undef TARGET_ETIME +#define TARGET_ETIME 52 +#undef TARGET_ENOSR +#define TARGET_ENOSR 53 +#undef TARGET_ENOSTR +#define TARGET_ENOSTR 54 +#undef TARGET_ENOPKG +#define TARGET_ENOPKG 55 + +#undef TARGET_ENOLINK +#define TARGET_ENOLINK 57 +#undef TARGET_EADV +#define TARGET_EADV 58 +#undef TARGET_ESRMNT +#define TARGET_ESRMNT 59 +#undef TARGET_ECOMM +#define TARGET_ECOMM 60 +#undef TARGET_EPROTO +#define TARGET_EPROTO 61 + +#undef TARGET_EMULTIHOP +#define TARGET_EMULTIHOP 64 + +#undef TARGET_EDOTDOT +#define TARGET_EDOTDOT 66 +#undef TARGET_EBADMSG +#define TARGET_EBADMSG 67 +#undef TARGET_EUSERS +#define TARGET_EUSERS 68 +#undef TARGET_EDQUOT +#define TARGET_EDQUOT 69 +#undef TARGET_ESTALE +#define TARGET_ESTALE 70 +#undef TARGET_EREMOTE +#define TARGET_EREMOTE 71 +#undef TARGET_EOVERFLOW +#define TARGET_EOVERFLOW 72 + +#undef TARGET_EBADE +#define TARGET_EBADE 160 +#undef TARGET_EBADR +#define TARGET_EBADR 161 +#undef TARGET_EXFULL +#define TARGET_EXFULL 162 +#undef TARGET_ENOANO +#define TARGET_ENOANO 163 +#undef TARGET_EBADRQC +#define TARGET_EBADRQC 164 +#undef TARGET_EBADSLT +#define TARGET_EBADSLT 165 +#undef TARGET_EBFONT +#define TARGET_EBFONT 166 +#undef TARGET_ENOTUNIQ +#define TARGET_ENOTUNIQ 167 +#undef TARGET_EBADFD +#define TARGET_EBADFD 168 +#undef TARGET_EREMCHG +#define TARGET_EREMCHG 169 +#undef TARGET_ELIBACC +#define TARGET_ELIBACC 170 +#undef TARGET_ELIBBAD +#define TARGET_ELIBBAD 171 +#undef TARGET_ELIBSCN +#define TARGET_ELIBSCN 172 +#undef TARGET_ELIBMAX +#define TARGET_ELIBMAX 173 +#undef TARGET_ELIBEXEC +#define TARGET_ELIBEXEC 174 +#undef TARGET_ERESTART +#define TARGET_ERESTART 175 +#undef TARGET_ESTRPIPE +#define TARGET_ESTRPIPE 176 +#undef TARGET_EUCLEAN +#define TARGET_EUCLEAN 177 +#undef TARGET_ENOTNAM +#define TARGET_ENOTNAM 178 +#undef TARGET_ENAVAIL +#define TARGET_ENAVAIL 179 +#undef TARGET_EISNAM +#define TARGET_EISNAM 180 +#undef TARGET_EREMOTEIO +#define TARGET_EREMOTEIO 181 +#undef TARGET_ENOMEDIUM +#define TARGET_ENOMEDIUM 182 +#undef TARGET_EMEDIUMTYPE +#define TARGET_EMEDIUMTYPE 183 +#undef TARGET_ENOKEY +#define TARGET_ENOKEY 184 +#undef TARGET_EKEYEXPIRED +#define TARGET_EKEYEXPIRED 185 +#undef TARGET_EKEYREVOKED +#define TARGET_EKEYREVOKED 186 +#undef TARGET_EKEYREJECTED +#define TARGET_EKEYREJECTED 187 + +/* Never used in linux. */ +/* #define TARGET_ENOSYM 215 */ +#undef TARGET_ENOTSOCK +#define TARGET_ENOTSOCK 216 +#undef TARGET_EDESTADDRREQ +#define TARGET_EDESTADDRREQ 217 +#undef TARGET_EMSGSIZE +#define TARGET_EMSGSIZE 218 +#undef TARGET_EPROTOTYPE +#define TARGET_EPROTOTYPE 219 +#undef TARGET_ENOPROTOOPT +#define TARGET_ENOPROTOOPT 220 +#undef TARGET_EPROTONOSUPPORT +#define TARGET_EPROTONOSUPPORT 221 +#undef TARGET_ESOCKTNOSUPPORT +#define TARGET_ESOCKTNOSUPPORT 222 +#undef TARGET_EOPNOTSUPP +#define TARGET_EOPNOTSUPP 223 +#undef TARGET_EPFNOSUPPORT +#define TARGET_EPFNOSUPPORT 224 +#undef TARGET_EAFNOSUPPORT +#define TARGET_EAFNOSUPPORT 225 +#undef TARGET_EADDRINUSE +#define TARGET_EADDRINUSE 226 +#undef TARGET_EADDRNOTAVAIL +#define TARGET_EADDRNOTAVAIL 227 +#undef TARGET_ENETDOWN +#define TARGET_ENETDOWN 228 +#undef TARGET_ENETUNREACH +#define TARGET_ENETUNREACH 229 +#undef TARGET_ENETRESET +#define TARGET_ENETRESET 230 +#undef TARGET_ECONNABORTED +#define TARGET_ECONNABORTED 231 +#undef TARGET_ECONNRESET +#define TARGET_ECONNRESET 232 +#undef TARGET_ENOBUFS +#define TARGET_ENOBUFS 233 +#undef TARGET_EISCONN +#define TARGET_EISCONN 234 +#undef TARGET_ENOTCONN +#define TARGET_ENOTCONN 235 +#undef TARGET_ESHUTDOWN +#define TARGET_ESHUTDOWN 236 +#undef TARGET_ETOOMANYREFS +#define TARGET_ETOOMANYREFS 237 +#undef TARGET_ETIMEDOUT +#define TARGET_ETIMEDOUT 238 +#undef TARGET_ECONNREFUSED +#define TARGET_ECONNREFUSED 239 +#define TARGET_EREMOTERELEASE 240 +#undef TARGET_EHOSTDOWN +#define TARGET_EHOSTDOWN 241 +#undef TARGET_EHOSTUNREACH +#define TARGET_EHOSTUNREACH 242 + +#undef TARGET_EALREADY +#define TARGET_EALREADY 244 +#undef TARGET_EINPROGRESS +#define TARGET_EINPROGRESS 245 +#undef TARGET_ENOTEMPTY +#define TARGET_ENOTEMPTY 247 +#undef TARGET_ENAMETOOLONG +#define TARGET_ENAMETOOLONG 248 +#undef TARGET_ELOOP +#define TARGET_ELOOP 249 +#undef TARGET_ENOSYS +#define TARGET_ENOSYS 251 + +#undef TARGET_ECANCELED +#define TARGET_ECANCELED 253 + +#undef TARGET_EOWNERDEAD +#define TARGET_EOWNERDEAD 254 +#undef TARGET_ENOTRECOVERABLE +#define TARGET_ENOTRECOVERABLE 255 + +#undef TARGET_ERFKILL +#define TARGET_ERFKILL 256 +#undef TARGET_EHWPOISON +#define TARGET_EHWPOISON 257 + #endif diff --git a/linux-user/hppa/target_syscall.h b/linux-user/hppa/target_syscall.h index 97a095656d89..0018bcb5c4dc 100644 --- a/linux-user/hppa/target_syscall.h +++ b/linux-user/hppa/target_syscall.h @@ -27,214 +27,4 @@ struct target_pt_regs { #define TARGET_MCL_FUTURE 2 #define TARGET_MCL_ONFAULT 4 -#undef TARGET_EWOULDBLOCK -#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ -#undef TARGET_ENOMSG -#define TARGET_ENOMSG 35 -#undef TARGET_EIDRM -#define TARGET_EIDRM 36 -#undef TARGET_ECHRNG -#define TARGET_ECHRNG 37 -#undef TARGET_EL2NSYNC -#define TARGET_EL2NSYNC 38 -#undef TARGET_EL3HLT -#define TARGET_EL3HLT 39 -#undef TARGET_EL3RST -#define TARGET_EL3RST 40 -#undef TARGET_ELNRNG -#define TARGET_ELNRNG 41 -#undef TARGET_EUNATCH -#define TARGET_EUNATCH 42 -#undef TARGET_ENOCSI -#define TARGET_ENOCSI 43 -#undef TARGET_EL2HLT -#define TARGET_EL2HLT 44 -#undef TARGET_EDEADLK -#define TARGET_EDEADLK 45 -#undef TARGET_ENOLCK -#define TARGET_ENOLCK 46 -#undef TARGET_EILSEQ -#define TARGET_EILSEQ 47 - -#undef TARGET_ENONET -#define TARGET_ENONET 50 -#undef TARGET_ENODATA -#define TARGET_ENODATA 51 -#undef TARGET_ETIME -#define TARGET_ETIME 52 -#undef TARGET_ENOSR -#define TARGET_ENOSR 53 -#undef TARGET_ENOSTR -#define TARGET_ENOSTR 54 -#undef TARGET_ENOPKG -#define TARGET_ENOPKG 55 - -#undef TARGET_ENOLINK -#define TARGET_ENOLINK 57 -#undef TARGET_EADV -#define TARGET_EADV 58 -#undef TARGET_ESRMNT -#define TARGET_ESRMNT 59 -#undef TARGET_ECOMM -#define TARGET_ECOMM 60 -#undef TARGET_EPROTO -#define TARGET_EPROTO 61 - -#undef TARGET_EMULTIHOP -#define TARGET_EMULTIHOP 64 - -#undef TARGET_EDOTDOT -#define TARGET_EDOTDOT 66 -#undef TARGET_EBADMSG -#define TARGET_EBADMSG 67 -#undef TARGET_EUSERS -#define TARGET_EUSERS 68 -#undef TARGET_EDQUOT -#define TARGET_EDQUOT 69 -#undef TARGET_ESTALE -#define TARGET_ESTALE 70 -#undef TARGET_EREMOTE -#define TARGET_EREMOTE 71 -#undef TARGET_EOVERFLOW -#define TARGET_EOVERFLOW 72 - -#undef TARGET_EBADE -#define TARGET_EBADE 160 -#undef TARGET_EBADR -#define TARGET_EBADR 161 -#undef TARGET_EXFULL -#define TARGET_EXFULL 162 -#undef TARGET_ENOANO -#define TARGET_ENOANO 163 -#undef TARGET_EBADRQC -#define TARGET_EBADRQC 164 -#undef TARGET_EBADSLT -#define TARGET_EBADSLT 165 -#undef TARGET_EBFONT -#define TARGET_EBFONT 166 -#undef TARGET_ENOTUNIQ -#define TARGET_ENOTUNIQ 167 -#undef TARGET_EBADFD -#define TARGET_EBADFD 168 -#undef TARGET_EREMCHG -#define TARGET_EREMCHG 169 -#undef TARGET_ELIBACC -#define TARGET_ELIBACC 170 -#undef TARGET_ELIBBAD -#define TARGET_ELIBBAD 171 -#undef TARGET_ELIBSCN -#define TARGET_ELIBSCN 172 -#undef TARGET_ELIBMAX -#define TARGET_ELIBMAX 173 -#undef TARGET_ELIBEXEC -#define TARGET_ELIBEXEC 174 -#undef TARGET_ERESTART -#define TARGET_ERESTART 175 -#undef TARGET_ESTRPIPE -#define TARGET_ESTRPIPE 176 -#undef TARGET_EUCLEAN -#define TARGET_EUCLEAN 177 -#undef TARGET_ENOTNAM -#define TARGET_ENOTNAM 178 -#undef TARGET_ENAVAIL -#define TARGET_ENAVAIL 179 -#undef TARGET_EISNAM -#define TARGET_EISNAM 180 -#undef TARGET_EREMOTEIO -#define TARGET_EREMOTEIO 181 -#undef TARGET_ENOMEDIUM -#define TARGET_ENOMEDIUM 182 -#undef TARGET_EMEDIUMTYPE -#define TARGET_EMEDIUMTYPE 183 -#undef TARGET_ENOKEY -#define TARGET_ENOKEY 184 -#undef TARGET_EKEYEXPIRED -#define TARGET_EKEYEXPIRED 185 -#undef TARGET_EKEYREVOKED -#define TARGET_EKEYREVOKED 186 -#undef TARGET_EKEYREJECTED -#define TARGET_EKEYREJECTED 187 - -/* Never used in linux. */ -/* #define TARGET_ENOSYM 215 */ -#undef TARGET_ENOTSOCK -#define TARGET_ENOTSOCK 216 -#undef TARGET_EDESTADDRREQ -#define TARGET_EDESTADDRREQ 217 -#undef TARGET_EMSGSIZE -#define TARGET_EMSGSIZE 218 -#undef TARGET_EPROTOTYPE -#define TARGET_EPROTOTYPE 219 -#undef TARGET_ENOPROTOOPT -#define TARGET_ENOPROTOOPT 220 -#undef TARGET_EPROTONOSUPPORT -#define TARGET_EPROTONOSUPPORT 221 -#undef TARGET_ESOCKTNOSUPPORT -#define TARGET_ESOCKTNOSUPPORT 222 -#undef TARGET_EOPNOTSUPP -#define TARGET_EOPNOTSUPP 223 -#undef TARGET_EPFNOSUPPORT -#define TARGET_EPFNOSUPPORT 224 -#undef TARGET_EAFNOSUPPORT -#define TARGET_EAFNOSUPPORT 225 -#undef TARGET_EADDRINUSE -#define TARGET_EADDRINUSE 226 -#undef TARGET_EADDRNOTAVAIL -#define TARGET_EADDRNOTAVAIL 227 -#undef TARGET_ENETDOWN -#define TARGET_ENETDOWN 228 -#undef TARGET_ENETUNREACH -#define TARGET_ENETUNREACH 229 -#undef TARGET_ENETRESET -#define TARGET_ENETRESET 230 -#undef TARGET_ECONNABORTED -#define TARGET_ECONNABORTED 231 -#undef TARGET_ECONNRESET -#define TARGET_ECONNRESET 232 -#undef TARGET_ENOBUFS -#define TARGET_ENOBUFS 233 -#undef TARGET_EISCONN -#define TARGET_EISCONN 234 -#undef TARGET_ENOTCONN -#define TARGET_ENOTCONN 235 -#undef TARGET_ESHUTDOWN -#define TARGET_ESHUTDOWN 236 -#undef TARGET_ETOOMANYREFS -#define TARGET_ETOOMANYREFS 237 -#undef TARGET_ETIMEDOUT -#define TARGET_ETIMEDOUT 238 -#undef TARGET_ECONNREFUSED -#define TARGET_ECONNREFUSED 239 -#define TARGET_EREMOTERELEASE 240 -#undef TARGET_EHOSTDOWN -#define TARGET_EHOSTDOWN 241 -#undef TARGET_EHOSTUNREACH -#define TARGET_EHOSTUNREACH 242 - -#undef TARGET_EALREADY -#define TARGET_EALREADY 244 -#undef TARGET_EINPROGRESS -#define TARGET_EINPROGRESS 245 -#undef TARGET_ENOTEMPTY -#define TARGET_ENOTEMPTY 247 -#undef TARGET_ENAMETOOLONG -#define TARGET_ENAMETOOLONG 248 -#undef TARGET_ELOOP -#define TARGET_ELOOP 249 -#undef TARGET_ENOSYS -#define TARGET_ENOSYS 251 - -#undef TARGET_ECANCELED -#define TARGET_ECANCELED 253 - -#undef TARGET_EOWNERDEAD -#define TARGET_EOWNERDEAD 254 -#undef TARGET_ENOTRECOVERABLE -#define TARGET_ENOTRECOVERABLE 255 - -#undef TARGET_ERFKILL -#define TARGET_ERFKILL 256 -#undef TARGET_EHWPOISON -#define TARGET_EHWPOISON 257 - #endif /* HPPA_TARGET_SYSCALL_H */ From patchwork Tue Jul 13 13:41:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1504658 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPMwv4dfxz9sWd for ; Wed, 14 Jul 2021 00:10:39 +1000 (AEST) Received: from localhost ([::1]:39348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3J7N-0000RR-As for incoming@patchwork.ozlabs.org; Tue, 13 Jul 2021 10:10:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifu-0000ac-QK for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:14 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:37487) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifo-0006AD-7R for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:14 -0400 Received: from quad ([82.142.17.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M734j-1m4emw3Smd-008b9q; Tue, 13 Jul 2021 15:41:58 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 06/12] linux-user/mips: Move errno definitions to 'target_errno_defs.h' Date: Tue, 13 Jul 2021 15:41:46 +0200 Message-Id: <20210713134152.288423-7-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713134152.288423-1-laurent@vivier.eu> References: <20210713134152.288423-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:l0pQmxRhgRRBKkIm0zhBWNQNNlfkxpu7Q7QpT8GupmLIRVw7Acf MIW9DwZB+gq4slLZWeexvdgEtMPEclRQIzzlGkF+a+prHLJ1HbqO0YcE3CNGa2HZivIdWoW yakseEL7jWzIKeLOrJaDo24DhEi6xtk+aUMbgOj2QjwBAEkupzOYn0kcFpHYOf8+JlM12k6 pZpWrelQnqlcUZuvxF70g== X-UI-Out-Filterresults: notjunk:1;V03:K0:sApVVUt2uro=:hWEsJz+Jc6kj66X9AZ0cRh h1zOqXJYhbNP/hdQzO6B2pIYyiNf7P2vrRKIUFLNHQc7AkK+WBFtFXF7vNXGDhsB+S6Mk9gaK HSS5cGXIgw89rb1LAlc665/Tqil2ZmU1PlPOINYwbtuMqh7pWEwbHt6ohj3+TvcowMXCstp+b zA6k7aArvCqFeFNK5BwIYa/Kn+BSYmit/M+JUzWXzb5h/yZocaDSyHGw6LW0ih0tF/FnHPpJw oCTnjc0WgxClN54ZKHY3VSpCWis9NhTsA39jZPATyGKHb/lglMYZMNoBwb+iCiRWyvntTkqNY 2hFMzaXoPHkSxukY/xdrPD2tbE053eLIO506+O++wNQe/C7M+oUQOXsPSZPlNK+sBbLPAgYjH rISYbysRga9UPPIhfNxI6S0IZVjmhOg5zyAZSeYaVu687+3R58TemiqPQ1P7hGKcDK3BIG78K B9V1yTEOPfyiX47sR4f8U6ey8AsatsyWEcpnYxH/GynAt17UfQW0Padpa+QFHf74J7UlqHoBf vmF2QMPNFn6FGUrCl8KgGsBUn6/c8jzt+lcfXVaREonNrq8UIENGwZx/TyffTnvYcedzzGWJ5 yZyoCfHXa+euXkQak1f+tAW2kXDLhWLWVsS1Dp09Vrbe2neFA9rqKRRBm9FsbNsI2o2Cr7Qz6 +ayd26cADCuGjB46AQOjbU81HmrmiYWuOt8YUMYJimf1j5dWctXIWiab8rRUCAtbH71Gk1wke 5ZTVuHcNB/UlnP5FBJxtIfxX24DteWSEydZQ4UBNsVQ4FqETUYsVVUx3EyRU5LphGVnssRKaJ Lc4bbDpftuHvz1hSybUSRLXv5AzE7JICzkakyuGzxv9u02ykrB/qafVS6yecixuTRovk1lW Received-SPF: none client-ip=217.72.192.73; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Suggested-by: Richard Henderson Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210708170550.1846343-7-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- linux-user/mips/target_errno_defs.h | 215 ++++++++++++++++++++++++++ linux-user/mips/target_syscall.h | 211 ------------------------- linux-user/mips64/target_errno_defs.h | 6 +- linux-user/mips64/target_syscall.h | 211 ------------------------- 4 files changed, 220 insertions(+), 423 deletions(-) diff --git a/linux-user/mips/target_errno_defs.h b/linux-user/mips/target_errno_defs.h index daef95ea7030..5685cda10db8 100644 --- a/linux-user/mips/target_errno_defs.h +++ b/linux-user/mips/target_errno_defs.h @@ -3,4 +3,219 @@ #include "../generic/target_errno_defs.h" +/* + * Generic target errno overridden with definitions taken + * from asm-mips/errno.h + */ + +#undef TARGET_EWOULDBLOCK +#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ +#undef TARGET_ENOMSG +#define TARGET_ENOMSG 35 /* Identifier removed */ +#undef TARGET_EIDRM +#define TARGET_EIDRM 36 /* Identifier removed */ +#undef TARGET_ECHRNG +#define TARGET_ECHRNG 37 /* Channel number out of range */ +#undef TARGET_EL2NSYNC +#define TARGET_EL2NSYNC 38 /* Level 2 not synchronized */ +#undef TARGET_EL3HLT +#define TARGET_EL3HLT 39 /* Level 3 halted */ +#undef TARGET_EL3RST +#define TARGET_EL3RST 40 /* Level 3 reset */ +#undef TARGET_ELNRNG +#define TARGET_ELNRNG 41 /* Link number out of range */ +#undef TARGET_EUNATCH +#define TARGET_EUNATCH 42 /* Protocol driver not attached */ +#undef TARGET_ENOCSI +#define TARGET_ENOCSI 43 /* No CSI structure available */ +#undef TARGET_EL2HLT +#define TARGET_EL2HLT 44 /* Level 2 halted */ +#undef TARGET_EDEADLK +#define TARGET_EDEADLK 45 /* Resource deadlock would occur */ +#undef TARGET_ENOLCK +#define TARGET_ENOLCK 46 /* No record locks available */ +#undef TARGET_EBADE +#define TARGET_EBADE 50 /* Invalid exchange */ +#undef TARGET_EBADR +#define TARGET_EBADR 51 /* Invalid request descriptor */ +#undef TARGET_EXFULL +#define TARGET_EXFULL 52 /* TARGET_Exchange full */ +#undef TARGET_ENOANO +#define TARGET_ENOANO 53 /* No anode */ +#undef TARGET_EBADRQC +#define TARGET_EBADRQC 54 /* Invalid request code */ +#undef TARGET_EBADSLT +#define TARGET_EBADSLT 55 /* Invalid slot */ +#undef TARGET_EDEADLOCK +#define TARGET_EDEADLOCK 56 /* File locking deadlock error */ +#undef TARGET_EBFONT +#define TARGET_EBFONT 59 /* Bad font file format */ +#undef TARGET_ENOSTR +#define TARGET_ENOSTR 60 /* Device not a stream */ +#undef TARGET_ENODATA +#define TARGET_ENODATA 61 /* No data available */ +#undef TARGET_ETIME +#define TARGET_ETIME 62 /* Timer expired */ +#undef TARGET_ENOSR +#define TARGET_ENOSR 63 /* Out of streams resources */ +#undef TARGET_ENONET +#define TARGET_ENONET 64 /* Machine is not on the network */ +#undef TARGET_ENOPKG +#define TARGET_ENOPKG 65 /* Package not installed */ +#undef TARGET_EREMOTE +#define TARGET_EREMOTE 66 /* Object is remote */ +#undef TARGET_ENOLINK +#define TARGET_ENOLINK 67 /* Link has been severed */ +#undef TARGET_EADV +#define TARGET_EADV 68 /* Advertise error */ +#undef TARGET_ESRMNT +#define TARGET_ESRMNT 69 /* Srmount error */ +#undef TARGET_ECOMM +#define TARGET_ECOMM 70 /* Communication error on send */ +#undef TARGET_EPROTO +#define TARGET_EPROTO 71 /* Protocol error */ +#undef TARGET_EDOTDOT +#define TARGET_EDOTDOT 73 /* RFS specific error */ +#undef TARGET_EMULTIHOP +#define TARGET_EMULTIHOP 74 /* Multihop attempted */ +#undef TARGET_EBADMSG +#define TARGET_EBADMSG 77 /* Not a data message */ +#undef TARGET_ENAMETOOLONG +#define TARGET_ENAMETOOLONG 78 /* File name too long */ +#undef TARGET_EOVERFLOW +#define TARGET_EOVERFLOW 79 /* Value too large for defined data type */ +#undef TARGET_ENOTUNIQ +#define TARGET_ENOTUNIQ 80 /* Name not unique on network */ +#undef TARGET_EBADFD +#define TARGET_EBADFD 81 /* File descriptor in bad state */ +#undef TARGET_EREMCHG +#define TARGET_EREMCHG 82 /* Remote address changed */ +#undef TARGET_ELIBACC +#define TARGET_ELIBACC 83 /* Can not access a needed shared library */ +#undef TARGET_ELIBBAD +#define TARGET_ELIBBAD 84 /* Accessing a corrupted shared library */ +#undef TARGET_ELIBSCN +#define TARGET_ELIBSCN 85 /* .lib section in a.out corrupted */ +#undef TARGET_ELIBMAX +#define TARGET_ELIBMAX 86 /* Attempting to link in too many shared libraries */ +#undef TARGET_ELIBEXEC +#define TARGET_ELIBEXEC 87 /* Cannot exec a shared library directly */ +#undef TARGET_EILSEQ +#define TARGET_EILSEQ 88 /* Illegal byte sequence */ +#undef TARGET_ENOSYS +#define TARGET_ENOSYS 89 /* Function not implemented */ +#undef TARGET_ELOOP +#define TARGET_ELOOP 90 /* Too many symbolic links encountered */ +#undef TARGET_ERESTART +#define TARGET_ERESTART 91 /* Interrupted system call should be restarted */ +#undef TARGET_ESTRPIPE +#define TARGET_ESTRPIPE 92 /* Streams pipe error */ +#undef TARGET_ENOTEMPTY +#define TARGET_ENOTEMPTY 93 /* Directory not empty */ +#undef TARGET_EUSERS +#define TARGET_EUSERS 94 /* Too many users */ +#undef TARGET_ENOTSOCK +#define TARGET_ENOTSOCK 95 /* Socket operation on non-socket */ +#undef TARGET_EDESTADDRREQ +#define TARGET_EDESTADDRREQ 96 /* Destination address required */ +#undef TARGET_EMSGSIZE +#define TARGET_EMSGSIZE 97 /* Message too long */ +#undef TARGET_EPROTOTYPE +#define TARGET_EPROTOTYPE 98 /* Protocol wrong type for socket */ +#undef TARGET_ENOPROTOOPT +#define TARGET_ENOPROTOOPT 99 /* Protocol not available */ +#undef TARGET_EPROTONOSUPPORT +#define TARGET_EPROTONOSUPPORT 120 /* Protocol not supported */ +#undef TARGET_ESOCKTNOSUPPORT +#define TARGET_ESOCKTNOSUPPORT 121 /* Socket type not supported */ +#undef TARGET_EOPNOTSUPP +#define TARGET_EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ +#undef TARGET_EPFNOSUPPORT +#define TARGET_EPFNOSUPPORT 123 /* Protocol family not supported */ +#undef TARGET_EAFNOSUPPORT +#define TARGET_EAFNOSUPPORT 124 /* Address family not supported by protocol */ +#undef TARGET_EADDRINUSE +#define TARGET_EADDRINUSE 125 /* Address already in use */ +#undef TARGET_EADDRNOTAVAIL +#define TARGET_EADDRNOTAVAIL 126 /* Cannot assign requested address */ +#undef TARGET_ENETDOWN +#define TARGET_ENETDOWN 127 /* Network is down */ +#undef TARGET_ENETUNREACH +#define TARGET_ENETUNREACH 128 /* Network is unreachable */ +#undef TARGET_ENETRESET +#define TARGET_ENETRESET 129 /* Network dropped connection because of reset */ +#undef TARGET_ECONNABORTED +#define TARGET_ECONNABORTED 130 /* Software caused connection abort */ +#undef TARGET_ECONNRESET +#define TARGET_ECONNRESET 131 /* Connection reset by peer */ +#undef TARGET_ENOBUFS +#define TARGET_ENOBUFS 132 /* No buffer space available */ +#undef TARGET_EISCONN +#define TARGET_EISCONN 133 /* Transport endpoint is already connected */ +#undef TARGET_ENOTCONN +#define TARGET_ENOTCONN 134 /* Transport endpoint is not connected */ +#undef TARGET_EUCLEAN +#define TARGET_EUCLEAN 135 /* Structure needs cleaning */ +#undef TARGET_ENOTNAM +#define TARGET_ENOTNAM 137 /* Not a XENIX named type file */ +#undef TARGET_ENAVAIL +#define TARGET_ENAVAIL 138 /* No XENIX semaphores available */ +#undef TARGET_EISNAM +#define TARGET_EISNAM 139 /* Is a named type file */ +#undef TARGET_EREMOTEIO +#define TARGET_EREMOTEIO 140 /* Remote I/O error */ +#undef TARGET_EINIT +#define TARGET_EINIT 141 /* Reserved */ +#undef TARGET_EREMDEV +#define TARGET_EREMDEV 142 /* TARGET_Error 142 */ +#undef TARGET_ESHUTDOWN +#define TARGET_ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ +#undef TARGET_ETOOMANYREFS +#define TARGET_ETOOMANYREFS 144 /* Too many references: cannot splice */ +#undef TARGET_ETIMEDOUT +#define TARGET_ETIMEDOUT 145 /* Connection timed out */ +#undef TARGET_ECONNREFUSED +#define TARGET_ECONNREFUSED 146 /* Connection refused */ +#undef TARGET_EHOSTDOWN +#define TARGET_EHOSTDOWN 147 /* Host is down */ +#undef TARGET_EHOSTUNREACH +#define TARGET_EHOSTUNREACH 148 /* No route to host */ +#undef TARGET_EALREADY +#define TARGET_EALREADY 149 /* Operation already in progress */ +#undef TARGET_EINPROGRESS +#define TARGET_EINPROGRESS 150 /* Operation now in progress */ +#undef TARGET_ESTALE +#define TARGET_ESTALE 151 /* Stale NFS file handle */ +#undef TARGET_ECANCELED +#define TARGET_ECANCELED 158 /* AIO operation canceled */ +/* + * These error are Linux extensions. + */ +#undef TARGET_ENOMEDIUM +#define TARGET_ENOMEDIUM 159 /* No medium found */ +#undef TARGET_EMEDIUMTYPE +#define TARGET_EMEDIUMTYPE 160 /* Wrong medium type */ +#undef TARGET_ENOKEY +#define TARGET_ENOKEY 161 /* Required key not available */ +#undef TARGET_EKEYEXPIRED +#define TARGET_EKEYEXPIRED 162 /* Key has expired */ +#undef TARGET_EKEYREVOKED +#define TARGET_EKEYREVOKED 163 /* Key has been revoked */ +#undef TARGET_EKEYREJECTED +#define TARGET_EKEYREJECTED 164 /* Key was rejected by service */ + +/* for robust mutexes */ +#undef TARGET_EOWNERDEAD +#define TARGET_EOWNERDEAD 165 /* Owner died */ +#undef TARGET_ENOTRECOVERABLE +#define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */ + +#undef TARGET_ERFKILL +#define TARGET_ERFKILL 167 +#undef TARGET_EHWPOISON +#define TARGET_EHWPOISON 168 + +#undef TARGET_EDQUOT +#define TARGET_EDQUOT 1133 /* Quota exceeded */ + #endif diff --git a/linux-user/mips/target_syscall.h b/linux-user/mips/target_syscall.h index 3e558fdb4b40..f59057493a35 100644 --- a/linux-user/mips/target_syscall.h +++ b/linux-user/mips/target_syscall.h @@ -20,217 +20,6 @@ struct target_pt_regs { abi_ulong cp0_epc; }; -/* Target errno definitions taken from asm-mips/errno.h */ -#undef TARGET_EWOULDBLOCK -#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ -#undef TARGET_ENOMSG -#define TARGET_ENOMSG 35 /* Identifier removed */ -#undef TARGET_EIDRM -#define TARGET_EIDRM 36 /* Identifier removed */ -#undef TARGET_ECHRNG -#define TARGET_ECHRNG 37 /* Channel number out of range */ -#undef TARGET_EL2NSYNC -#define TARGET_EL2NSYNC 38 /* Level 2 not synchronized */ -#undef TARGET_EL3HLT -#define TARGET_EL3HLT 39 /* Level 3 halted */ -#undef TARGET_EL3RST -#define TARGET_EL3RST 40 /* Level 3 reset */ -#undef TARGET_ELNRNG -#define TARGET_ELNRNG 41 /* Link number out of range */ -#undef TARGET_EUNATCH -#define TARGET_EUNATCH 42 /* Protocol driver not attached */ -#undef TARGET_ENOCSI -#define TARGET_ENOCSI 43 /* No CSI structure available */ -#undef TARGET_EL2HLT -#define TARGET_EL2HLT 44 /* Level 2 halted */ -#undef TARGET_EDEADLK -#define TARGET_EDEADLK 45 /* Resource deadlock would occur */ -#undef TARGET_ENOLCK -#define TARGET_ENOLCK 46 /* No record locks available */ -#undef TARGET_EBADE -#define TARGET_EBADE 50 /* Invalid exchange */ -#undef TARGET_EBADR -#define TARGET_EBADR 51 /* Invalid request descriptor */ -#undef TARGET_EXFULL -#define TARGET_EXFULL 52 /* TARGET_Exchange full */ -#undef TARGET_ENOANO -#define TARGET_ENOANO 53 /* No anode */ -#undef TARGET_EBADRQC -#define TARGET_EBADRQC 54 /* Invalid request code */ -#undef TARGET_EBADSLT -#define TARGET_EBADSLT 55 /* Invalid slot */ -#undef TARGET_EDEADLOCK -#define TARGET_EDEADLOCK 56 /* File locking deadlock error */ -#undef TARGET_EBFONT -#define TARGET_EBFONT 59 /* Bad font file format */ -#undef TARGET_ENOSTR -#define TARGET_ENOSTR 60 /* Device not a stream */ -#undef TARGET_ENODATA -#define TARGET_ENODATA 61 /* No data available */ -#undef TARGET_ETIME -#define TARGET_ETIME 62 /* Timer expired */ -#undef TARGET_ENOSR -#define TARGET_ENOSR 63 /* Out of streams resources */ -#undef TARGET_ENONET -#define TARGET_ENONET 64 /* Machine is not on the network */ -#undef TARGET_ENOPKG -#define TARGET_ENOPKG 65 /* Package not installed */ -#undef TARGET_EREMOTE -#define TARGET_EREMOTE 66 /* Object is remote */ -#undef TARGET_ENOLINK -#define TARGET_ENOLINK 67 /* Link has been severed */ -#undef TARGET_EADV -#define TARGET_EADV 68 /* Advertise error */ -#undef TARGET_ESRMNT -#define TARGET_ESRMNT 69 /* Srmount error */ -#undef TARGET_ECOMM -#define TARGET_ECOMM 70 /* Communication error on send */ -#undef TARGET_EPROTO -#define TARGET_EPROTO 71 /* Protocol error */ -#undef TARGET_EDOTDOT -#define TARGET_EDOTDOT 73 /* RFS specific error */ -#undef TARGET_EMULTIHOP -#define TARGET_EMULTIHOP 74 /* Multihop attempted */ -#undef TARGET_EBADMSG -#define TARGET_EBADMSG 77 /* Not a data message */ -#undef TARGET_ENAMETOOLONG -#define TARGET_ENAMETOOLONG 78 /* File name too long */ -#undef TARGET_EOVERFLOW -#define TARGET_EOVERFLOW 79 /* Value too large for defined data type */ -#undef TARGET_ENOTUNIQ -#define TARGET_ENOTUNIQ 80 /* Name not unique on network */ -#undef TARGET_EBADFD -#define TARGET_EBADFD 81 /* File descriptor in bad state */ -#undef TARGET_EREMCHG -#define TARGET_EREMCHG 82 /* Remote address changed */ -#undef TARGET_ELIBACC -#define TARGET_ELIBACC 83 /* Can not access a needed shared library */ -#undef TARGET_ELIBBAD -#define TARGET_ELIBBAD 84 /* Accessing a corrupted shared library */ -#undef TARGET_ELIBSCN -#define TARGET_ELIBSCN 85 /* .lib section in a.out corrupted */ -#undef TARGET_ELIBMAX -#define TARGET_ELIBMAX 86 /* Attempting to link in too many shared libraries */ -#undef TARGET_ELIBEXEC -#define TARGET_ELIBEXEC 87 /* Cannot exec a shared library directly */ -#undef TARGET_EILSEQ -#define TARGET_EILSEQ 88 /* Illegal byte sequence */ -#undef TARGET_ENOSYS -#define TARGET_ENOSYS 89 /* Function not implemented */ -#undef TARGET_ELOOP -#define TARGET_ELOOP 90 /* Too many symbolic links encountered */ -#undef TARGET_ERESTART -#define TARGET_ERESTART 91 /* Interrupted system call should be restarted */ -#undef TARGET_ESTRPIPE -#define TARGET_ESTRPIPE 92 /* Streams pipe error */ -#undef TARGET_ENOTEMPTY -#define TARGET_ENOTEMPTY 93 /* Directory not empty */ -#undef TARGET_EUSERS -#define TARGET_EUSERS 94 /* Too many users */ -#undef TARGET_ENOTSOCK -#define TARGET_ENOTSOCK 95 /* Socket operation on non-socket */ -#undef TARGET_EDESTADDRREQ -#define TARGET_EDESTADDRREQ 96 /* Destination address required */ -#undef TARGET_EMSGSIZE -#define TARGET_EMSGSIZE 97 /* Message too long */ -#undef TARGET_EPROTOTYPE -#define TARGET_EPROTOTYPE 98 /* Protocol wrong type for socket */ -#undef TARGET_ENOPROTOOPT -#define TARGET_ENOPROTOOPT 99 /* Protocol not available */ -#undef TARGET_EPROTONOSUPPORT -#define TARGET_EPROTONOSUPPORT 120 /* Protocol not supported */ -#undef TARGET_ESOCKTNOSUPPORT -#define TARGET_ESOCKTNOSUPPORT 121 /* Socket type not supported */ -#undef TARGET_EOPNOTSUPP -#define TARGET_EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ -#undef TARGET_EPFNOSUPPORT -#define TARGET_EPFNOSUPPORT 123 /* Protocol family not supported */ -#undef TARGET_EAFNOSUPPORT -#define TARGET_EAFNOSUPPORT 124 /* Address family not supported by protocol */ -#undef TARGET_EADDRINUSE -#define TARGET_EADDRINUSE 125 /* Address already in use */ -#undef TARGET_EADDRNOTAVAIL -#define TARGET_EADDRNOTAVAIL 126 /* Cannot assign requested address */ -#undef TARGET_ENETDOWN -#define TARGET_ENETDOWN 127 /* Network is down */ -#undef TARGET_ENETUNREACH -#define TARGET_ENETUNREACH 128 /* Network is unreachable */ -#undef TARGET_ENETRESET -#define TARGET_ENETRESET 129 /* Network dropped connection because of reset */ -#undef TARGET_ECONNABORTED -#define TARGET_ECONNABORTED 130 /* Software caused connection abort */ -#undef TARGET_ECONNRESET -#define TARGET_ECONNRESET 131 /* Connection reset by peer */ -#undef TARGET_ENOBUFS -#define TARGET_ENOBUFS 132 /* No buffer space available */ -#undef TARGET_EISCONN -#define TARGET_EISCONN 133 /* Transport endpoint is already connected */ -#undef TARGET_ENOTCONN -#define TARGET_ENOTCONN 134 /* Transport endpoint is not connected */ -#undef TARGET_EUCLEAN -#define TARGET_EUCLEAN 135 /* Structure needs cleaning */ -#undef TARGET_ENOTNAM -#define TARGET_ENOTNAM 137 /* Not a XENIX named type file */ -#undef TARGET_ENAVAIL -#define TARGET_ENAVAIL 138 /* No XENIX semaphores available */ -#undef TARGET_EISNAM -#define TARGET_EISNAM 139 /* Is a named type file */ -#undef TARGET_EREMOTEIO -#define TARGET_EREMOTEIO 140 /* Remote I/O error */ -#undef TARGET_EINIT -#define TARGET_EINIT 141 /* Reserved */ -#undef TARGET_EREMDEV -#define TARGET_EREMDEV 142 /* TARGET_Error 142 */ -#undef TARGET_ESHUTDOWN -#define TARGET_ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ -#undef TARGET_ETOOMANYREFS -#define TARGET_ETOOMANYREFS 144 /* Too many references: cannot splice */ -#undef TARGET_ETIMEDOUT -#define TARGET_ETIMEDOUT 145 /* Connection timed out */ -#undef TARGET_ECONNREFUSED -#define TARGET_ECONNREFUSED 146 /* Connection refused */ -#undef TARGET_EHOSTDOWN -#define TARGET_EHOSTDOWN 147 /* Host is down */ -#undef TARGET_EHOSTUNREACH -#define TARGET_EHOSTUNREACH 148 /* No route to host */ -#undef TARGET_EALREADY -#define TARGET_EALREADY 149 /* Operation already in progress */ -#undef TARGET_EINPROGRESS -#define TARGET_EINPROGRESS 150 /* Operation now in progress */ -#undef TARGET_ESTALE -#define TARGET_ESTALE 151 /* Stale NFS file handle */ -#undef TARGET_ECANCELED -#define TARGET_ECANCELED 158 /* AIO operation canceled */ -/* - * These error are Linux extensions. - */ -#undef TARGET_ENOMEDIUM -#define TARGET_ENOMEDIUM 159 /* No medium found */ -#undef TARGET_EMEDIUMTYPE -#define TARGET_EMEDIUMTYPE 160 /* Wrong medium type */ -#undef TARGET_ENOKEY -#define TARGET_ENOKEY 161 /* Required key not available */ -#undef TARGET_EKEYEXPIRED -#define TARGET_EKEYEXPIRED 162 /* Key has expired */ -#undef TARGET_EKEYREVOKED -#define TARGET_EKEYREVOKED 163 /* Key has been revoked */ -#undef TARGET_EKEYREJECTED -#define TARGET_EKEYREJECTED 164 /* Key was rejected by service */ - -/* for robust mutexes */ -#undef TARGET_EOWNERDEAD -#define TARGET_EOWNERDEAD 165 /* Owner died */ -#undef TARGET_ENOTRECOVERABLE -#define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */ - -#undef TARGET_ERFKILL -#define TARGET_ERFKILL 167 -#undef TARGET_EHWPOISON -#define TARGET_EHWPOISON 168 - -#undef TARGET_EDQUOT -#define TARGET_EDQUOT 1133 /* Quota exceeded */ - #define UNAME_MACHINE "mips" #define UNAME_MINIMUM_RELEASE "2.6.32" diff --git a/linux-user/mips64/target_errno_defs.h b/linux-user/mips64/target_errno_defs.h index 82b0a704f62c..fb7b4628a9b3 100644 --- a/linux-user/mips64/target_errno_defs.h +++ b/linux-user/mips64/target_errno_defs.h @@ -1,6 +1,10 @@ #ifndef MIPS64_TARGET_ERRNO_DEFS_H #define MIPS64_TARGET_ERRNO_DEFS_H -#include "../generic/target_errno_defs.h" +/* + * The mips64 target uses errno definitions taken from asm-mips/errno.h + * so directly use the mips target errno definitions. + */ +#include "../mips/target_errno_defs.h" #endif diff --git a/linux-user/mips64/target_syscall.h b/linux-user/mips64/target_syscall.h index c54374c5a295..cd1e1b496916 100644 --- a/linux-user/mips64/target_syscall.h +++ b/linux-user/mips64/target_syscall.h @@ -17,217 +17,6 @@ struct target_pt_regs { target_ulong cp0_epc; }; -/* Target errno definitions taken from asm-mips/errno.h */ -#undef TARGET_EWOULDBLOCK -#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ -#undef TARGET_ENOMSG -#define TARGET_ENOMSG 35 /* Identifier removed */ -#undef TARGET_EIDRM -#define TARGET_EIDRM 36 /* Identifier removed */ -#undef TARGET_ECHRNG -#define TARGET_ECHRNG 37 /* Channel number out of range */ -#undef TARGET_EL2NSYNC -#define TARGET_EL2NSYNC 38 /* Level 2 not synchronized */ -#undef TARGET_EL3HLT -#define TARGET_EL3HLT 39 /* Level 3 halted */ -#undef TARGET_EL3RST -#define TARGET_EL3RST 40 /* Level 3 reset */ -#undef TARGET_ELNRNG -#define TARGET_ELNRNG 41 /* Link number out of range */ -#undef TARGET_EUNATCH -#define TARGET_EUNATCH 42 /* Protocol driver not attached */ -#undef TARGET_ENOCSI -#define TARGET_ENOCSI 43 /* No CSI structure available */ -#undef TARGET_EL2HLT -#define TARGET_EL2HLT 44 /* Level 2 halted */ -#undef TARGET_EDEADLK -#define TARGET_EDEADLK 45 /* Resource deadlock would occur */ -#undef TARGET_ENOLCK -#define TARGET_ENOLCK 46 /* No record locks available */ -#undef TARGET_EBADE -#define TARGET_EBADE 50 /* Invalid exchange */ -#undef TARGET_EBADR -#define TARGET_EBADR 51 /* Invalid request descriptor */ -#undef TARGET_EXFULL -#define TARGET_EXFULL 52 /* TARGET_Exchange full */ -#undef TARGET_ENOANO -#define TARGET_ENOANO 53 /* No anode */ -#undef TARGET_EBADRQC -#define TARGET_EBADRQC 54 /* Invalid request code */ -#undef TARGET_EBADSLT -#define TARGET_EBADSLT 55 /* Invalid slot */ -#undef TARGET_EDEADLOCK -#define TARGET_EDEADLOCK 56 /* File locking deadlock error */ -#undef TARGET_EBFONT -#define TARGET_EBFONT 59 /* Bad font file format */ -#undef TARGET_ENOSTR -#define TARGET_ENOSTR 60 /* Device not a stream */ -#undef TARGET_ENODATA -#define TARGET_ENODATA 61 /* No data available */ -#undef TARGET_ETIME -#define TARGET_ETIME 62 /* Timer expired */ -#undef TARGET_ENOSR -#define TARGET_ENOSR 63 /* Out of streams resources */ -#undef TARGET_ENONET -#define TARGET_ENONET 64 /* Machine is not on the network */ -#undef TARGET_ENOPKG -#define TARGET_ENOPKG 65 /* Package not installed */ -#undef TARGET_EREMOTE -#define TARGET_EREMOTE 66 /* Object is remote */ -#undef TARGET_ENOLINK -#define TARGET_ENOLINK 67 /* Link has been severed */ -#undef TARGET_EADV -#define TARGET_EADV 68 /* Advertise error */ -#undef TARGET_ESRMNT -#define TARGET_ESRMNT 69 /* Srmount error */ -#undef TARGET_ECOMM -#define TARGET_ECOMM 70 /* Communication error on send */ -#undef TARGET_EPROTO -#define TARGET_EPROTO 71 /* Protocol error */ -#undef TARGET_EDOTDOT -#define TARGET_EDOTDOT 73 /* RFS specific error */ -#undef TARGET_EMULTIHOP -#define TARGET_EMULTIHOP 74 /* Multihop attempted */ -#undef TARGET_EBADMSG -#define TARGET_EBADMSG 77 /* Not a data message */ -#undef TARGET_ENAMETOOLONG -#define TARGET_ENAMETOOLONG 78 /* File name too long */ -#undef TARGET_EOVERFLOW -#define TARGET_EOVERFLOW 79 /* Value too large for defined data type */ -#undef TARGET_ENOTUNIQ -#define TARGET_ENOTUNIQ 80 /* Name not unique on network */ -#undef TARGET_EBADFD -#define TARGET_EBADFD 81 /* File descriptor in bad state */ -#undef TARGET_EREMCHG -#define TARGET_EREMCHG 82 /* Remote address changed */ -#undef TARGET_ELIBACC -#define TARGET_ELIBACC 83 /* Can not access a needed shared library */ -#undef TARGET_ELIBBAD -#define TARGET_ELIBBAD 84 /* Accessing a corrupted shared library */ -#undef TARGET_ELIBSCN -#define TARGET_ELIBSCN 85 /* .lib section in a.out corrupted */ -#undef TARGET_ELIBMAX -#define TARGET_ELIBMAX 86 /* Attempting to link in too many shared libraries */ -#undef TARGET_ELIBEXEC -#define TARGET_ELIBEXEC 87 /* Cannot exec a shared library directly */ -#undef TARGET_EILSEQ -#define TARGET_EILSEQ 88 /* Illegal byte sequence */ -#undef TARGET_ENOSYS -#define TARGET_ENOSYS 89 /* Function not implemented */ -#undef TARGET_ELOOP -#define TARGET_ELOOP 90 /* Too many symbolic links encountered */ -#undef TARGET_ERESTART -#define TARGET_ERESTART 91 /* Interrupted system call should be restarted */ -#undef TARGET_ESTRPIPE -#define TARGET_ESTRPIPE 92 /* Streams pipe error */ -#undef TARGET_ENOTEMPTY -#define TARGET_ENOTEMPTY 93 /* Directory not empty */ -#undef TARGET_EUSERS -#define TARGET_EUSERS 94 /* Too many users */ -#undef TARGET_ENOTSOCK -#define TARGET_ENOTSOCK 95 /* Socket operation on non-socket */ -#undef TARGET_EDESTADDRREQ -#define TARGET_EDESTADDRREQ 96 /* Destination address required */ -#undef TARGET_EMSGSIZE -#define TARGET_EMSGSIZE 97 /* Message too long */ -#undef TARGET_EPROTOTYPE -#define TARGET_EPROTOTYPE 98 /* Protocol wrong type for socket */ -#undef TARGET_ENOPROTOOPT -#define TARGET_ENOPROTOOPT 99 /* Protocol not available */ -#undef TARGET_EPROTONOSUPPORT -#define TARGET_EPROTONOSUPPORT 120 /* Protocol not supported */ -#undef TARGET_ESOCKTNOSUPPORT -#define TARGET_ESOCKTNOSUPPORT 121 /* Socket type not supported */ -#undef TARGET_EOPNOTSUPP -#define TARGET_EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ -#undef TARGET_EPFNOSUPPORT -#define TARGET_EPFNOSUPPORT 123 /* Protocol family not supported */ -#undef TARGET_EAFNOSUPPORT -#define TARGET_EAFNOSUPPORT 124 /* Address family not supported by protocol */ -#undef TARGET_EADDRINUSE -#define TARGET_EADDRINUSE 125 /* Address already in use */ -#undef TARGET_EADDRNOTAVAIL -#define TARGET_EADDRNOTAVAIL 126 /* Cannot assign requested address */ -#undef TARGET_ENETDOWN -#define TARGET_ENETDOWN 127 /* Network is down */ -#undef TARGET_ENETUNREACH -#define TARGET_ENETUNREACH 128 /* Network is unreachable */ -#undef TARGET_ENETRESET -#define TARGET_ENETRESET 129 /* Network dropped connection because of reset */ -#undef TARGET_ECONNABORTED -#define TARGET_ECONNABORTED 130 /* Software caused connection abort */ -#undef TARGET_ECONNRESET -#define TARGET_ECONNRESET 131 /* Connection reset by peer */ -#undef TARGET_ENOBUFS -#define TARGET_ENOBUFS 132 /* No buffer space available */ -#undef TARGET_EISCONN -#define TARGET_EISCONN 133 /* Transport endpoint is already connected */ -#undef TARGET_ENOTCONN -#define TARGET_ENOTCONN 134 /* Transport endpoint is not connected */ -#undef TARGET_EUCLEAN -#define TARGET_EUCLEAN 135 /* Structure needs cleaning */ -#undef TARGET_ENOTNAM -#define TARGET_ENOTNAM 137 /* Not a XENIX named type file */ -#undef TARGET_ENAVAIL -#define TARGET_ENAVAIL 138 /* No XENIX semaphores available */ -#undef TARGET_EISNAM -#define TARGET_EISNAM 139 /* Is a named type file */ -#undef TARGET_EREMOTEIO -#define TARGET_EREMOTEIO 140 /* Remote I/O error */ -#undef TARGET_EINIT -#define TARGET_EINIT 141 /* Reserved */ -#undef TARGET_EREMDEV -#define TARGET_EREMDEV 142 /* TARGET_Error 142 */ -#undef TARGET_ESHUTDOWN -#define TARGET_ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ -#undef TARGET_ETOOMANYREFS -#define TARGET_ETOOMANYREFS 144 /* Too many references: cannot splice */ -#undef TARGET_ETIMEDOUT -#define TARGET_ETIMEDOUT 145 /* Connection timed out */ -#undef TARGET_ECONNREFUSED -#define TARGET_ECONNREFUSED 146 /* Connection refused */ -#undef TARGET_EHOSTDOWN -#define TARGET_EHOSTDOWN 147 /* Host is down */ -#undef TARGET_EHOSTUNREACH -#define TARGET_EHOSTUNREACH 148 /* No route to host */ -#undef TARGET_EALREADY -#define TARGET_EALREADY 149 /* Operation already in progress */ -#undef TARGET_EINPROGRESS -#define TARGET_EINPROGRESS 150 /* Operation now in progress */ -#undef TARGET_ESTALE -#define TARGET_ESTALE 151 /* Stale NFS file handle */ -#undef TARGET_ECANCELED -#define TARGET_ECANCELED 158 /* AIO operation canceled */ -/* - * These error are Linux extensions. - */ -#undef TARGET_ENOMEDIUM -#define TARGET_ENOMEDIUM 159 /* No medium found */ -#undef TARGET_EMEDIUMTYPE -#define TARGET_EMEDIUMTYPE 160 /* Wrong medium type */ -#undef TARGET_ENOKEY -#define TARGET_ENOKEY 161 /* Required key not available */ -#undef TARGET_EKEYEXPIRED -#define TARGET_EKEYEXPIRED 162 /* Key has expired */ -#undef TARGET_EKEYREVOKED -#define TARGET_EKEYREVOKED 163 /* Key has been revoked */ -#undef TARGET_EKEYREJECTED -#define TARGET_EKEYREJECTED 164 /* Key was rejected by service */ - -/* for robust mutexes */ -#undef TARGET_EOWNERDEAD -#define TARGET_EOWNERDEAD 165 /* Owner died */ -#undef TARGET_ENOTRECOVERABLE -#define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */ - -#undef TARGET_ERFKILL -#define TARGET_ERFKILL 167 -#undef TARGET_EHWPOISON -#define TARGET_EHWPOISON 168 - -#undef TARGET_EDQUOT -#define TARGET_EDQUOT 1133 /* Quota exceeded */ - #define UNAME_MACHINE "mips64" #define UNAME_MINIMUM_RELEASE "2.6.32" From patchwork Tue Jul 13 13:41:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1504662 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPN2N0yjDz9sWl for ; Wed, 14 Jul 2021 00:15:24 +1000 (AEST) Received: from localhost ([::1]:53080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3JBx-0001Bd-Il for incoming@patchwork.ozlabs.org; Tue, 13 Jul 2021 10:15:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifu-0000a5-D3 for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:14 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:47929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifp-0006DH-4L for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:11 -0400 Received: from quad ([82.142.17.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MJW5G-1ljYti2yl6-00JomH; Tue, 13 Jul 2021 15:41:59 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 07/12] linux-user: Simplify host <-> target errno conversion using macros Date: Tue, 13 Jul 2021 15:41:47 +0200 Message-Id: <20210713134152.288423-8-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713134152.288423-1-laurent@vivier.eu> References: <20210713134152.288423-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:Ej8Q/YiFxiejtXD7fy9+561On7LtHz8CIlqS3LfFS4UiXgPoKCf YBqvZLNg2QI7IcP4vDU1OFBUM0hopLBXMuAZFBc2oqJ/+CNr6Cmdwb1Q8uxgnwVT/mQNeqI XCOHLqs8D89n0qtjMGxDKSrAO0o9eQU8e8+BtoUFLgWQS/p2bnhC5XWlwF9AZgDHFTHdhM1 7+riuXBCXULXYHAUKDwIw== X-UI-Out-Filterresults: notjunk:1;V03:K0:OaxS6sq4GqU=:kPBdlot7HsB35YFs3wjyEg xLHkTXlLDHncPlTPjx9F2Rr0SGoTLFa3lRtkaJwA0YDYWKwFEuIS1uM05Xh6TjCzzkBT90STl oZEp2DWwTgzUj5R6cU8qpite+ow0CL/CKKnaxn+PHG4klOYALEin1cYMipSt4K2cjlNxOyai0 k3fyuxDlIZTekd8Jox7YbYkH6MxfHNhH+gQ1PAsFWii45TGfjrxW9M2JtszX2WC6nOA5W3BOm vTWoiicQVI8I+SmwHqf05foHDaY7HQlPrr1wcAIvdBGwl/f1lg2nBbZxfED7fKomTLAjYpn/P sw33hnK2qW6fPl7i3OZQ9tztaBm/ah5p8M1EBkZORSczE3WdsW2m6n0rb9wk67rOSESOTZ7hN 0jzNfzsoB1137Mc062U6dKaiTYD4sAUYsH1nquHhiwSnHdUcYaJvk8cl08nmmFMompDvWnzar uYp56FwunWTC7Sdfl7bLsoaJ6vUbf7O1J6/I3HM6z3rGIvUtk2qx7ruXUPE+DDDvkpuoiQfsE C6g37RCLnfhWtWabo0+wx25sQ7mKbjZthVcvw1MrQnhsDD5ua1ZVQkjJAOJ8Xvxa0eIf+misB QDufIRxNcZLEhQQSs+7nENiN+yOkJcnapy4XAxexs/iU4qWgAZ2Cfc5Dyw5O7zi9/U3SFj+ZZ sAUhII13UZboTEbev/bjWd02xjh610f5n5WZUS1D78lhbGmKb5wzGmFpZm7Hdt30tK5m8dl7B Klnk4/uqlj2DlEQREHBllIkCIJjq3HgEgZR+H+R9jO+ItBH99ZXRK6TJz7HdfTvaptF+a3AC8 CugRPAq5bc1UYqE6aIJnojlpM2ZUa0yom0CCRNDhj2MXjVWiWzuxBP8CghyizdHyfql6gg9 Received-SPF: none client-ip=212.227.17.13; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, UPPERCASE_50_75=0.008 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Convert the host_to_target_errno_table[] array to a switch case to allow compiler optimizations (such noticing the identity function when host and guest errnos match). Extract the errnos list as to a new includible unit, using a generic macro. Remove the code related to target_to_host_errno_table[] initialization. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20210708170550.1846343-8-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- linux-user/errnos.c.inc | 140 +++++++++++++++++++++++++++++++++++ linux-user/syscall.c | 159 ++++------------------------------------ 2 files changed, 154 insertions(+), 145 deletions(-) create mode 100644 linux-user/errnos.c.inc diff --git a/linux-user/errnos.c.inc b/linux-user/errnos.c.inc new file mode 100644 index 000000000000..963ba1ce9d11 --- /dev/null +++ b/linux-user/errnos.c.inc @@ -0,0 +1,140 @@ +/* + * This list is the union of errno values overridden in asm-/errno.h + * minus the errnos that are not actually generic to all archs. + * + * Please keep this list sorted alphabetically. + * + * Copyright (c) 2003 Fabrice Bellard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +E(EADDRINUSE) +E(EADDRNOTAVAIL) +E(EADV) +E(EAFNOSUPPORT) +E(EAGAIN) +E(EALREADY) +E(EBADE) +E(EBADFD) +E(EBADMSG) +E(EBADR) +E(EBADRQC) +E(EBADSLT) +E(EBFONT) +E(ECANCELED) +E(ECHRNG) +E(ECOMM) +E(ECONNABORTED) +E(ECONNREFUSED) +E(ECONNRESET) +E(EDEADLK) +E(EDESTADDRREQ) +E(EDOTDOT) +E(EDQUOT) +E(EHOSTDOWN) +E(EHOSTUNREACH) +#ifdef EHWPOISON +E(EHWPOISON) +#endif +E(EIDRM) +E(EILSEQ) +E(EINPROGRESS) +E(EISCONN) +E(EISNAM) +#ifdef EKEYEXPIRED +E(EKEYEXPIRED) +#endif +#ifdef EKEYREJECTED +E(EKEYREJECTED) +#endif +#ifdef EKEYREVOKED +E(EKEYREVOKED) +#endif +E(EL2HLT) +E(EL2NSYNC) +E(EL3HLT) +E(EL3RST) +E(ELIBACC) +E(ELIBBAD) +E(ELIBEXEC) +E(ELIBMAX) +E(ELIBSCN) +E(ELNRNG) +E(ELOOP) +E(EMEDIUMTYPE) +E(EMSGSIZE) +E(EMULTIHOP) +E(ENAMETOOLONG) +E(ENAVAIL) +E(ENETDOWN) +E(ENETRESET) +E(ENETUNREACH) +E(ENOANO) +E(ENOBUFS) +E(ENOCSI) +E(ENODATA) +#ifdef ENOKEY +E(ENOKEY) +#endif +E(ENOLCK) +E(ENOLINK) +E(ENOMEDIUM) +#ifdef ENOMSG +E(ENOMSG) +#endif +E(ENONET) +E(ENOPKG) +E(ENOPROTOOPT) +E(ENOSR) +E(ENOSTR) +E(ENOSYS) +E(ENOTCONN) +E(ENOTEMPTY) +E(ENOTNAM) +#ifdef ENOTRECOVERABLE +E(ENOTRECOVERABLE) +#endif +E(ENOTSOCK) +E(ENOTUNIQ) +E(EOPNOTSUPP) +E(EOVERFLOW) +#ifdef EOWNERDEAD +E(EOWNERDEAD) +#endif +E(EPFNOSUPPORT) +E(EPROTO) +E(EPROTONOSUPPORT) +E(EPROTOTYPE) +E(EREMCHG) +E(EREMOTE) +E(EREMOTEIO) +E(ERESTART) +#ifdef ERFKILL +E(ERFKILL) +#endif +E(ESHUTDOWN) +E(ESOCKTNOSUPPORT) +E(ESRMNT) +E(ESTALE) +E(ESTRPIPE) +E(ETIME) +E(ETIMEDOUT) +E(ETOOMANYREFS) +E(EUCLEAN) +E(EUNATCH) +E(EUSERS) +E(EXFULL) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 4842a1987b79..94ec6f730b3f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -509,150 +509,26 @@ static inline int next_free_host_timer(void) #define ERRNO_TABLE_SIZE 1200 -/* target_to_host_errno_table[] is initialized from - * host_to_target_errno_table[] in syscall_init(). */ -static uint16_t target_to_host_errno_table[ERRNO_TABLE_SIZE] = { -}; - -/* - * This list is the union of errno values overridden in asm-/errno.h - * minus the errnos that are not actually generic to all archs. - */ -static uint16_t host_to_target_errno_table[ERRNO_TABLE_SIZE] = { - [EAGAIN] = TARGET_EAGAIN, - [EIDRM] = TARGET_EIDRM, - [ECHRNG] = TARGET_ECHRNG, - [EL2NSYNC] = TARGET_EL2NSYNC, - [EL3HLT] = TARGET_EL3HLT, - [EL3RST] = TARGET_EL3RST, - [ELNRNG] = TARGET_ELNRNG, - [EUNATCH] = TARGET_EUNATCH, - [ENOCSI] = TARGET_ENOCSI, - [EL2HLT] = TARGET_EL2HLT, - [EDEADLK] = TARGET_EDEADLK, - [ENOLCK] = TARGET_ENOLCK, - [EBADE] = TARGET_EBADE, - [EBADR] = TARGET_EBADR, - [EXFULL] = TARGET_EXFULL, - [ENOANO] = TARGET_ENOANO, - [EBADRQC] = TARGET_EBADRQC, - [EBADSLT] = TARGET_EBADSLT, - [EBFONT] = TARGET_EBFONT, - [ENOSTR] = TARGET_ENOSTR, - [ENODATA] = TARGET_ENODATA, - [ETIME] = TARGET_ETIME, - [ENOSR] = TARGET_ENOSR, - [ENONET] = TARGET_ENONET, - [ENOPKG] = TARGET_ENOPKG, - [EREMOTE] = TARGET_EREMOTE, - [ENOLINK] = TARGET_ENOLINK, - [EADV] = TARGET_EADV, - [ESRMNT] = TARGET_ESRMNT, - [ECOMM] = TARGET_ECOMM, - [EPROTO] = TARGET_EPROTO, - [EDOTDOT] = TARGET_EDOTDOT, - [EMULTIHOP] = TARGET_EMULTIHOP, - [EBADMSG] = TARGET_EBADMSG, - [ENAMETOOLONG] = TARGET_ENAMETOOLONG, - [EOVERFLOW] = TARGET_EOVERFLOW, - [ENOTUNIQ] = TARGET_ENOTUNIQ, - [EBADFD] = TARGET_EBADFD, - [EREMCHG] = TARGET_EREMCHG, - [ELIBACC] = TARGET_ELIBACC, - [ELIBBAD] = TARGET_ELIBBAD, - [ELIBSCN] = TARGET_ELIBSCN, - [ELIBMAX] = TARGET_ELIBMAX, - [ELIBEXEC] = TARGET_ELIBEXEC, - [EILSEQ] = TARGET_EILSEQ, - [ENOSYS] = TARGET_ENOSYS, - [ELOOP] = TARGET_ELOOP, - [ERESTART] = TARGET_ERESTART, - [ESTRPIPE] = TARGET_ESTRPIPE, - [ENOTEMPTY] = TARGET_ENOTEMPTY, - [EUSERS] = TARGET_EUSERS, - [ENOTSOCK] = TARGET_ENOTSOCK, - [EDESTADDRREQ] = TARGET_EDESTADDRREQ, - [EMSGSIZE] = TARGET_EMSGSIZE, - [EPROTOTYPE] = TARGET_EPROTOTYPE, - [ENOPROTOOPT] = TARGET_ENOPROTOOPT, - [EPROTONOSUPPORT] = TARGET_EPROTONOSUPPORT, - [ESOCKTNOSUPPORT] = TARGET_ESOCKTNOSUPPORT, - [EOPNOTSUPP] = TARGET_EOPNOTSUPP, - [EPFNOSUPPORT] = TARGET_EPFNOSUPPORT, - [EAFNOSUPPORT] = TARGET_EAFNOSUPPORT, - [EADDRINUSE] = TARGET_EADDRINUSE, - [EADDRNOTAVAIL] = TARGET_EADDRNOTAVAIL, - [ENETDOWN] = TARGET_ENETDOWN, - [ENETUNREACH] = TARGET_ENETUNREACH, - [ENETRESET] = TARGET_ENETRESET, - [ECONNABORTED] = TARGET_ECONNABORTED, - [ECONNRESET] = TARGET_ECONNRESET, - [ENOBUFS] = TARGET_ENOBUFS, - [EISCONN] = TARGET_EISCONN, - [ENOTCONN] = TARGET_ENOTCONN, - [EUCLEAN] = TARGET_EUCLEAN, - [ENOTNAM] = TARGET_ENOTNAM, - [ENAVAIL] = TARGET_ENAVAIL, - [EISNAM] = TARGET_EISNAM, - [EREMOTEIO] = TARGET_EREMOTEIO, - [EDQUOT] = TARGET_EDQUOT, - [ESHUTDOWN] = TARGET_ESHUTDOWN, - [ETOOMANYREFS] = TARGET_ETOOMANYREFS, - [ETIMEDOUT] = TARGET_ETIMEDOUT, - [ECONNREFUSED] = TARGET_ECONNREFUSED, - [EHOSTDOWN] = TARGET_EHOSTDOWN, - [EHOSTUNREACH] = TARGET_EHOSTUNREACH, - [EALREADY] = TARGET_EALREADY, - [EINPROGRESS] = TARGET_EINPROGRESS, - [ESTALE] = TARGET_ESTALE, - [ECANCELED] = TARGET_ECANCELED, - [ENOMEDIUM] = TARGET_ENOMEDIUM, - [EMEDIUMTYPE] = TARGET_EMEDIUMTYPE, -#ifdef ENOKEY - [ENOKEY] = TARGET_ENOKEY, -#endif -#ifdef EKEYEXPIRED - [EKEYEXPIRED] = TARGET_EKEYEXPIRED, -#endif -#ifdef EKEYREVOKED - [EKEYREVOKED] = TARGET_EKEYREVOKED, -#endif -#ifdef EKEYREJECTED - [EKEYREJECTED] = TARGET_EKEYREJECTED, -#endif -#ifdef EOWNERDEAD - [EOWNERDEAD] = TARGET_EOWNERDEAD, -#endif -#ifdef ENOTRECOVERABLE - [ENOTRECOVERABLE] = TARGET_ENOTRECOVERABLE, -#endif -#ifdef ENOMSG - [ENOMSG] = TARGET_ENOMSG, -#endif -#ifdef ERFKILL - [ERFKILL] = TARGET_ERFKILL, -#endif -#ifdef EHWPOISON - [EHWPOISON] = TARGET_EHWPOISON, -#endif -}; - -static inline int host_to_target_errno(int err) +static inline int host_to_target_errno(int host_errno) { - if (err >= 0 && err < ERRNO_TABLE_SIZE && - host_to_target_errno_table[err]) { - return host_to_target_errno_table[err]; + switch (host_errno) { +#define E(X) case X: return TARGET_##X; +#include "errnos.c.inc" +#undef E + default: + return host_errno; } - return err; } -static inline int target_to_host_errno(int err) +static inline int target_to_host_errno(int target_errno) { - if (err >= 0 && err < ERRNO_TABLE_SIZE && - target_to_host_errno_table[err]) { - return target_to_host_errno_table[err]; + switch (target_errno) { +#define E(X) case TARGET_##X: return X; +#include "errnos.c.inc" +#undef E + default: + return target_errno; } - return err; } static inline abi_long get_errno(abi_long ret) @@ -7102,7 +6978,6 @@ void syscall_init(void) IOCTLEntry *ie; const argtype *arg_type; int size; - int i; thunk_init(STRUCT_MAX); @@ -7112,12 +6987,6 @@ void syscall_init(void) #undef STRUCT #undef STRUCT_SPECIAL - /* Build target_to_host_errno_table[] table from - * host_to_target_errno_table[]. */ - for (i = 0; i < ERRNO_TABLE_SIZE; i++) { - target_to_host_errno_table[host_to_target_errno_table[i]] = i; - } - /* we patch the ioctl size if necessary. We rely on the fact that no ioctl has all the bits at '1' in the size field */ ie = ioctl_entries; From patchwork Tue Jul 13 13:41:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1504667 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPN5x3lFcz9sWd for ; Wed, 14 Jul 2021 00:18:29 +1000 (AEST) Received: from localhost ([::1]:36282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3JEx-0000NX-86 for incoming@patchwork.ozlabs.org; Tue, 13 Jul 2021 10:18:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifu-0000a4-C7 for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:14 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:56965) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifo-0006Cp-Vc for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:10 -0400 Received: from quad ([82.142.17.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M8hEd-1m7PPS1Kz3-004ksC; Tue, 13 Jul 2021 15:41:59 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 08/12] linux-user/syscall: Remove ERRNO_TABLE_SIZE check Date: Tue, 13 Jul 2021 15:41:48 +0200 Message-Id: <20210713134152.288423-9-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713134152.288423-1-laurent@vivier.eu> References: <20210713134152.288423-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:kCSWo2qBWccEQtM77bnB63g1WgctXkQa5HhTmKnGKFPaKQ/Z0M6 IhxG50U5o62nGeFQKM8ONZ7WYhDghsKe+M1PMQmpiWnn1hf3dTvg8RkNoXiUfw5bvCo7cfO m6i1q+12L5W9Y+iwnwzalHq6YDv3b94Jhlk2XRZSxFr1gDXJaoeaRhdg1xd4ke/X7Fp1ONF FEoB1p28NNeeT/GMhprAA== X-UI-Out-Filterresults: notjunk:1;V03:K0:m052WbsLj20=:TnrIIq2vL8Os6za+JImb6G tGhLWfIMfxLEyhcFD8/gK2QztkupnmgOCYcGYgUfILg+e4j++6QRVuz9V8s3NSvXd/W80zSNN yW83Ox1aIL0huE894KKaxwMmOVRKb+WBAsfKnTlOEebVjCSVHftKr3rOOzZi/XaI7CFt/00aa 0lEX9oBJMwaatJE7LQNEQRSCMxO8vmGgjArY2GN/pEgZC3+Mz8aySzelASglehAptHB3S/sGm dZTyfE0/QhwKQdDdBTo4pmmIK+KcQ0ugAKOHrjFUFylItFeGXLyQ+EwQNgPu7/j2Xz1LKfEu7 gLegmg/Dw/IfO3SZLVFY1QBhcqd46qqFf0btB96pPcvJY0UjHNYUHkRY0gRbdP41Iaq+v34tC xyKX1R9OpiL9aIc91OErVoKQj4MBk7h7h9O6Si8XAPt9VwmCtndEk3cJVhGkWU+zBEpAOZfzL aMvzPzhTFKnPJ2oOMlgWsdb4Z1KPodoXE5aGSR54cGDKC4XMhBh8UAaSqqKypEfFib0kTDtLS bUdyKpyPzAbBmF9QMQU5rRb320N4KsAjrP9/EmRbNjGF7P584CxfaM9wKnPhD/Xm1P1jkIh1/ NWCaQ7b2XW38HyfxKSc7UUIeRODyIMjZ6wRUuzHOyWl4N4FqBEbSjAvtNQ9UgDmjBRBQKVJim 6xE9IRJce7dlRLP691kdZYIKm7ge0cw87mTjucRSnuBWuCRT90ApAtZ/L0ZUJcQ6l2k89FcZd LnWvLIJOve6bVc1V3SdQVq/B7xDD+OViwEysS1KvpJPtA0enChcR7SJtoOS+LeBsFcO1AGhmB YovWO0OTZ9Skk30t/pwfJVS2JlcQZEt7feZsKzs+cgXAYBHoTYRG7dXYmek+1jZU+pcbbt6 Received-SPF: none client-ip=212.227.17.10; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Now than target_to_host_errno() always return an errno, we can remove the unused and arbitrary ERRNO_TABLE_SIZE definition. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20210708170550.1846343-9-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 94ec6f730b3f..376629c68915 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -507,8 +507,6 @@ static inline int next_free_host_timer(void) } #endif -#define ERRNO_TABLE_SIZE 1200 - static inline int host_to_target_errno(int host_errno) { switch (host_errno) { @@ -548,9 +546,6 @@ const char *target_strerror(int err) return "Successful exit from sigreturn"; } - if ((err >= ERRNO_TABLE_SIZE) || (err < 0)) { - return NULL; - } return strerror(target_to_host_errno(err)); } From patchwork Tue Jul 13 13:41:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1504657 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPMwn47mlz9sWd for ; Wed, 14 Jul 2021 00:10:33 +1000 (AEST) Received: from localhost ([::1]:38926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3J7H-000096-9a for incoming@patchwork.ozlabs.org; Tue, 13 Jul 2021 10:10:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifk-0000CE-TY for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:05 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:52511) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifi-00066W-SE for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:04 -0400 Received: from quad ([82.142.17.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Miqzy-1lXFi733m0-00euyL; Tue, 13 Jul 2021 15:41:59 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 09/12] fd-trans: Fix race condition on reallocation of the translation table. Date: Tue, 13 Jul 2021 15:41:49 +0200 Message-Id: <20210713134152.288423-10-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713134152.288423-1-laurent@vivier.eu> References: <20210713134152.288423-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:rQUx2TeaU63sRiprdz7nfJf3PMXktjWGKkp7ymBTmBTI+vgQson yWrE3iuZy9W3DHi3UMKWz/MlBvr0KhE+zIypZdzhd9lqF4oWtPeeAVKJ4LA+FRILiB8ZC0d NxFLMc4Tm/K/maTN3yDS45bIuhvK3SojRg4sPqtFfvGOmIxUJCzTMZRYCofjm+KsNA4z0/G 3CRvnrY2gsp6W+snMCYhg== X-UI-Out-Filterresults: notjunk:1;V03:K0:588x8dZ/+j8=:GIFqVy0R+Byu7NpWSB3mDx uLS3A8mpmsWbX5gKEtMTW7i1CeHgvyF7fI9PtPy7U1yuYXYBWgiX098+kXUtV5oP02jEYbhXk 2B9NsA8A2S6koMDQkfD5XFUlQmZiQGxR6eb7XS10XXJIil3EipqZIB/SPTtl4hqJwu0SP46Ag 57PQ0Iq9fAmEFluJKTGLkTZYQj8IGsbHvxfxA7vtW8VF/81QQ9Ped/p1Qb6MVJB08FcY09f+I bqzSBNktfM7DMjMKN9/Y85L+bqnqDAN8ekMkTGlMKcg5BBtMpUc2Ch87XprldsmyiuAVD05aK iB12vLoFrMVT6QgMDP0zYxWIZEqkZ4ZxjISp4D1N5KJp/9sWpubEPyZufoogt5t0jzyqWl3AU POGY2lMeYNhPxH5x/2duJO9aZTOYDTqJZYvYNyx+ecmUO6/Bcke3K8rh2WaEsEWMfX3QToxe/ xN7ggM3kxKw106gyJCfyWYdjilCPOa7IVTHUwDCJuCIeS+htPrs3Nj8HKGPXOIlMa2pKlOiXD Fu82PcZrY02LSi/g0gL7EFaAisPq0Tacb5oWr4YU3ubus89QGIVczJxMHStWbAzPAH7Z81M3k DlbQ+KJVyMiv3XzfT+zrbDm7M3DfwHZJwfyyDmFiOFAG4PZAdCueCgdJM0Pdr/dWKdP5TQlq7 ElVl1AsyNwE+0T/C7W8+PrIx5owFUruyXnEcVA5uHryqGDaF+NfbDQYtpqh8sirerXEvtMb+T iWI1J8pisLrIp0pfkzua3zluwW1NrQvxGyCj+xqM62MsR46+uhzoxKIEIzsCUF+opOBaLK46V rRaOHSu+PxJLJdr5kxwzQD6TYNNu82oQJPziz2zTPYtX40IuYNki9woog9bmJL2x6Lroq6J Received-SPF: none client-ip=217.72.192.73; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Owen Anderson , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Owen Anderson The mapping from file-descriptors to translator functions is not guarded on realloc which may cause invalid function pointers to be read from a previously deallocated mapping. Signed-off-by: Owen Anderson Reviewed-by: Laurent Vivier Message-Id: <20210701221255.107976-1-oanderso@google.com> Signed-off-by: Laurent Vivier --- linux-user/fd-trans.c | 1 + linux-user/fd-trans.h | 55 +++++++++++++++++++++++++++++++++++++------ linux-user/main.c | 3 +++ 3 files changed, 52 insertions(+), 7 deletions(-) diff --git a/linux-user/fd-trans.c b/linux-user/fd-trans.c index 23adaca83639..86b6f484d30b 100644 --- a/linux-user/fd-trans.c +++ b/linux-user/fd-trans.c @@ -267,6 +267,7 @@ enum { }; TargetFdTrans **target_fd_trans; +QemuMutex target_fd_trans_lock; unsigned int target_fd_max; static void tswap_nlmsghdr(struct nlmsghdr *nlh) diff --git a/linux-user/fd-trans.h b/linux-user/fd-trans.h index a3fcdaabc758..1b9fa2041c06 100644 --- a/linux-user/fd-trans.h +++ b/linux-user/fd-trans.h @@ -16,6 +16,8 @@ #ifndef FD_TRANS_H #define FD_TRANS_H +#include "qemu/lockable.h" + typedef abi_long (*TargetFdDataFunc)(void *, size_t); typedef abi_long (*TargetFdAddrFunc)(void *, abi_ulong, socklen_t); typedef struct TargetFdTrans { @@ -25,12 +27,23 @@ typedef struct TargetFdTrans { } TargetFdTrans; extern TargetFdTrans **target_fd_trans; +extern QemuMutex target_fd_trans_lock; extern unsigned int target_fd_max; +static inline void fd_trans_init(void) +{ + qemu_mutex_init(&target_fd_trans_lock); +} + static inline TargetFdDataFunc fd_trans_target_to_host_data(int fd) { - if (fd >= 0 && fd < target_fd_max && target_fd_trans[fd]) { + if (fd < 0) { + return NULL; + } + + QEMU_LOCK_GUARD(&target_fd_trans_lock); + if (fd < target_fd_max && target_fd_trans[fd]) { return target_fd_trans[fd]->target_to_host_data; } return NULL; @@ -38,7 +51,12 @@ static inline TargetFdDataFunc fd_trans_target_to_host_data(int fd) static inline TargetFdDataFunc fd_trans_host_to_target_data(int fd) { - if (fd >= 0 && fd < target_fd_max && target_fd_trans[fd]) { + if (fd < 0) { + return NULL; + } + + QEMU_LOCK_GUARD(&target_fd_trans_lock); + if (fd < target_fd_max && target_fd_trans[fd]) { return target_fd_trans[fd]->host_to_target_data; } return NULL; @@ -46,13 +64,19 @@ static inline TargetFdDataFunc fd_trans_host_to_target_data(int fd) static inline TargetFdAddrFunc fd_trans_target_to_host_addr(int fd) { - if (fd >= 0 && fd < target_fd_max && target_fd_trans[fd]) { + if (fd < 0) { + return NULL; + } + + QEMU_LOCK_GUARD(&target_fd_trans_lock); + if (fd < target_fd_max && target_fd_trans[fd]) { return target_fd_trans[fd]->target_to_host_addr; } return NULL; } -static inline void fd_trans_register(int fd, TargetFdTrans *trans) +static inline void internal_fd_trans_register_unsafe(int fd, + TargetFdTrans *trans) { unsigned int oldmax; @@ -67,18 +91,35 @@ static inline void fd_trans_register(int fd, TargetFdTrans *trans) target_fd_trans[fd] = trans; } -static inline void fd_trans_unregister(int fd) +static inline void fd_trans_register(int fd, TargetFdTrans *trans) +{ + QEMU_LOCK_GUARD(&target_fd_trans_lock); + internal_fd_trans_register_unsafe(fd, trans); +} + +static inline void internal_fd_trans_unregister_unsafe(int fd) { if (fd >= 0 && fd < target_fd_max) { target_fd_trans[fd] = NULL; } } +static inline void fd_trans_unregister(int fd) +{ + if (fd < 0) { + return; + } + + QEMU_LOCK_GUARD(&target_fd_trans_lock); + internal_fd_trans_unregister_unsafe(fd); +} + static inline void fd_trans_dup(int oldfd, int newfd) { - fd_trans_unregister(newfd); + QEMU_LOCK_GUARD(&target_fd_trans_lock); + internal_fd_trans_unregister_unsafe(newfd); if (oldfd < target_fd_max && target_fd_trans[oldfd]) { - fd_trans_register(newfd, target_fd_trans[oldfd]); + internal_fd_trans_register_unsafe(newfd, target_fd_trans[oldfd]); } } diff --git a/linux-user/main.c b/linux-user/main.c index 2fb3a366a699..37ed50d98e2e 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -48,6 +48,7 @@ #include "target_elf.h" #include "cpu_loop-common.h" #include "crypto/init.h" +#include "fd-trans.h" #ifndef AT_FLAGS_PRESERVE_ARGV0 #define AT_FLAGS_PRESERVE_ARGV0_BIT 0 @@ -829,6 +830,8 @@ int main(int argc, char **argv, char **envp) cpu->opaque = ts; task_settid(ts); + fd_trans_init(); + ret = loader_exec(execfd, exec_path, target_argv, target_environ, regs, info, &bprm); if (ret != 0) { From patchwork Tue Jul 13 13:41:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1504656 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPMwG11Rsz9sX3 for ; Wed, 14 Jul 2021 00:10:06 +1000 (AEST) Received: from localhost ([::1]:37568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3J6p-0007gV-QU for incoming@patchwork.ozlabs.org; Tue, 13 Jul 2021 10:10:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifn-0000LF-7D for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:07 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:52221) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifl-00067W-8n for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:06 -0400 Received: from quad ([82.142.17.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MA88C-1lssXC0q5a-00BfXv; Tue, 13 Jul 2021 15:42:00 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 10/12] linux-user: update syscall_nr.h to Linux v5.13 Date: Tue, 13 Jul 2021 15:41:50 +0200 Message-Id: <20210713134152.288423-11-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713134152.288423-1-laurent@vivier.eu> References: <20210713134152.288423-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:aHqhiTotPPHP5VvVS4Rah0E20i4e3afHwFMnFWIxdeYqwbUQud0 3c0l2DAUh0Y34QEWhm7C2pYo5pxWAO9/HWZOXy94nYDYtzk7QBan5nQvsGM9vdoZd1WHAD7 HByEAdFRHsM4MpTll3EgqEQxrFXs0raXkzvvYkHCPmZVlycAtN2c9RtVJT8l+XMlvauQ2C5 Vc0PC/Agz62cSgJhJMaLQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:I35201S4Sa4=:vOQwceT7dDsg2eqa1AfBqN 9/01vvrnczCePUPnaUARHIKxzF/oXSgimbOPXEiQNaVayi7CGFIW+IQBU7vP6ClnMB7163zxd KpWGXuBNzF6kezM/teeNMKpMPutaw4rshTdI3JnEh+S7U5lt6T2jZCP/MQuKr6k8e4+00/GCx X+fdF9L2ryzwKU8bXUlzsoQRzhUlHMasxN1aeJM95wVO49YgQF2d9i7xDnt8KvU09C0r+s84d z4835xxkWiRvEPmO7dVmrj4b2FWUiZQ1qQyYvV9YoE/5YcB5c3hFfruma1diOw9N2tVZ9kHKg UCxrrVg1NnVc0vWW+jy42XyCq8gDpiJxxt3W1LX0QLOms+Rhj7LEHKUIOwuP10IYJ53lEMI2q cPPCo/5aWsVMKkW0U/geHe09QA0u8lNhYe1m8RiwIcLjRaAXtDl3VnFHtvd6y/eFOxmTtu+IW dxwNPYvPDbL1xL4gW2v8gBMgwk5rNRGJMgFeQENr1o84Gnhm1JHOf2C0mZew5BpahKepQcC/d UMhACM/ePH8V3ukOOL7wbaDzG905O/VPMGVAbvaRn0Zba1ErbyfDYIUyVoqoTynjSANS5zBxI BHDCZCpuYnpvql1cTYYVnmKjSBZMu7cLSOD1YhM21ILAtd/1mvR2TEfcRLtH4ytU7B2clC78a ugWUl4Z5xG81eqt9rlXcG4H7D9nAYVIGvIqZsxQgRLhSIaFfOvyerwbMkRkaC7lpsWW8xqkmG o4M8Gl7fqA22uqjAFhuyrtGsHI/+TtK1SgZx9iq+OIp/ARhc4zo7Of6B82PiJnVBYuL6ZGVwQ ImX23jFuyi4IWpHeE0QyqFiGKHn9Fz+fZcLOkn7BB+PfZBjL13IHTAYGOKDYHjDWw4dz6N+ Received-SPF: none client-ip=212.227.17.10; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Taylor Simpson , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Automatically generated using scripts/gensyscalls.sh Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20210708215756.268805-2-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/aarch64/syscall_nr.h | 8 +++++++- linux-user/hexagon/syscall_nr.h | 12 +++++++++++- linux-user/nios2/syscall_nr.h | 8 +++++++- linux-user/openrisc/syscall_nr.h | 8 +++++++- linux-user/riscv/syscall32_nr.h | 8 +++++++- linux-user/riscv/syscall64_nr.h | 8 +++++++- 6 files changed, 46 insertions(+), 6 deletions(-) diff --git a/linux-user/aarch64/syscall_nr.h b/linux-user/aarch64/syscall_nr.h index 6fd5b331e780..12ef002d60f9 100644 --- a/linux-user/aarch64/syscall_nr.h +++ b/linux-user/aarch64/syscall_nr.h @@ -302,6 +302,12 @@ #define TARGET_NR_openat2 437 #define TARGET_NR_pidfd_getfd 438 #define TARGET_NR_faccessat2 439 -#define TARGET_NR_syscalls 440 +#define TARGET_NR_process_madvise 440 +#define TARGET_NR_epoll_pwait2 441 +#define TARGET_NR_mount_setattr 442 +#define TARGET_NR_landlock_create_ruleset 444 +#define TARGET_NR_landlock_add_rule 445 +#define TARGET_NR_landlock_restrict_self 446 +#define TARGET_NR_syscalls 447 #endif /* LINUX_USER_AARCH64_SYSCALL_NR_H */ diff --git a/linux-user/hexagon/syscall_nr.h b/linux-user/hexagon/syscall_nr.h index da1314f7132d..b047dbbf6df3 100644 --- a/linux-user/hexagon/syscall_nr.h +++ b/linux-user/hexagon/syscall_nr.h @@ -317,6 +317,16 @@ #define TARGET_NR_fsmount 432 #define TARGET_NR_fspick 433 #define TARGET_NR_pidfd_open 434 -#define TARGET_NR_syscalls 436 +#define TARGET_NR_close_range 436 +#define TARGET_NR_openat2 437 +#define TARGET_NR_pidfd_getfd 438 +#define TARGET_NR_faccessat2 439 +#define TARGET_NR_process_madvise 440 +#define TARGET_NR_epoll_pwait2 441 +#define TARGET_NR_mount_setattr 442 +#define TARGET_NR_landlock_create_ruleset 444 +#define TARGET_NR_landlock_add_rule 445 +#define TARGET_NR_landlock_restrict_self 446 +#define TARGET_NR_syscalls 447 #endif /* LINUX_USER_HEXAGON_SYSCALL_NR_H */ diff --git a/linux-user/nios2/syscall_nr.h b/linux-user/nios2/syscall_nr.h index e37f40179bf3..11a37b32e8b1 100644 --- a/linux-user/nios2/syscall_nr.h +++ b/linux-user/nios2/syscall_nr.h @@ -322,6 +322,12 @@ #define TARGET_NR_openat2 437 #define TARGET_NR_pidfd_getfd 438 #define TARGET_NR_faccessat2 439 -#define TARGET_NR_syscalls 440 +#define TARGET_NR_process_madvise 440 +#define TARGET_NR_epoll_pwait2 441 +#define TARGET_NR_mount_setattr 442 +#define TARGET_NR_landlock_create_ruleset 444 +#define TARGET_NR_landlock_add_rule 445 +#define TARGET_NR_landlock_restrict_self 446 +#define TARGET_NR_syscalls 447 #endif /* LINUX_USER_NIOS2_SYSCALL_NR_H */ diff --git a/linux-user/openrisc/syscall_nr.h b/linux-user/openrisc/syscall_nr.h index a8fc0295109a..f7faddb54c58 100644 --- a/linux-user/openrisc/syscall_nr.h +++ b/linux-user/openrisc/syscall_nr.h @@ -323,6 +323,12 @@ #define TARGET_NR_openat2 437 #define TARGET_NR_pidfd_getfd 438 #define TARGET_NR_faccessat2 439 -#define TARGET_NR_syscalls 440 +#define TARGET_NR_process_madvise 440 +#define TARGET_NR_epoll_pwait2 441 +#define TARGET_NR_mount_setattr 442 +#define TARGET_NR_landlock_create_ruleset 444 +#define TARGET_NR_landlock_add_rule 445 +#define TARGET_NR_landlock_restrict_self 446 +#define TARGET_NR_syscalls 447 #endif /* LINUX_USER_OPENRISC_SYSCALL_NR_H */ diff --git a/linux-user/riscv/syscall32_nr.h b/linux-user/riscv/syscall32_nr.h index 079b804daef5..1327d7dffab9 100644 --- a/linux-user/riscv/syscall32_nr.h +++ b/linux-user/riscv/syscall32_nr.h @@ -296,6 +296,12 @@ #define TARGET_NR_openat2 437 #define TARGET_NR_pidfd_getfd 438 #define TARGET_NR_faccessat2 439 -#define TARGET_NR_syscalls 440 +#define TARGET_NR_process_madvise 440 +#define TARGET_NR_epoll_pwait2 441 +#define TARGET_NR_mount_setattr 442 +#define TARGET_NR_landlock_create_ruleset 444 +#define TARGET_NR_landlock_add_rule 445 +#define TARGET_NR_landlock_restrict_self 446 +#define TARGET_NR_syscalls 447 #endif /* LINUX_USER_RISCV_SYSCALL32_NR_H */ diff --git a/linux-user/riscv/syscall64_nr.h b/linux-user/riscv/syscall64_nr.h index d54224ccec64..6659751933d5 100644 --- a/linux-user/riscv/syscall64_nr.h +++ b/linux-user/riscv/syscall64_nr.h @@ -302,6 +302,12 @@ #define TARGET_NR_openat2 437 #define TARGET_NR_pidfd_getfd 438 #define TARGET_NR_faccessat2 439 -#define TARGET_NR_syscalls 440 +#define TARGET_NR_process_madvise 440 +#define TARGET_NR_epoll_pwait2 441 +#define TARGET_NR_mount_setattr 442 +#define TARGET_NR_landlock_create_ruleset 444 +#define TARGET_NR_landlock_add_rule 445 +#define TARGET_NR_landlock_restrict_self 446 +#define TARGET_NR_syscalls 447 #endif /* LINUX_USER_RISCV_SYSCALL64_NR_H */ From patchwork Tue Jul 13 13:41:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1504665 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPN3c1Cv7z9sWd for ; Wed, 14 Jul 2021 00:16:28 +1000 (AEST) Received: from localhost ([::1]:56116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3JCz-0003CZ-Qn for incoming@patchwork.ozlabs.org; Tue, 13 Jul 2021 10:16:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifk-0000BX-Pr for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:04 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:39295) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifi-00066X-R5 for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:04 -0400 Received: from quad ([82.142.17.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MLQgv-1lm34N2K03-00IS0A; Tue, 13 Jul 2021 15:42:00 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 11/12] linux-user, mips: update syscall-args-o32.c.inc to Linux v5.13 Date: Tue, 13 Jul 2021 15:41:51 +0200 Message-Id: <20210713134152.288423-12-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713134152.288423-1-laurent@vivier.eu> References: <20210713134152.288423-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:NbkzlmgiSTqVrc4AlVbKc4UxaNaRFS/XXC30jQ2mBM+6r4DUT3r kfWYPS0Em+PwkHFWBgLQfMDLLrZ0x1aod+TW/D29Hg0lO/ImSPU7VteWaDZJX0aegOZ1ogE 0kq9oZqlY74Sx13N+iV5o4drZO6nW+ZqOWRRbaG9o9o8zclAdfsBlxW0dteGDJRBNOqpRW8 IQhJBDLud9ST8ljRT17Fw== X-UI-Out-Filterresults: notjunk:1;V03:K0:jk4QfUljcJc=:jX8VdutyNySO0LrPnLBMW5 /8+0w91B7fw0hykRz6CMdXwJf7XshGz7DTfTEXnGcDJJgVao2lj6TzoZpfoMQZGAQ6jWpNXlP jltfm4C2diiUAFzU2CSzxv2f50XXtEhU8DMNAiTsJHZ6QIancXxzpPFkN/mbr0y3aBZDsRAAx DwAYfQKEBU3eGJTV7Vwv69j6HTfnfHRU6LrEKZCwg+IBs1QEOkVAjV6w+msnLAFzmpWq+IzNc +/beaMkvvW1WP8sartZbBi9P4R7UFGZ977u1FdffUifp1tD/fA4ME+EcBiVSu6GCjpGgJHl0Y AtLQVZ6o1XmJ5XYxvZgOmg0w52Vsv7WgQHVk8p7wxIZtCzZIoVxZ58wQuSgYP/pxTMG96yaec heREexK7EgMuTaoCv8J7Od3U35fZf0MGDigPze5XQ3ZbzpWmLduCz9R3Ynfv0PhCIN9inLEf5 2YTOi3kTDeG0g11VIgung1HfEigaonrfhmq/2lss3LFL+8ViesWkhwuM3z7Nc4euqAKCfm9U/ tJjgQJCw2jYEMcdAuxkrWOWJmJ8NjvTXibHQCSfxDUopJKxSKZdW2W7Fras5GRUnMLm8Lhq+0 cPwBJp1oCB+5vb16NpuuzWHGRrscE2/RcyqM4cv9a3xlGlgcQYuRS3La44M12PkqG1e0YYEpZ UdEGAPHf5PaJKO3sWTVzv8G6Cdp90g9dFtLSu8kmo+ZIQ8DUM5C2slJmqj604a52oP08U3ISY djjHVCT5514lvvJO+8/Ii2X1N9cAXuFVV4u6ICG3Y/nNCtgCPTGSEpFGX9k99uhZLY9JymGgM K19KqDVeEV6uJmg8FScgtBptUH6Z/kR0KAc28dPfXBbC2uzkomBIUUj6OXS7aa+YTGvz/Lt Received-SPF: none client-ip=217.72.192.73; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Updated running scripts/update-mips-syscall-args.sh scripts/update-mips-syscall-args.sh has been updated to reflect file directory changes in strace repository. Signed-off-by: Laurent Vivier Message-Id: <20210708215756.268805-3-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/mips/syscall-args-o32.c.inc | 5 ++++- scripts/update-mips-syscall-args.sh | 13 +++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/linux-user/mips/syscall-args-o32.c.inc b/linux-user/mips/syscall-args-o32.c.inc index 92ee4f921ec7..a6a2c5c566ca 100644 --- a/linux-user/mips/syscall-args-o32.c.inc +++ b/linux-user/mips/syscall-args-o32.c.inc @@ -356,7 +356,7 @@ [ 355] = 3, /* bpf */ [ 356] = 5, /* execveat */ [ 357] = 1, /* userfaultfd */ - [ 358] = 2, /* membarrier */ + [ 358] = 3, /* membarrier */ [ 359] = 3, /* mlock2 */ [ 360] = 6, /* copy_file_range */ [ 361] = 6, /* preadv2 */ @@ -438,3 +438,6 @@ [ 437] = 4, /* openat2 */ [ 438] = 3, /* pidfd_getfd */ [ 439] = 4, /* faccessat2 */ + [ 440] = 5, /* process_madvise */ + [ 441] = 6, /* epoll_pwait2 */ + [ 442] = 5, /* mount_setattr */ diff --git a/scripts/update-mips-syscall-args.sh b/scripts/update-mips-syscall-args.sh index 4f0dda4b83bc..5a529b699eb8 100755 --- a/scripts/update-mips-syscall-args.sh +++ b/scripts/update-mips-syscall-args.sh @@ -1,9 +1,9 @@ #!/bin/sh -URL=https://raw.githubusercontent.com/strace/strace/master +URL=https://raw.githubusercontent.com/strace/strace/master/src FILES="sysent.h sysent_shorthand_defs.h linux/mips/syscallent-compat.h \ - linux/mips/syscallent-o32.h linux/syscallent-common-32.h \ - linux/syscallent-common.h" + linux/mips/syscallent-o32.h linux/32/syscallent-common-32.h \ + linux/generic/syscallent-common.h" output="$1" if [ "$output" = "" ] ; then @@ -16,10 +16,11 @@ TMP=$(mktemp -d) cd $TMP for file in $FILES; do - curl -O $URL/$file + curl --create-dirs $URL/$file -o $TMP/$file done -> subcall32.h +> linux/generic/subcallent.h +> linux/32/subcallent.h cat > gen_mips_o32.c < @@ -52,6 +53,6 @@ int main(void) } EOF -cc -o gen_mips_o32 gen_mips_o32.c && ./gen_mips_o32 > "$output/$INC" +cc -o gen_mips_o32 -I linux/mips -I linux/generic gen_mips_o32.c && ./gen_mips_o32 > "$output/$INC" rm -fr "$TMP" From patchwork Tue Jul 13 13:41:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1504652 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPMq00Cpnz9sWl for ; Wed, 14 Jul 2021 00:05:32 +1000 (AEST) Received: from localhost ([::1]:50626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3J2P-0005hH-Nz for incoming@patchwork.ozlabs.org; Tue, 13 Jul 2021 10:05:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifm-0000Is-HD for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:06 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:58743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ifi-00066i-Rj for qemu-devel@nongnu.org; Tue, 13 Jul 2021 09:42:06 -0400 Received: from quad ([82.142.17.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MNcYX-1loDrf3kFP-00P1Zy; Tue, 13 Jul 2021 15:42:01 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 12/12] linux-user: update syscall.tbl to Linux v5.13 Date: Tue, 13 Jul 2021 15:41:52 +0200 Message-Id: <20210713134152.288423-13-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713134152.288423-1-laurent@vivier.eu> References: <20210713134152.288423-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:j3oihA1oIoHa1QA7eNBspQFizuVDeQ7h8OHkaA9BJgX3ycF42Er kNl5Tw6nJ3qDVOB0w0yqutec/k5biFEZHs3PIHI+FhFfVPzO3izp6GrMsJzzFnev7F0bQxh kITJi8b87pn01EzOPFNXA8q6oc6S599G1CElICnqCEeZgmh8zsU9p3pYv0Sk98BBzD1ZJQb Cw30LRewb41mDP1fzk/Kg== X-UI-Out-Filterresults: notjunk:1;V03:K0:49K9xGYnYKM=:3OWqOwS0w+XVPkerwGP8Ln 0jFu/YsHoPnFVvw5rleN7e9LPMuiFS/UlK8KrHSp/f92kVx5dJiid4wAEgPIbZJu3Jr3NL8iL YXTpEG7+4REStoW1p3y8EMVa9YnQz6qd5lR4YzjEvd7tHJlSZ3YMfHiaaoJIbAv3ruktxKGIK l/CT4jRj+y3qK3CwnrzZ6kfqLgca29LhFyDqHUHJjShX9pOjzAfhXsw+EajyanrZxvbkvLHTO fkwbHstQGnLRSdSNGwJVVyXQ8Rw3xyOesnrgqGwYD7M+GtvG4B4UN6uxa23eMhAP5KHeeweSW WjKfSZwA+izgqIIKFCWMLQLMp7D5a6kCDtjavuAy7vxyI/ERa27DUuR0LQ6Hk/OuiOwGTHj6W hEIO62F+iVuUQUP0iDTAoUNeg37FnHiT/i9hUz3RW5v+q43VYIRDeSLmHL0xQB9YIjcsrVztn GwOMcSlXp7hLgN5klTrMKw3lZpZirPm+mcrqebdaHieY2MO17t5iaOfNfnGTMm2ldHLm+cwTt naEH/prjYe12DHZR8d9bnoi++Evhe52BNsx5MEQVDK0bWCaY1rrXI9IPUk9/BsfBt14JCKF72 TCMwbYv+Eq8YLZo8zteFniKZo8bBGOsoHMwWP1dho4h9tKSnevWtm2w0e+w1tBkApdTThvzJo LnS+8kCAJhHwRaJCoVNKfd7MTBfRQs4mIz9o5dlAoZY+EZNs+cOOfAhksePAuaLWNzWbqR1Cu pK8tDQNWnk9wnBVBzC+Tk9OSxOroF6laiEx2F8aS1KhHGomZJsNEx2C3txViHZcSZf92fUUX7 88Fj5kdH49p6n7VobHQQu+0j97Eevip+8iRNLPENPVG1joMNnvz5z5nD8Ft2FKCWQu+MTQj Received-SPF: none client-ip=217.72.192.74; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Updated running scripts/update-syscalltbl.sh Signed-off-by: Laurent Vivier Message-Id: <20210708215756.268805-4-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/alpha/syscall.tbl | 7 ++++++ linux-user/arm/syscall.tbl | 7 ++++++ linux-user/hppa/syscall.tbl | 31 ++++++++++++++---------- linux-user/i386/syscall_32.tbl | 21 +++++++++++------ linux-user/m68k/syscall.tbl | 7 ++++++ linux-user/microblaze/syscall.tbl | 7 ++++++ linux-user/mips/syscall_o32.tbl | 19 ++++++++++----- linux-user/mips64/syscall_n32.tbl | 19 ++++++++++----- linux-user/mips64/syscall_n64.tbl | 7 ++++++ linux-user/ppc/syscall.tbl | 39 ++++++++++++++----------------- linux-user/s390x/syscall.tbl | 19 ++++++++++----- linux-user/sh4/syscall.tbl | 7 ++++++ linux-user/sparc/syscall.tbl | 19 ++++++++++----- linux-user/x86_64/syscall_64.tbl | 27 ++++++++++++++------- linux-user/xtensa/syscall.tbl | 7 ++++++ 15 files changed, 170 insertions(+), 73 deletions(-) diff --git a/linux-user/alpha/syscall.tbl b/linux-user/alpha/syscall.tbl index ec8bed9e7b75..3000a2e8ee21 100644 --- a/linux-user/alpha/syscall.tbl +++ b/linux-user/alpha/syscall.tbl @@ -479,3 +479,10 @@ 547 common openat2 sys_openat2 548 common pidfd_getfd sys_pidfd_getfd 549 common faccessat2 sys_faccessat2 +550 common process_madvise sys_process_madvise +551 common epoll_pwait2 sys_epoll_pwait2 +552 common mount_setattr sys_mount_setattr +# 553 reserved for quotactl_path +554 common landlock_create_ruleset sys_landlock_create_ruleset +555 common landlock_add_rule sys_landlock_add_rule +556 common landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/arm/syscall.tbl b/linux-user/arm/syscall.tbl index 171077cbf419..28e03b5fec00 100644 --- a/linux-user/arm/syscall.tbl +++ b/linux-user/arm/syscall.tbl @@ -453,3 +453,10 @@ 437 common openat2 sys_openat2 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 +440 common process_madvise sys_process_madvise +441 common epoll_pwait2 sys_epoll_pwait2 +442 common mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 common landlock_create_ruleset sys_landlock_create_ruleset +445 common landlock_add_rule sys_landlock_add_rule +446 common landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/hppa/syscall.tbl b/linux-user/hppa/syscall.tbl index def64d221cd4..aabc37f8cae3 100644 --- a/linux-user/hppa/syscall.tbl +++ b/linux-user/hppa/syscall.tbl @@ -29,7 +29,7 @@ 18 common stat sys_newstat compat_sys_newstat 19 common lseek sys_lseek compat_sys_lseek 20 common getpid sys_getpid -21 common mount sys_mount compat_sys_mount +21 common mount sys_mount 22 common bind sys_bind 23 common setuid sys_setuid 24 common getuid sys_getuid @@ -159,8 +159,8 @@ 142 common _newselect sys_select compat_sys_select 143 common flock sys_flock 144 common msync sys_msync -145 common readv sys_readv compat_sys_readv -146 common writev sys_writev compat_sys_writev +145 common readv sys_readv +146 common writev sys_writev 147 common getsid sys_getsid 148 common fdatasync sys_fdatasync 149 common _sysctl sys_ni_syscall @@ -330,7 +330,7 @@ 292 32 sync_file_range parisc_sync_file_range 292 64 sync_file_range sys_sync_file_range 293 common tee sys_tee -294 common vmsplice sys_vmsplice compat_sys_vmsplice +294 common vmsplice sys_vmsplice 295 common move_pages sys_move_pages compat_sys_move_pages 296 common getcpu sys_getcpu 297 common epoll_pwait sys_epoll_pwait compat_sys_epoll_pwait @@ -344,17 +344,17 @@ 304 common eventfd sys_eventfd 305 32 fallocate parisc_fallocate 305 64 fallocate sys_fallocate -306 common timerfd_create sys_timerfd_create +306 common timerfd_create parisc_timerfd_create 307 32 timerfd_settime sys_timerfd_settime32 307 64 timerfd_settime sys_timerfd_settime 308 32 timerfd_gettime sys_timerfd_gettime32 308 64 timerfd_gettime sys_timerfd_gettime -309 common signalfd4 sys_signalfd4 compat_sys_signalfd4 -310 common eventfd2 sys_eventfd2 +309 common signalfd4 parisc_signalfd4 parisc_compat_signalfd4 +310 common eventfd2 parisc_eventfd2 311 common epoll_create1 sys_epoll_create1 312 common dup3 sys_dup3 -313 common pipe2 sys_pipe2 -314 common inotify_init1 sys_inotify_init1 +313 common pipe2 parisc_pipe2 +314 common inotify_init1 parisc_inotify_init1 315 common preadv sys_preadv compat_sys_preadv 316 common pwritev sys_pwritev compat_sys_pwritev 317 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo @@ -372,8 +372,8 @@ 327 common syncfs sys_syncfs 328 common setns sys_setns 329 common sendmmsg sys_sendmmsg compat_sys_sendmmsg -330 common process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv -331 common process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev +330 common process_vm_readv sys_process_vm_readv +331 common process_vm_writev sys_process_vm_writev 332 common kcmp sys_kcmp 333 common finit_module sys_finit_module 334 common sched_setattr sys_sched_setattr @@ -387,7 +387,7 @@ 341 common bpf sys_bpf 342 common execveat sys_execveat compat_sys_execveat 343 common membarrier sys_membarrier -344 common userfaultfd sys_userfaultfd +344 common userfaultfd parisc_userfaultfd 345 common mlock2 sys_mlock2 346 common copy_file_range sys_copy_file_range 347 common preadv2 sys_preadv2 compat_sys_preadv2 @@ -437,3 +437,10 @@ 437 common openat2 sys_openat2 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 +440 common process_madvise sys_process_madvise +441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 common landlock_create_ruleset sys_landlock_create_ruleset +445 common landlock_add_rule sys_landlock_add_rule +446 common landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/i386/syscall_32.tbl b/linux-user/i386/syscall_32.tbl index 9d1102873666..4bbc267fb36b 100644 --- a/linux-user/i386/syscall_32.tbl +++ b/linux-user/i386/syscall_32.tbl @@ -32,7 +32,7 @@ 18 i386 oldstat sys_stat 19 i386 lseek sys_lseek compat_sys_lseek 20 i386 getpid sys_getpid -21 i386 mount sys_mount compat_sys_mount +21 i386 mount sys_mount 22 i386 umount sys_oldumount 23 i386 setuid sys_setuid16 24 i386 getuid sys_getuid16 @@ -142,7 +142,7 @@ 128 i386 init_module sys_init_module 129 i386 delete_module sys_delete_module 130 i386 get_kernel_syms -131 i386 quotactl sys_quotactl compat_sys_quotactl32 +131 i386 quotactl sys_quotactl 132 i386 getpgid sys_getpgid 133 i386 fchdir sys_fchdir 134 i386 bdflush sys_bdflush @@ -156,8 +156,8 @@ 142 i386 _newselect sys_select compat_sys_select 143 i386 flock sys_flock 144 i386 msync sys_msync -145 i386 readv sys_readv compat_sys_readv -146 i386 writev sys_writev compat_sys_writev +145 i386 readv sys_readv +146 i386 writev sys_writev 147 i386 getsid sys_getsid 148 i386 fdatasync sys_fdatasync 149 i386 _sysctl sys_ni_syscall @@ -327,7 +327,7 @@ 313 i386 splice sys_splice 314 i386 sync_file_range sys_ia32_sync_file_range 315 i386 tee sys_tee -316 i386 vmsplice sys_vmsplice compat_sys_vmsplice +316 i386 vmsplice sys_vmsplice 317 i386 move_pages sys_move_pages compat_sys_move_pages 318 i386 getcpu sys_getcpu 319 i386 epoll_pwait sys_epoll_pwait @@ -358,8 +358,8 @@ 344 i386 syncfs sys_syncfs 345 i386 sendmmsg sys_sendmmsg compat_sys_sendmmsg 346 i386 setns sys_setns -347 i386 process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv -348 i386 process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev +347 i386 process_vm_readv sys_process_vm_readv +348 i386 process_vm_writev sys_process_vm_writev 349 i386 kcmp sys_kcmp 350 i386 finit_module sys_finit_module 351 i386 sched_setattr sys_sched_setattr @@ -444,3 +444,10 @@ 437 i386 openat2 sys_openat2 438 i386 pidfd_getfd sys_pidfd_getfd 439 i386 faccessat2 sys_faccessat2 +440 i386 process_madvise sys_process_madvise +441 i386 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 i386 mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 i386 landlock_create_ruleset sys_landlock_create_ruleset +445 i386 landlock_add_rule sys_landlock_add_rule +446 i386 landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/m68k/syscall.tbl b/linux-user/m68k/syscall.tbl index 81fc799d8392..79c2d24c89dd 100644 --- a/linux-user/m68k/syscall.tbl +++ b/linux-user/m68k/syscall.tbl @@ -439,3 +439,10 @@ 437 common openat2 sys_openat2 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 +440 common process_madvise sys_process_madvise +441 common epoll_pwait2 sys_epoll_pwait2 +442 common mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 common landlock_create_ruleset sys_landlock_create_ruleset +445 common landlock_add_rule sys_landlock_add_rule +446 common landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/microblaze/syscall.tbl b/linux-user/microblaze/syscall.tbl index b4e263916f41..b11395a20c20 100644 --- a/linux-user/microblaze/syscall.tbl +++ b/linux-user/microblaze/syscall.tbl @@ -445,3 +445,10 @@ 437 common openat2 sys_openat2 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 +440 common process_madvise sys_process_madvise +441 common epoll_pwait2 sys_epoll_pwait2 +442 common mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 common landlock_create_ruleset sys_landlock_create_ruleset +445 common landlock_add_rule sys_landlock_add_rule +446 common landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/mips/syscall_o32.tbl b/linux-user/mips/syscall_o32.tbl index 195b43cf27c8..d560c467a8c6 100644 --- a/linux-user/mips/syscall_o32.tbl +++ b/linux-user/mips/syscall_o32.tbl @@ -29,7 +29,7 @@ 18 o32 unused18 sys_ni_syscall 19 o32 lseek sys_lseek 20 o32 getpid sys_getpid -21 o32 mount sys_mount compat_sys_mount +21 o32 mount sys_mount 22 o32 umount sys_oldumount 23 o32 setuid sys_setuid 24 o32 getuid sys_getuid @@ -156,8 +156,8 @@ 142 o32 _newselect sys_select compat_sys_select 143 o32 flock sys_flock 144 o32 msync sys_msync -145 o32 readv sys_readv compat_sys_readv -146 o32 writev sys_writev compat_sys_writev +145 o32 readv sys_readv +146 o32 writev sys_writev 147 o32 cacheflush sys_cacheflush 148 o32 cachectl sys_cachectl 149 o32 sysmips __sys_sysmips @@ -318,7 +318,7 @@ 304 o32 splice sys_splice 305 o32 sync_file_range sys_sync_file_range sys32_sync_file_range 306 o32 tee sys_tee -307 o32 vmsplice sys_vmsplice compat_sys_vmsplice +307 o32 vmsplice sys_vmsplice 308 o32 move_pages sys_move_pages compat_sys_move_pages 309 o32 set_robust_list sys_set_robust_list compat_sys_set_robust_list 310 o32 get_robust_list sys_get_robust_list compat_sys_get_robust_list @@ -356,8 +356,8 @@ 342 o32 syncfs sys_syncfs 343 o32 sendmmsg sys_sendmmsg compat_sys_sendmmsg 344 o32 setns sys_setns -345 o32 process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv -346 o32 process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev +345 o32 process_vm_readv sys_process_vm_readv +346 o32 process_vm_writev sys_process_vm_writev 347 o32 kcmp sys_kcmp 348 o32 finit_module sys_finit_module 349 o32 sched_setattr sys_sched_setattr @@ -427,3 +427,10 @@ 437 o32 openat2 sys_openat2 438 o32 pidfd_getfd sys_pidfd_getfd 439 o32 faccessat2 sys_faccessat2 +440 o32 process_madvise sys_process_madvise +441 o32 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 o32 mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 o32 landlock_create_ruleset sys_landlock_create_ruleset +445 o32 landlock_add_rule sys_landlock_add_rule +446 o32 landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/mips64/syscall_n32.tbl b/linux-user/mips64/syscall_n32.tbl index f9df9edb67a4..9220909526f9 100644 --- a/linux-user/mips64/syscall_n32.tbl +++ b/linux-user/mips64/syscall_n32.tbl @@ -25,8 +25,8 @@ 15 n32 ioctl compat_sys_ioctl 16 n32 pread64 sys_pread64 17 n32 pwrite64 sys_pwrite64 -18 n32 readv compat_sys_readv -19 n32 writev compat_sys_writev +18 n32 readv sys_readv +19 n32 writev sys_writev 20 n32 access sys_access 21 n32 pipe sysm_pipe 22 n32 _newselect compat_sys_select @@ -167,7 +167,7 @@ 157 n32 sync sys_sync 158 n32 acct sys_acct 159 n32 settimeofday compat_sys_settimeofday -160 n32 mount compat_sys_mount +160 n32 mount sys_mount 161 n32 umount2 sys_umount 162 n32 swapon sys_swapon 163 n32 swapoff sys_swapoff @@ -278,7 +278,7 @@ 267 n32 splice sys_splice 268 n32 sync_file_range sys_sync_file_range 269 n32 tee sys_tee -270 n32 vmsplice compat_sys_vmsplice +270 n32 vmsplice sys_vmsplice 271 n32 move_pages compat_sys_move_pages 272 n32 set_robust_list compat_sys_set_robust_list 273 n32 get_robust_list compat_sys_get_robust_list @@ -317,8 +317,8 @@ 306 n32 syncfs sys_syncfs 307 n32 sendmmsg compat_sys_sendmmsg 308 n32 setns sys_setns -309 n32 process_vm_readv compat_sys_process_vm_readv -310 n32 process_vm_writev compat_sys_process_vm_writev +309 n32 process_vm_readv sys_process_vm_readv +310 n32 process_vm_writev sys_process_vm_writev 311 n32 kcmp sys_kcmp 312 n32 finit_module sys_finit_module 313 n32 sched_setattr sys_sched_setattr @@ -378,3 +378,10 @@ 437 n32 openat2 sys_openat2 438 n32 pidfd_getfd sys_pidfd_getfd 439 n32 faccessat2 sys_faccessat2 +440 n32 process_madvise sys_process_madvise +441 n32 epoll_pwait2 compat_sys_epoll_pwait2 +442 n32 mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 n32 landlock_create_ruleset sys_landlock_create_ruleset +445 n32 landlock_add_rule sys_landlock_add_rule +446 n32 landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/mips64/syscall_n64.tbl b/linux-user/mips64/syscall_n64.tbl index 557f9954a2b9..9cd1c34f31b5 100644 --- a/linux-user/mips64/syscall_n64.tbl +++ b/linux-user/mips64/syscall_n64.tbl @@ -354,3 +354,10 @@ 437 n64 openat2 sys_openat2 438 n64 pidfd_getfd sys_pidfd_getfd 439 n64 faccessat2 sys_faccessat2 +440 n64 process_madvise sys_process_madvise +441 n64 epoll_pwait2 sys_epoll_pwait2 +442 n64 mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 n64 landlock_create_ruleset sys_landlock_create_ruleset +445 n64 landlock_add_rule sys_landlock_add_rule +446 n64 landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/ppc/syscall.tbl b/linux-user/ppc/syscall.tbl index c2d737ff2e7b..8f052ff4058c 100644 --- a/linux-user/ppc/syscall.tbl +++ b/linux-user/ppc/syscall.tbl @@ -9,9 +9,7 @@ # 0 nospu restart_syscall sys_restart_syscall 1 nospu exit sys_exit -2 32 fork ppc_fork sys_fork -2 64 fork sys_fork -2 spu fork sys_ni_syscall +2 nospu fork sys_fork 3 common read sys_read 4 common write sys_write 5 common open sys_open compat_sys_open @@ -34,7 +32,7 @@ 18 spu oldstat sys_ni_syscall 19 common lseek sys_lseek compat_sys_lseek 20 common getpid sys_getpid -21 nospu mount sys_mount compat_sys_mount +21 nospu mount sys_mount 22 32 umount sys_oldumount 22 64 umount sys_ni_syscall 22 spu umount sys_ni_syscall @@ -160,9 +158,7 @@ 119 32 sigreturn sys_sigreturn compat_sys_sigreturn 119 64 sigreturn sys_ni_syscall 119 spu sigreturn sys_ni_syscall -120 32 clone ppc_clone sys_clone -120 64 clone sys_clone -120 spu clone sys_ni_syscall +120 nospu clone sys_clone 121 common setdomainname sys_setdomainname 122 common uname sys_newuname 123 common modify_ldt sys_ni_syscall @@ -193,8 +189,8 @@ 142 common _newselect sys_select compat_sys_select 143 common flock sys_flock 144 common msync sys_msync -145 common readv sys_readv compat_sys_readv -146 common writev sys_writev compat_sys_writev +145 common readv sys_readv +146 common writev sys_writev 147 common getsid sys_getsid 148 common fdatasync sys_fdatasync 149 nospu _sysctl sys_ni_syscall @@ -244,9 +240,7 @@ 186 spu sendfile sys_sendfile64 187 common getpmsg sys_ni_syscall 188 common putpmsg sys_ni_syscall -189 32 vfork ppc_vfork sys_vfork -189 64 vfork sys_vfork -189 spu vfork sys_ni_syscall +189 nospu vfork sys_vfork 190 common ugetrlimit sys_getrlimit compat_sys_getrlimit 191 common readahead sys_readahead compat_sys_readahead 192 32 mmap2 sys_mmap2 compat_sys_mmap2 @@ -322,9 +316,7 @@ 248 32 clock_nanosleep sys_clock_nanosleep_time32 248 64 clock_nanosleep sys_clock_nanosleep 248 spu clock_nanosleep sys_clock_nanosleep -249 32 swapcontext ppc_swapcontext compat_sys_swapcontext -249 64 swapcontext sys_swapcontext -249 spu swapcontext sys_ni_syscall +249 nospu swapcontext sys_swapcontext compat_sys_swapcontext 250 common tgkill sys_tgkill 251 32 utimes sys_utimes_time32 251 64 utimes sys_utimes @@ -369,7 +361,7 @@ 282 common unshare sys_unshare 283 common splice sys_splice 284 common tee sys_tee -285 common vmsplice sys_vmsplice compat_sys_vmsplice +285 common vmsplice sys_vmsplice 286 common openat sys_openat compat_sys_openat 287 common mkdirat sys_mkdirat 288 common mknodat sys_mknodat @@ -449,8 +441,8 @@ 348 common syncfs sys_syncfs 349 common sendmmsg sys_sendmmsg compat_sys_sendmmsg 350 common setns sys_setns -351 nospu process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv -352 nospu process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev +351 nospu process_vm_readv sys_process_vm_readv +352 nospu process_vm_writev sys_process_vm_writev 353 nospu finit_module sys_finit_module 354 nospu kcmp sys_kcmp 355 common sched_setattr sys_sched_setattr @@ -522,10 +514,15 @@ 432 common fsmount sys_fsmount 433 common fspick sys_fspick 434 common pidfd_open sys_pidfd_open -435 32 clone3 ppc_clone3 sys_clone3 -435 64 clone3 sys_clone3 -435 spu clone3 sys_ni_syscall +435 nospu clone3 sys_clone3 436 common close_range sys_close_range 437 common openat2 sys_openat2 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 +440 common process_madvise sys_process_madvise +441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 common landlock_create_ruleset sys_landlock_create_ruleset +445 common landlock_add_rule sys_landlock_add_rule +446 common landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/s390x/syscall.tbl b/linux-user/s390x/syscall.tbl index 10456bc936fb..0690263df1dd 100644 --- a/linux-user/s390x/syscall.tbl +++ b/linux-user/s390x/syscall.tbl @@ -26,7 +26,7 @@ 16 32 lchown - sys_lchown16 19 common lseek sys_lseek compat_sys_lseek 20 common getpid sys_getpid sys_getpid -21 common mount sys_mount compat_sys_mount +21 common mount sys_mount sys_mount 22 common umount sys_oldumount sys_oldumount 23 32 setuid - sys_setuid16 24 32 getuid - sys_getuid16 @@ -134,8 +134,8 @@ 142 64 select sys_select - 143 common flock sys_flock sys_flock 144 common msync sys_msync sys_msync -145 common readv sys_readv compat_sys_readv -146 common writev sys_writev compat_sys_writev +145 common readv sys_readv sys_readv +146 common writev sys_writev sys_writev 147 common getsid sys_getsid sys_getsid 148 common fdatasync sys_fdatasync sys_fdatasync 149 common _sysctl - - @@ -316,7 +316,7 @@ 306 common splice sys_splice sys_splice 307 common sync_file_range sys_sync_file_range compat_sys_s390_sync_file_range 308 common tee sys_tee sys_tee -309 common vmsplice sys_vmsplice compat_sys_vmsplice +309 common vmsplice sys_vmsplice sys_vmsplice 310 common move_pages sys_move_pages compat_sys_move_pages 311 common getcpu sys_getcpu sys_getcpu 312 common epoll_pwait sys_epoll_pwait compat_sys_epoll_pwait @@ -347,8 +347,8 @@ 337 common clock_adjtime sys_clock_adjtime sys_clock_adjtime32 338 common syncfs sys_syncfs sys_syncfs 339 common setns sys_setns sys_setns -340 common process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv -341 common process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev +340 common process_vm_readv sys_process_vm_readv sys_process_vm_readv +341 common process_vm_writev sys_process_vm_writev sys_process_vm_writev 342 common s390_runtime_instr sys_s390_runtime_instr sys_s390_runtime_instr 343 common kcmp sys_kcmp sys_kcmp 344 common finit_module sys_finit_module sys_finit_module @@ -442,3 +442,10 @@ 437 common openat2 sys_openat2 sys_openat2 438 common pidfd_getfd sys_pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 sys_faccessat2 +440 common process_madvise sys_process_madvise sys_process_madvise +441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common mount_setattr sys_mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 common landlock_create_ruleset sys_landlock_create_ruleset sys_landlock_create_ruleset +445 common landlock_add_rule sys_landlock_add_rule sys_landlock_add_rule +446 common landlock_restrict_self sys_landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/sh4/syscall.tbl b/linux-user/sh4/syscall.tbl index ae0a00beea5f..0b91499ebdcf 100644 --- a/linux-user/sh4/syscall.tbl +++ b/linux-user/sh4/syscall.tbl @@ -442,3 +442,10 @@ 437 common openat2 sys_openat2 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 +440 common process_madvise sys_process_madvise +441 common epoll_pwait2 sys_epoll_pwait2 +442 common mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 common landlock_create_ruleset sys_landlock_create_ruleset +445 common landlock_add_rule sys_landlock_add_rule +446 common landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/sparc/syscall.tbl b/linux-user/sparc/syscall.tbl index 4af114e84f20..e34cc30ef22c 100644 --- a/linux-user/sparc/syscall.tbl +++ b/linux-user/sparc/syscall.tbl @@ -38,7 +38,7 @@ 23 64 setuid sys_setuid 24 32 getuid sys_getuid16 24 64 getuid sys_getuid -25 common vmsplice sys_vmsplice compat_sys_vmsplice +25 common vmsplice sys_vmsplice 26 common ptrace sys_ptrace compat_sys_ptrace 27 common alarm sys_alarm 28 common sigaltstack sys_sigaltstack compat_sys_sigaltstack @@ -149,8 +149,8 @@ 117 common getrusage sys_getrusage compat_sys_getrusage 118 common getsockopt sys_getsockopt sys_getsockopt 119 common getcwd sys_getcwd -120 common readv sys_readv compat_sys_readv -121 common writev sys_writev compat_sys_writev +120 common readv sys_readv +121 common writev sys_writev 122 common settimeofday sys_settimeofday compat_sys_settimeofday 123 32 fchown sys_fchown16 123 64 fchown sys_fchown @@ -201,7 +201,7 @@ 164 64 utrap_install sys_utrap_install 165 common quotactl sys_quotactl 166 common set_tid_address sys_set_tid_address -167 common mount sys_mount compat_sys_mount +167 common mount sys_mount 168 common ustat sys_ustat compat_sys_ustat 169 common setxattr sys_setxattr 170 common lsetxattr sys_lsetxattr @@ -406,8 +406,8 @@ 335 common syncfs sys_syncfs 336 common sendmmsg sys_sendmmsg compat_sys_sendmmsg 337 common setns sys_setns -338 common process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv -339 common process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev +338 common process_vm_readv sys_process_vm_readv +339 common process_vm_writev sys_process_vm_writev 340 32 kern_features sys_ni_syscall sys_kern_features 340 64 kern_features sys_kern_features 341 common kcmp sys_kcmp @@ -485,3 +485,10 @@ 437 common openat2 sys_openat2 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 +440 common process_madvise sys_process_madvise +441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 common landlock_create_ruleset sys_landlock_create_ruleset +445 common landlock_add_rule sys_landlock_add_rule +446 common landlock_restrict_self sys_landlock_restrict_self diff --git a/linux-user/x86_64/syscall_64.tbl b/linux-user/x86_64/syscall_64.tbl index f30d6ae9a688..ce18119ea0d0 100644 --- a/linux-user/x86_64/syscall_64.tbl +++ b/linux-user/x86_64/syscall_64.tbl @@ -361,18 +361,25 @@ 437 common openat2 sys_openat2 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 +440 common process_madvise sys_process_madvise +441 common epoll_pwait2 sys_epoll_pwait2 +442 common mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 common landlock_create_ruleset sys_landlock_create_ruleset +445 common landlock_add_rule sys_landlock_add_rule +446 common landlock_restrict_self sys_landlock_restrict_self # -# x32-specific system call numbers start at 512 to avoid cache impact -# for native 64-bit operation. The __x32_compat_sys stubs are created -# on-the-fly for compat_sys_*() compatibility system calls if X86_X32 -# is defined. +# Due to a historical design error, certain syscalls are numbered differently +# in x32 as compared to native x86_64. These syscalls have numbers 512-547. +# Do not add new syscalls to this range. Numbers 548 and above are available +# for non-x32 use. # 512 x32 rt_sigaction compat_sys_rt_sigaction 513 x32 rt_sigreturn compat_sys_x32_rt_sigreturn 514 x32 ioctl compat_sys_ioctl -515 x32 readv compat_sys_readv -516 x32 writev compat_sys_writev +515 x32 readv sys_readv +516 x32 writev sys_writev 517 x32 recvfrom compat_sys_recvfrom 518 x32 sendmsg compat_sys_sendmsg 519 x32 recvmsg compat_sys_recvmsg @@ -388,15 +395,15 @@ 529 x32 waitid compat_sys_waitid 530 x32 set_robust_list compat_sys_set_robust_list 531 x32 get_robust_list compat_sys_get_robust_list -532 x32 vmsplice compat_sys_vmsplice +532 x32 vmsplice sys_vmsplice 533 x32 move_pages compat_sys_move_pages 534 x32 preadv compat_sys_preadv64 535 x32 pwritev compat_sys_pwritev64 536 x32 rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo 537 x32 recvmmsg compat_sys_recvmmsg_time64 538 x32 sendmmsg compat_sys_sendmmsg -539 x32 process_vm_readv compat_sys_process_vm_readv -540 x32 process_vm_writev compat_sys_process_vm_writev +539 x32 process_vm_readv sys_process_vm_readv +540 x32 process_vm_writev sys_process_vm_writev 541 x32 setsockopt sys_setsockopt 542 x32 getsockopt sys_getsockopt 543 x32 io_setup compat_sys_io_setup @@ -404,3 +411,5 @@ 545 x32 execveat compat_sys_execveat 546 x32 preadv2 compat_sys_preadv64v2 547 x32 pwritev2 compat_sys_pwritev64v2 +# This is the end of the legacy x32 range. Numbers 548 and above are +# not special and are not to be used for x32-specific syscalls. diff --git a/linux-user/xtensa/syscall.tbl b/linux-user/xtensa/syscall.tbl index 6276e3c2d3fc..fd2f30227d96 100644 --- a/linux-user/xtensa/syscall.tbl +++ b/linux-user/xtensa/syscall.tbl @@ -410,3 +410,10 @@ 437 common openat2 sys_openat2 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 +440 common process_madvise sys_process_madvise +441 common epoll_pwait2 sys_epoll_pwait2 +442 common mount_setattr sys_mount_setattr +# 443 reserved for quotactl_path +444 common landlock_create_ruleset sys_landlock_create_ruleset +445 common landlock_add_rule sys_landlock_add_rule +446 common landlock_restrict_self sys_landlock_restrict_self