From: Ryan Houdek <houdek.ryan@fex-emu.org> To: David Laight <David.Laight@aculab.com> Cc: Arnd Bergmann <arnd@kernel.org>, "Amanieu d'Antras" <amanieu@gmail.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Steven Price <steven.price@arm.com>, Mark Brown <broonie@kernel.org>, Linux ARM <linux-arm-kernel@lists.infradead.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org> Subject: Re: [RESEND PATCH v4 8/8] arm64: Allow 64-bit tasks to invoke compat syscalls Date: Tue, 18 May 2021 15:41:47 -0700 [thread overview] Message-ID: <CAPpY1unphfjA_dEi+aGWmRGGeCwGs8M-P=hf-zf63RxP5dfWJw@mail.gmail.com> (raw) In-Reply-To: <3cb1d369e5e8431284e527e3e74fa6f2@AcuMS.aculab.com> On Tue, May 18, 2021 at 1:26 PM David Laight <David.Laight@aculab.com> wrote: > > From: Arnd Bergmann > > Sent: 18 May 2021 14:02 > ... > > > > I'm still undecided about this approach. It is an easy way to expose the 32-bit > > ABIs, it mostly copies what x86-64 already does with 32-bit syscalls and > > it doesn't expose a lot of attack surface that isn't already exposed to normal > > 32-bit tasks running compat mode. > > > > On the other hand, exposing the entire aarch32 syscall set seems both > > too broad and not broad enough: Half of the system calls behave the > > exact same way in native and compat mode, so they wouldn't need to > > be exposed like this, a lot of others are trivially emulated in user space > > by calling the native versions. The syscalls that are actually hard to do > > such as ioctl() or the signal handling will work for aarch32 emulation, but > > they are still insufficient to correctly emulate other 32-bit architectures > > that have a slightly different ABI. This means the interface is a fairly good > > fit for Tango, but much less so for FEX. > > To my mind because the kernel already contains the emulation code > there isn't much point trying to replicate it in userspace. > > OTOH I think they are trying to emulate x86 system calls not arm ones. > So the structure layouts don't always match. > However it is probably a lot nearer than the 64bit arm. Take care not to conflate the Tango and FEX project needs here. Tango is doing aarch32->aarch64 translation. So they are translating aarch32 syscalls. FEX is doing {x86, x86-64}->aarch64 translation. The simplicity of the interface helps Tango more than FEX in this regard. Since FEX likely still needs userspace fixups to *some* structures. > > Whether including some of the 'x32' code in an arm kernel will > help is another matter - it might be a useful source of differences. > > Am I also right in thinking that this isn't actually needed as part > of a 'generic' ARM kernel? Just ones for some specific platforms? This isn't correct from FEX's viewpoint. FEX isn't a product that will be shipping on any specific platform; The user is expected to just install FEX on their ARMv8.0+ device of choice. After they install FEX then they will freely be able to install *any* x86/x86-64 software and run it. The primary target is running full fledged games from the user's Steam library, but it can be anything the user desires. For context we have users running FEX on Lenovo c630, Apple M1, HardKernel SBCs, and recently some randomly picked Android devices. I can't speak on Tango's behalf here since I don't know their user ecosystem. > > David > > (Oh - I'm not involved in the project and will probably never use it.) > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-05-18 22:43 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-18 9:06 [RESEND PATCH v4 0/8] " Amanieu d'Antras 2021-05-18 9:06 ` [RESEND PATCH v4 1/8] mm: Add arch_get_mmap_base_topdown macro Amanieu d'Antras 2021-05-18 9:06 ` [RESEND PATCH v4 2/8] hugetlbfs: Use arch_get_mmap_* macros Amanieu d'Antras 2021-05-18 9:06 ` [RESEND PATCH v4 3/8] mm: Support mmap_compat_base with the generic layout Amanieu d'Antras 2021-05-18 9:06 ` [RESEND PATCH v4 4/8] arm64: Separate in_compat_syscall from is_compat_task Amanieu d'Antras 2021-05-18 9:06 ` [RESEND PATCH v4 5/8] arm64: mm: Use HAVE_ARCH_COMPAT_MMAP_BASES Amanieu d'Antras 2021-05-18 9:06 ` [RESEND PATCH v4 6/8] arm64: Add a compat syscall flag to thread_info Amanieu d'Antras 2021-05-18 9:06 ` [RESEND PATCH v4 7/8] arm64: Forbid calling compat sigreturn from 64-bit tasks Amanieu d'Antras 2021-05-18 9:06 ` [RESEND PATCH v4 8/8] arm64: Allow 64-bit tasks to invoke compat syscalls Amanieu d'Antras 2021-05-18 13:02 ` Arnd Bergmann 2021-05-18 20:26 ` David Laight 2021-05-18 22:41 ` Ryan Houdek [this message] 2021-05-18 23:51 ` Amanieu d'Antras 2021-05-19 15:30 ` Steven Price 2021-05-19 16:14 ` Amanieu d'Antras 2021-05-21 8:51 ` Steven Price 2021-05-21 19:18 ` Amanieu d'Antras 2021-05-24 11:20 ` Steven Price 2021-05-24 12:38 ` David Laight 2021-05-18 23:52 ` Ryan Houdek
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAPpY1unphfjA_dEi+aGWmRGGeCwGs8M-P=hf-zf63RxP5dfWJw@mail.gmail.com' \ --to=houdek.ryan@fex-emu.org \ --cc=David.Laight@aculab.com \ --cc=amanieu@gmail.com \ --cc=arnd@kernel.org \ --cc=broonie@kernel.org \ --cc=catalin.marinas@arm.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=steven.price@arm.com \ --cc=will@kernel.org \ --subject='Re: [RESEND PATCH v4 8/8] arm64: Allow 64-bit tasks to invoke compat syscalls' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).