From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vmicros1.altlinux.org ([194.107.17.57]:54988 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751929AbdCHXpX (ORCPT ); Wed, 8 Mar 2017 18:45:23 -0500 Date: Thu, 9 Mar 2017 02:41:54 +0300 From: "Dmitry V. Levin" To: Denys Vlasenko , Linus Torvalds Cc: Indan Zupancic , Oleg Nesterov , Andi Kleen , Jamie Lokier , Andrew Lutomirski , Will Drewry , linux-kernel@vger.kernel.org, keescook@chromium.org, john.johansen@canonical.com, serge.hallyn@canonical.com, coreyb@linux.vnet.ibm.com, pmoore@redhat.com, eparis@redhat.com, djm@mindrot.org, segoon@openwall.com, rostedt@goodmis.org, jmorris@namei.org, scarybeasts@gmail.com, avi@redhat.com, penberg@cs.helsinki.fi, viro@zeniv.linux.org.uk, mingo@elte.hu, akpm@linux-foundation.org, khilman@ti.com, borislav.petkov@amd.com, amwang@redhat.com, ak@linux.intel.com, eric.dumazet@gmail.com, gregkh@suse.de, dhowells@redhat.com, daniel.lezcano@free.fr, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, olofj@chromium.org, mhalcrow@google.com, dlaor@redhat.com, Roland McGrath Subject: Re: Compat 32-bit syscall entry from 64-bit task!? Message-ID: <20170308234154.GA2352@altlinux.org> References: <201201260032.57937.vda.linux@googlemail.com> <201201260209.54513.vda.linux@googlemail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=x-unknown; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Jan 26, 2012 at 07:03:43PM +0100, Denys Vlasenko wrote: > Hi Linus, >=20 > On Thu, Jan 26, 2012 at 4:47 AM, Linus Torvalds > wrote: > >> Please look at strace source, get_scno() function, where > >> it reads syscall no and parameters. Let's see.... > >> - POWERPC: has 32-bit and 64-bit mode > >> - X86_64: has 32-bit and 64-bit mode > >> - IA64: has i386-compat mode > >> - ARM: has more than one ABI > >> - SPARC: has 32-bit and 64-bit mode > >> > >> Do you want to re-invent a different arch-specific way to report > >> syscall type for each of these arches? > > > > I think an arch-specific one is better than trying to make some > > generic one that is messy. > > > > As you say, many architectures have multiple system call ABIs. > > > > But they tend to be very *different* issues. They can be about > > multiple ABI's, as you mention, and even when they *look* similar > > (32-bit vs 64-bit ABI's) they are actually totally different issues. > > [skip] >=20 > I don't have a particular attachment to my solution, > and I think we already talk about this problem for > far too long. >=20 > Looks like nobody is _strongly_ opposed to your patch > which uses a few bits in eflags to report bitness > of the x86 syscall. >=20 > Lets just do that already. If you commit it to kernel git, > I will immediately change strace accordingly. Is there any progress with this (or any alternative) solution? I see the kernel side has changed a bit, and the strace part is in a better shape than 5 years ago (although I'm biased of course), but I don't see any kernel interface that would allow strace to reliably recognize this 0x80 case. --=20 ldv --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iQIbBAEBCAAGBQJYwJbCAAoJEAVFT+BVnCUIsxUP93MGX6DjC05FLZxzCk2K8jiX jsSTJK/1oYUp4DMWEZ1fhQ3larF2iI/q1j+BZg0IVpsKoZQ3BVF/aX71hU9MhVUS p3EKGe+yz401My1wWuk3hRlRn8FVLeMRdpFisxU/atAykVMyWqZL2X7Mhc0KowhV opNY4eFGgE2TEjzsLrYsnPWp6ttAcfUWr6Ea01MGAJXc+Wfv1LZUutosrtGb19nU xMEIgqBfpg5brfOWcykPhzREaBh5WlAd9Cbx82MuQrGbbpzd1/b8kyS9XyY9X1cU CcLn8A3aX+dnGSrZ+3k9bT6Row55O/8zl9RZZ6vdOgm18ydHFHMwyzWmIs/RHBSj 4VEjL9NVRxgb9hZEJ8eR4QokMMTzqz9ls0iDJYHrniJfjSj/q6Hxa60dJ+D57MjN SGoyfSbhnPoKH1WO6dyH8OTguef8NJlBawuHX9adjukQRioyudznqnfKMPJEZ2kW o2QDT5Rv58IUh7UAUNyMxitAFB37xGPegXmRWFsSIqw98XbdK0J1GYq8EvaXtxhW QBNOhijskucAD0B88gM7HS8vcKrQ+QGysfad5rRkt5+kd0b3Rhw+RMb5u4MGHEc6 32I2ZceUGTX/Rmoo2X8uVC+n/yQ57vxeku5SJZ6NIEIUMW2e2WQFB8UWvfRnFU8a 1ROT00wXeTQdM4P7Rkc= =j+A8 -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l--