From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10685 invoked by alias); 23 Jan 2013 05:05:19 -0000 Received: (qmail 10674 invoked by uid 22791); 23 Jan 2013 05:05:18 -0000 X-SWARE-Spam-Status: No, hits=-8.9 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Jan 2013 05:05:13 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 85A7133D3D9; Wed, 23 Jan 2013 05:05:12 +0000 (UTC) From: Mike Frysinger To: libc-ports@sourceware.org Subject: Re: [PATCH][BZ #15054] MIPS: Fix syscall wrappers for syscall restart support Date: Wed, 23 Jan 2013 05:05:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.7.1; KDE/4.6.5; x86_64; ; ) Cc: "Maciej W. Rozycki" References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3137486.URqJHVJYoo"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201301230009.23864.vapier@gentoo.org> X-IsSubscribed: yes Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00039.txt.bz2 --nextPart3137486.URqJHVJYoo Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 938 On Tuesday 22 January 2013 22:09:03 Maciej W. Rozycki wrote: > We have an issue with the INTERNAL_SYSCALL_NCS wrapper in that it does > not respect the kernel's syscall restart convention. >=20 > That convention requires the instruction immediately preceding SYSCALL to > initialize $v0 with the syscall number. Then if a restart triggers, $v0 > will have been clobbered by the syscall interrupted, and needs to be > reinititalized. The kernel will decrement the PC by 4 before switching > back to the user mode so that $v0 has been reloaded before SYSCALL is > executed again. This implies the place $v0 is loaded from must be > preserved across a syscall, e.g. an immediate, static register, stack > slot, etc. na=EFvely, but why can't the mips kernel paths take care of the reload itse= lf ?=20=20 other arches have scratch space in their pt_regs for doing just this (a bun= ch=20 of arches use the orig_ convention). -mike --nextPart3137486.URqJHVJYoo Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJQ/3CDAAoJEEFjO5/oN/WByeAP/j6XV+Pj92YP9vn3dgcw56Ow gYS6HsRWmASoi16nc1f2nBmnUBSEx3hmcIgMf6WkDjyMypV/j0Qo5YVo/T5aU7I8 RVCmzs1XZ8gkUE0GXXjEfLIJZBjBM7/ijEitSWlWaEvJLJqKDr053q6xbtQSRi04 fIVce5zJpenPHCJSn+m/BRAbBbYXlc2ZdsjMjZ517/8HZDZea79hPRKofdwI59CY FPHncK6anATRumt3gnASLaAINd6Fta5i1AYVskIf5x6MqOKgf4i0V10MnKRpcPF8 SpV6JwEiZ9VO9YJw/y0AF29m93xnxZWtjfKPB0It+t9OijcE6sLG6ewPndCCis1A q7/47UjH8u93yJ4W84F0qrXbkhmqqQy/3K0pQvXtmQLAUYJE7hrEuo4WLjM+FyqV WXr0jtJJcj6aSwdzAsfk5jUrLePIDz94qytlyiR6kRq1ox5kzt5UEPJWcMSE+8RZ lUS1wRQANM/5F9agR2Hg+Rz/YRR6GckxSKu+hSYaF2uCL58lm3cT3Ca/BtSwZCX6 LGR94I11a7eIyr+e8u/BTXOJF9XRfYXU8N6fNcmga5Qbqq0MtbLa5stNQYXqWhD3 F4XX/CUa/HHBVtJOJFDIRAf1mVIM3JZTqKqik5FiMx+yrA/DGXqHjOGSGGHEsVPP S6u2yWn6eeirMtBt9AIJ =/xAM -----END PGP SIGNATURE----- --nextPart3137486.URqJHVJYoo--