From patchwork Fri Jun 5 11:41:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1304073 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=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu 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 49dgjY21zsz9sSF for ; Fri, 5 Jun 2020 21:42:09 +1000 (AEST) Received: from localhost ([::1]:43566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhAjf-0002D9-0L for incoming@patchwork.ozlabs.org; Fri, 05 Jun 2020 07:42:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhAj9-0002Bc-5o for qemu-devel@nongnu.org; Fri, 05 Jun 2020 07:41:35 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:44293) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhAj8-0005ez-At for qemu-devel@nongnu.org; Fri, 05 Jun 2020 07:41:34 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N7xml-1iugbN0S27-0154t8; Fri, 05 Jun 2020 13:41:26 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 01/19] linux-user, alpha: fix oldumount syscall Date: Fri, 5 Jun 2020 13:41:02 +0200 Message-Id: <20200605114120.1051236-2-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605114120.1051236-1-laurent@vivier.eu> References: <20200605114120.1051236-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:Vrjynv6bZQdNwwKZKnRDWL7rwm3uAImACqQyOeb7ZC//Rx175T2 9l2lCVIxjQh4LFN8LHf/FMHLNv+eCF+Xhd4onLukjyofdIXwR65evIqaGjvMa9Br3LiBN0A iE00IuBqITT/XFgcOFQ93w94hpA66XWKjtTCN60Of8xW3Q6pSCwUkFCTB54SoOg8sDnDykZ 3OfOIxn+9IaQhY2WCiOfQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:gGNxyUGKKRk=:hHoLrBcpJH8XM564QgqFeW fGygZ5sslnZ4dxRcCHNlWt1+O6oazvySR9SmjSYgah4PI2R3uW7r8bijxwyAIRcB4fq2NNTeL whe0+DAx++F+LS6BGhMEy50mNMIF0vQUm84UiZD9J/XJ2MnTZwx+g3NRnGAAXe8R0XreoDzC3 y8AsI7kSkEBqJyabhiGU9M/MJMPNSBJ+6tasTEWHg+6vAGddhpfneRVOZ0eyZVLwK9QjSVYuQ stt/+f1ejJ8Jpgpm/Gi/ESqnMcZhj3qi5or8ZAmzVku9yg1A/NM12IxFYECOvdf5gdoR+bdVZ l//e0eik7Ot1yhSYn8tBnyh1osFWSmIM3+P8QXe4cw4vwvW/zJuxO9k3WgOHp3SVCsTkEBXfi R/7OQrCKHi9I1S/2FSTyNA1x2QRYzdMvN0gzMBigrundDhN+9k8s6eVVpunRc5cF30CptYnPK /KzjAVMWc+EKEhUxIihQuXVGmh/ZQ5fckiIbJpLu/ysPg3aRjQY4cavm7NtRwqWr+CGZuYFmK yKRrvvXFFBP6l+w3pt4bTM0505bYWewIIp5sDZxWzowM0Xx+DBaI/cMMDwlWuzm4mT/O922ft l5aRAWo9jeYZ7bmeYx0QprFTemgMkKYgjm+JXQR2OS7kp79Xam0h0lsicH15wZgTUQ3XMo5r9 aEAfAGkgke4CDNGEmzDdmksX6lHwCbXXET7EWmgo4ylINQj/EgkV0XvoanQ9fXsBM+EAhKkH8 54mtoGHeEo2HsokbJ4x7fB0aHg3MoR/C4+OEWlrR7Vi/nZQXRNoLLVPRboPqwf1Vl8GAKxRy8 qHP02O6yv0vC5eWKhLoujccWXLOQnKSFPw2Og+093dIaNmjwQLTAHRsyzHllukWvESXd9s0 Received-SPF: none client-ip=212.227.126.187; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/05 07:41:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" When we try to bootstrap debian/lenny for alpha, it fails because it cannot umount /.root directory: ... Setting up initscripts (2.86.ds1-61) ... umount: /.root: Function not implemented dpkg: error processing initscripts (--configure): subprocess post-installation script returned error exit status 1 dpkg: sysvinit: dependency problems, but configuring anyway as you request: sysvinit depends on initscripts; however: Package initscripts is not configured yet. This is because, when we switched from syscall_nr.h to syscall.tbl, the syscall #321 has been renamed from umount to oldumount and syscall.c has not been updated to manage the new name. oldumount has been introduced in linux 2.1.116pre1 by: 7d32756b2 ("Import 2.1.116pre1") ... * We now support a flag for forced unmount like the other 'big iron' * unixes. Our API is identical to OSF/1 to avoid making a mess of AMD ... Fixes: 6116aea994 ("linux-user, alpha: add syscall table generation support") Signed-off-by: Laurent Vivier Message-Id: <20200502194642.32823-1-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 05f03919ff07..e89b815ce983 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8028,8 +8028,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, } } return ret; -#ifdef TARGET_NR_umount +#if defined(TARGET_NR_umount) || defined(TARGET_NR_oldumount) +#if defined(TARGET_NR_umount) case TARGET_NR_umount: +#endif +#if defined(TARGET_NR_oldumount) + case TARGET_NR_oldumount: +#endif if (!(p = lock_user_string(arg1))) return -TARGET_EFAULT; ret = get_errno(umount(p));