NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/53261: kernel crash during test run



The following reply was made to PR kern/53261; it has been noted by GNATS.

From: Kamil Rytarowski <n54%gmx.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/53261: kernel crash during test run
Date: Wed, 23 May 2018 22:52:18 +0200

 This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
 --VAGr6XIuA4ktqKm49U8zNyFQGLz7kXPFe
 Content-Type: multipart/mixed; boundary="xrJlF4q2hDcueAvt6loYTNNV7OytxMXxU";
  protected-headers="v1"
 From: Kamil Rytarowski <n54%gmx.com@localhost>
 To: gnats-bugs%NetBSD.org@localhost
 Message-ID: <ff61209a-401e-cd49-ed02-ffb6a57b699a%gmx.com@localhost>
 Subject: Re: kern/53261: kernel crash during test run
 References: <pr-kern-53261%gnats.netbsd.org@localhost>
  <20180523143002.209937A21F%mollari.NetBSD.org@localhost>
 In-Reply-To: <20180523143002.209937A21F%mollari.NetBSD.org@localhost>
 
 --xrJlF4q2hDcueAvt6loYTNNV7OytxMXxU
 Content-Type: text/plain; charset=utf-8
 Content-Language: en-US
 Content-Transfer-Encoding: quoted-printable
 
 On 23.05.2018 16:30, Martin Husemann wrote:
 > The following reply was made to PR kern/53261; it has been noted by GNA=
 TS.
 >=20
 > From: Martin Husemann <martin%duskware.de@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc:=20
 > Subject: Re: kern/53261: kernel crash during test run
 > Date: Wed, 23 May 2018 16:27:07 +0200
 >=20
 >  On Wed, May 23, 2018 at 02:05:00PM +0000, Kamil Rytarowski wrote:
 >  >  I need to repeat that I agree that it's not optimal, if it works it=
 's
 >  >  not portable.
 > =20
 >  Our documentation states that it is wrong. Allowing it to work by pure=
 
 >  luck on i386 just hides the problem, where otherwise tests would
 >  quickly show the culprit.
 > =20
 >  Why is it so difficult to call __syscall instead of syscall for the fe=
 w
 >  cases where it is need? I completly don't get your point.
 > =20
 >  Martin
 > =20
 >=20
 
 The ARM and EABI case is mentioned in the GNU/Linux man-page:
 
 http://man7.org/linux/man-pages/man2/syscall.2.html
 
        For example, on the ARM architecture Embedded ABI (EABI), a 64-bit=
 
        value (e.g., long long) must be aligned to an even register pair.
        Thus, using syscall() instead of the wrapper provided by glibc, th=
 e
        readahead() system call would be invoked as follows on the ARM
        architecture with the EABI in little endian mode:
 
            syscall(SYS_readahead, fd, 0,
                    (unsigned int) (offset & 0xFFFFFFFF),
                    (unsigned int) (offset >> 32),
                    count);
 
        Since the offset argument is 64 bits, and the first argument (fd) =
 is
        passed in r0, the caller must manually split and align the 64-bit
        value so that it is passed in the r2/r3 register pair.  That means=
 
        inserting a dummy value into r1 (the second argument of 0).  Care
        also must be taken so that the split follows endian conventions
        (according to the C ABI for the platform).
 
        Similar issues can occur on MIPS with the O32 ABI, on PowerPC with=
 
        the 32-bit ABI, and on Xtensa.
 
 
 My point is that there is nothing better for "indirect system call" and
 outlawing it or deteriorating its functionality does not help to its
 legitimate users... they are already aware about the potential problems
 with ABI or endian.
 
 
 --xrJlF4q2hDcueAvt6loYTNNV7OytxMXxU--
 
 --VAGr6XIuA4ktqKm49U8zNyFQGLz7kXPFe
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"
 
 -----BEGIN PGP SIGNATURE-----
 
 iQJABAEBCAAqFiEELaxVpweEzw+lMDwuS7MI6bAudmwFAlsF1IIMHG41NEBnbXgu
 Y29tAAoJEEuzCOmwLnZsaoQP/3Z44Qzk3lMTTF1o1RpqoGQ7l6rp94ZndTJOnevC
 5qBLtKnAqNtDXLUtJuTGm4NZZD2DeBtQhQNIJhnKEZsGbp/ml2lOf9Rs+vbTP5ZA
 UmrSAzqyzMfRktqRnPVdQbOYEWbS0UPTYuuZ1NNIMsD7o404+KWGPiQPaDZWPSsW
 1xSLhFb3ltsGkTWupKIvM9FYJBIBvynyj/HdVov/+QgpMBPUVvepc2Dh9RkNyYK3
 ribMvJM55Te184UrWsjQGNzW+GlS1oYvKBclN193ecxrhvHCxhF+UbPXp8qzXpfa
 Ypbm4rt2qSUheBfCUOJHtFbKx8VtIH58w/x+1Uj6B7+AoynNNbwbSAhMfibR6shs
 SEPHoM8Rs/6d3TQeUmhLK+mfx8Ri0jcbRlzSmZ6FU9OoCJyXt+qEGlXwwfxoghtN
 lZ7Av3BfX5YIY00t46ahLEZu7YnLSdq1bliLZLj9QuyMJp+0NQB+8UqCgzSADn/A
 GHGnNsMsogzkcR+6PPaGQyqQlM4sOfr3W++2+jYSDY/UVvvV+OOb0LV0o/zRogZF
 CENHHGTtaj9i5C0lETgv03NFB6k2UYf2O/DsT/DMXpRzdDCWqqHf694/QMqIxwAj
 NRLN4i844i5uG4lwDmOzUovzxCYxqBzNyj97z7sM8N6NIET0iCt6+FnUMNNMO5Lp
 vZZP
 =MyBy
 -----END PGP SIGNATURE-----
 
 --VAGr6XIuA4ktqKm49U8zNyFQGLz7kXPFe--
 


Home | Main Index | Thread Index | Old Index