Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2157556ybe; Sat, 14 Sep 2019 08:55:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzphSoqXsA5eUZDL/Yw73bV3N0TAFKYDGKK0P30xR9tPDdS7p83BrDQW5842t5f3YUQfUdx X-Received: by 2002:a17:906:129b:: with SMTP id k27mr41798804ejb.42.1568476510419; Sat, 14 Sep 2019 08:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568476510; cv=none; d=google.com; s=arc-20160816; b=uLDYDMXidiDVCqwHOmekI1tlh/S3JuHLXeyuC+Bwq8JLPNsoJSaMeZkdQSwQhIC9Xq qbQq5W7tefu5nzxyV+KOAofOs5cxw39KREttMv2+PBUshSCy6szOPvGWr/N/btin5mg9 unTftHMgHDIBzUp3OXRi8dYHv8wI4fI3my6SUOubL7LHZ6nvW4gyULBnrjvVX9GEDHmu hGU3DFs9ydyjgiEJV2f+e09hbAXkIrjITgAIGLwk9I86UsK384+5AElpVpBSgwOy1NTy h6tQsmMPopmptADfJbt4wlREP+O/rHC/DuEazk1QhHBQ9oGnUKv0vx8r6LRQie2nd4Ie Obhg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=4rsCfALVQNvKvEz2Ak08rF5U98O8OiIDPj3+ebUvgNk=; b=skqxZiMT7vMdPZC7HASeWHndrxT+zG0PNoNcw08D1kTS+54kKJ2L4bc0C7qGZxy/N3 Wzejjh4k2iaVHRCCUycbhQ8X9uUDyWK8uZjvCoYEwN2qCkmxj5l/IazCX4icF67tnmKo 1q5xAryh44Oo/jKhvkXqSY0c1aqasnPD1u9hgkS89S0sriJ3qe0F+OUplMjMvvDzFmvH aG+6bT48MPUAj27kXSOmaG7JeDAm2yFOy3xO5W/Rx7iW+pEDE/NiJMwtsjb4Yp7zSmA8 oDF5bFaNBJ3hy2ib0ScYT1JsLTsrwcUuPb9ntIVGB+PeCzjeqWvu6RDZXdMNTxgfui9E 7SXg== ARC-Authentication-Results: i=1; mx.google.com; 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 z2si18770442edq.361.2019.09.14.08.54.45; Sat, 14 Sep 2019 08:55:10 -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; 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 S1728784AbfINKWJ convert rfc822-to-8bit (ORCPT + 99 others); Sat, 14 Sep 2019 06:22:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:48768 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726313AbfINKWJ (ORCPT ); Sat, 14 Sep 2019 06:22:09 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CD0AAB012; Sat, 14 Sep 2019 10:22:06 +0000 (UTC) Date: Sat, 14 Sep 2019 12:22:02 +0200 From: Michal =?UTF-8?B?U3VjaMOhbmVr?= To: Michael Ellerman 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. Message-ID: <20190914122202.307707c0@naga> In-Reply-To: <87h85us0xy.fsf@mpe.ellerman.id.au> References: <87ftlftpy7.fsf@mpe.ellerman.id.au> <20190902114239.32bd81f4@naga> <87h85us0xy.fsf@mpe.ellerman.id.au> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 03 Sep 2019 10:00:57 +1000 Michael Ellerman wrote: > Michal Suchánek writes: > > On Mon, 02 Sep 2019 12:03:12 +1000 > > Michael Ellerman wrote: > > > >> Michal Suchanek writes: > >> > On bigendian ppc64 it is common to have 32bit legacy binaries but much > >> > less so on littleendian. > >> > >> 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. > > > > 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. > > What software is that? The only one I have seen is stockfish (v9) > > > Also it has been pointed out that you can still switch to BE even with > > the 'fast-switch' removed. > > Yes we have a proper syscall for endian switching, sys_switch_endian(), > which is definitely supported. > > 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. Thanks Michal