Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6228033ybe; Tue, 17 Sep 2019 23:22:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzuE/tZM5h7XDr5m249KHAp2RxonlGXAHXdRS1CGGAvbxVlOFeew4TmnpdQSIwUqoX1Bzkc X-Received: by 2002:a50:cf0d:: with SMTP id c13mr8394761edk.125.1568787732897; Tue, 17 Sep 2019 23:22:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568787732; cv=none; d=google.com; s=arc-20160816; b=ysMLuLChanxrMNQEaF9NGKCEPj9E5lVqzW1LuMxJPQzFRn8PgmgU2hRIk1fz0lopnp mroimbB03KJNd0kEOSAIDQv/v3OL3H/g+/dIqPh/pmkXzHx4LpYqY3NYY5/ag4XjophT fBkw9f+uOwkkpqr2qOwcsJnadrpNPVQ/c+HKKbEJ9CvyqSNqEPi7Y5z5o/UiM3ht2PJ+ bMd7tVo5LeKvRLIzTbQGB9vwy1KCsYONFlvBBDs4ZR0WrMos7IsZH2IYJ76nwU79/H9O KlyN9vKR3O8EdHJ8F5Hoi8xPbCkhZCl3yZRZBz8MEaUU2jtVjOCy9pgOBK1zCOWnmkeh IHPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=XONv0lmG8SzM9FYRLrJsQD1RWVI126tcLqZ1byAJHws=; b=MXn/K8a0MBNRafWOmB13tDoSK8k0W15R4FkLIlCke7GtqPv9fCHOU1VDamF7u3quxH HYU9ubKA6xwc1nQBFvCz+gX9IPri91zSbf0YgDMtLHP42WYvNlWdfvVx03gxKuxYasFW s3/924Tx3OAf7kS+CLtnAZWqclUEgMyOXwOMQjU4/E4qhPvE8FOB3UIm/YNtVNRwynwo AmIdl26diM7l1RNQjh+ixbKu8FfWv11k5EMAkGPvaa+AoXPU+NAjOx1kYCkhMjU3xR+t Ekh2wcDZLxjOV+xWD/pUjho5X8xg3ahDQ5fBKO4i+/xn2l3x/YyzuYGSzP/2ZKftuYzL 3FyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=plu+urg0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h28si2598153edh.278.2019.09.17.23.21.50; Tue, 17 Sep 2019 23:22:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=plu+urg0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727868AbfIRFgd (ORCPT + 99 others); Wed, 18 Sep 2019 01:36:33 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:56433 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727315AbfIRFgd (ORCPT ); Wed, 18 Sep 2019 01:36:33 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 46Y7y126Fcz9sN1; Wed, 18 Sep 2019 15:36:25 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1568784990; bh=XONv0lmG8SzM9FYRLrJsQD1RWVI126tcLqZ1byAJHws=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=plu+urg0VZ0Mvxe/kzzACLhTWIu/yacBrbgF6h8XwV4W3Eu80JC8VZaX4tN2DZvRl HFlUbyF/1YVvgnNFss0LDm4/t/t28cVnVJP4hGvyTFWTDYRI4XyKEaRJT7LKZlbxoe +apQCBJWfl67rVEEB7YTQO1u/vtW8ldL0BxL6YpOKLqum288PgU1S2LomvuUXoI5kZ AY7D2YbK+AReYVsv5PgY7LbvVGKsP1kTlFHKdh/3i03tAJXNWBaQZiDZTLnOlpTw25 U8+8YivAYeKtK0zjGqPQyPaiGyisMgyetsYGXxBpHj4NQboRZlJPTW4qBQWeOylzqr QL0eLF2Lm2vuA== From: Michael Ellerman To: Michal =?utf-8?Q?Such=C3=A1nek?= Cc: Michael Neuling , Madhavan Srinivasan , Andrew Donnellan , Arnd Bergmann , David Hildenbrand , Greg Kroah-Hartman , Heiko Carstens , linux-kernel@vger.kernel.org, Nicholas Piggin , "Eric W. Biederman" , Diana Craciun , Paul Mackerras , Joel Stanley , Allison Randal , Breno Leitao , Firoz Khan , Thomas Gleixner , linuxppc-dev@lists.ozlabs.org, Andrew Morton , Hari Bathini , Alexander Viro Subject: Re: [PATCH v7 5/6] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default. In-Reply-To: <20190914122202.307707c0@naga> References: <87ftlftpy7.fsf@mpe.ellerman.id.au> <20190902114239.32bd81f4@naga> <87h85us0xy.fsf@mpe.ellerman.id.au> <20190914122202.307707c0@naga> Date: Wed, 18 Sep 2019 15:36:24 +1000 Message-ID: <87k1a6w4h3.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michal Such=C3=A1nek writes: > On Tue, 03 Sep 2019 10:00:57 +1000 > Michael Ellerman wrote: >> Michal Such=C3=A1nek writes: >> > On Mon, 02 Sep 2019 12:03:12 +1000 >> > Michael Ellerman wrote: >> >=20=20 >> >> Michal Suchanek writes:=20=20 >> >> > On bigendian ppc64 it is common to have 32bit legacy binaries but m= uch >> >> > less so on littleendian.=20=20=20=20 >> >>=20 >> >> I think the toolchain people will tell you that there is no 32-bit >> >> little endian ABI defined at all, if anything works it's by accident.= =20=20 >> > >> > I have seen a piece of software that workarounds code issues on 64bit >> > by always compiling 32bit code. So it does work in some way.=20=20 >>=20 >> What software is that? > > The only one I have seen is stockfish (v9) OK, not sure how many people are testing that on powerpc :) >> > Also it has been pointed out that you can still switch to BE even with >> > the 'fast-switch' removed.=20=20 >>=20 >> Yes we have a proper syscall for endian switching, sys_switch_endian(), >> which is definitely supported. >>=20 >> But that *only* switches the endian-ness of the process, it does nothing >> to the syscall layer. So any process that switches to the other endian >> must endian flip syscall arguments (that aren't in registers), or flip >> back to the native endian before calling syscalls. > > In other words just installing a chroot of binaries built for the other > endian won't work. You need something like qemu to do the syscall > translation or run full VM with a kernel that has the swapped endian > syscall ABI. Yes that's right. cheers