RE: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-17 Thread David Laight
From: Christoph Hellwig > Sent: 16 January 2021 09:07 ... > > I personally would like to see in_compat_syscall() go away, > > but some other people (Hi, Christoph!) disagree, and usage seems to be > > increasing, not decreasing. > > I'm absolutely against it going away. in_compat_syscall helped

Re: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-16 Thread Christoph Hellwig
On Fri, Jan 15, 2021 at 04:07:46PM -0800, Andy Lutomirski wrote: > Finally, I'm not convinced that this patch works correctly. We have > in_compat_syscall(), and code that uses it may well be reachable from > ioctl. ioctls are the prime user of in_compat_syscall(). > I personally would like to

Re: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-15 Thread Andy Lutomirski
On Fri, Jan 15, 2021 at 1:03 AM Arnd Bergmann wrote: > > On Fri, Jan 15, 2021 at 3:06 AM Ryan Houdek wrote: > > On Wed, Jan 6, 2021 at 12:49 AM Arnd Bergmann wrote: > >> On Wed, Jan 6, 2021 at 7:48 AM wrote: > >> > From: Ryan Houdek > >> ... > >> > >> For x86, this has another complication,

Re: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-15 Thread Rich Felker
On Fri, Jan 15, 2021 at 11:17:09PM +0100, Arnd Bergmann wrote: > On Fri, Jan 15, 2021 at 9:01 PM David Laight wrote: > > > > From: sonicadvan...@gmail.com > > > Sent: 15 January 2021 07:03 > > > Problem presented: > > > A backwards compatibility layer that allows running x86-64 and x86 > > >

RE: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-15 Thread David Laight
... > He's already doing the system call emulation for all the system > calls other than ioctl in user space though. In my experience, > there are actually fairly few ioctl commands that are different > between architectures -- most of them have no misaligned > or architecture-defined struct

Re: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-15 Thread Arnd Bergmann
On Fri, Jan 15, 2021 at 9:01 PM David Laight wrote: > > From: sonicadvan...@gmail.com > > Sent: 15 January 2021 07:03 > > Problem presented: > > A backwards compatibility layer that allows running x86-64 and x86 > > processes inside of an AArch64 process. > > - CPU is emulated > > - Syscall

RE: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-15 Thread David Laight
From: sonicadvan...@gmail.com > Sent: 15 January 2021 07:03 > Problem presented: > A backwards compatibility layer that allows running x86-64 and x86 > processes inside of an AArch64 process. > - CPU is emulated > - Syscall interface is mostly passthrough > - Some syscalls require patching

Re: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-15 Thread Arnd Bergmann
On Fri, Jan 15, 2021 at 3:06 AM Ryan Houdek wrote: > On Wed, Jan 6, 2021 at 12:49 AM Arnd Bergmann wrote: >> On Wed, Jan 6, 2021 at 7:48 AM wrote: >> > From: Ryan Houdek >> ... >> >> For x86, this has another complication, as some ioctls also need to >> check whether they are in an ia32 task

[PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-14 Thread sonicadvance1
From: Ryan Houdek Problem presented: A backwards compatibility layer that allows running x86-64 and x86 processes inside of an AArch64 process. - CPU is emulated - Syscall interface is mostly passthrough - Some syscalls require patching or emulation depending on behaviour - Not viable

Re: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-14 Thread Ryan Houdek
On Wed, Jan 6, 2021 at 12:49 AM Arnd Bergmann wrote: > > On Wed, Jan 6, 2021 at 7:48 AM wrote: > > From: Ryan Houdek > ... > > This does not solve the following problems: > > 1) compat_alloc_user_space inside ioctl > > 2) ioctls that check task mode instead of entry point for behaviour > > 3)

Re: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-06 Thread Amanieu d'Antras
I encountered a similar problem when writing the Tango binary translator (https://www.amanieusystems.com/). Tango allows AArch32 programs to run on AArch64 CPUs that don't support AArch32 (e.g. ThunderX). The technology has been licensed to several customers who are primarily using it to run

Re: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-06 Thread Arnd Bergmann
On Wed, Jan 6, 2021 at 7:48 AM wrote: > From: Ryan Houdek ... > This does not solve the following problems: > 1) compat_alloc_user_space inside ioctl > 2) ioctls that check task mode instead of entry point for behaviour > 3) ioctls allocating memory > 4) struct packing problems between

[PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-05 Thread sonicadvance1
From: Ryan Houdek Problem presented: A backwards compatibility layer that allows running x86-64 and x86 processes inside of an AArch64 process. - CPU is emulated - Syscall interface is mostly passthrough - Some syscalls require patching or emulation depending on behaviour - Not viable