With endian switch disabled by default the ppc64le compat supports
ppc32le only which is something next to nobody has binaries for.
Less code means less bugs so drop the compat stuff.
I am not particularly sure about the best way to resolve the llseek
situation. I don't see anything in the syscal tables making it
32bit-only so I suppose it should be available on 64bit as well.
This is tested on ppc64le top of
https://patchwork.ozlabs.org/cover/1153556/
Changes in v2: saner CONFIG_COMPAT ifdefs
Thanks
Michal
Michal Suchanek (4):
fs: always build llseek.
powerpc: move common register copy functions from signal_32.c to
signal.c
powerpc/64: make buildable without CONFIG_COMPAT
powerpc/64: Disable COMPAT if littleendian.
arch/powerpc/Kconfig | 2 +-
arch/powerpc/include/asm/syscall.h | 2 +
arch/powerpc/kernel/Makefile | 15 ++-
arch/powerpc/kernel/entry_64.S | 2 +
arch/powerpc/kernel/signal.c | 146 ++++++++++++++++++++++++++++-
arch/powerpc/kernel/signal_32.c | 140 ---------------------------
arch/powerpc/kernel/syscall_64.c | 5 +-
arch/powerpc/kernel/vdso.c | 4 +-
arch/powerpc/perf/callchain.c | 14 ++-
fs/read_write.c | 2 -
10 files changed, 177 insertions(+), 155 deletions(-)
--
2.22.0
Michal Suchanek's on August 28, 2019 8:30 pm:
> With endian switch disabled by default the ppc64le compat supports
> ppc32le only which is something next to nobody has binaries for.
>
> Less code means less bugs so drop the compat stuff.
Interesting patches, thanks for looking into it. I don't know much
about compat and wrong endian userspaces. I think sys_switch_endian
is enabled though, it's just a strange fast endian swap thing that
has been disabled by default.
The first patches look pretty good. Maybe for the last one it could
become a selectable option?
> I am not particularly sure about the best way to resolve the llseek
> situation. I don't see anything in the syscal tables making it
> 32bit-only so I suppose it should be available on 64bit as well.
It's for 32-bit userspace only. Can we just get rid of it, or is
there some old broken 64-bit BE userspace that tries to call it?
Thanks,
Nick
On 08/28/2019 10:30 AM, Michal Suchanek wrote:
> With endian switch disabled by default the ppc64le compat supports
> ppc32le only which is something next to nobody has binaries for.
>
> Less code means less bugs so drop the compat stuff.
>
> I am not particularly sure about the best way to resolve the llseek
> situation. I don't see anything in the syscal tables making it
> 32bit-only so I suppose it should be available on 64bit as well.
>
> This is tested on ppc64le top of
Really ?
I get a build failure with ppc64_defconfig + LITTLE_ENDIAN :
CC arch/powerpc/kernel/signal.o
arch/powerpc/kernel/signal.c: In function 'do_signal':
arch/powerpc/kernel/signal.c:250:6: error: unused variable 'is32'
[-Werror=unused-variable]
int is32 = is_32bit_task();
^~~~
cc1: all warnings being treated as errors
make[3]: *** [arch/powerpc/kernel/signal.o] Error 1
Christophe
>
> https://patchwork.ozlabs.org/cover/1153556/
>
> Changes in v2: saner CONFIG_COMPAT ifdefs
>
> Thanks
>
> Michal
>
> Michal Suchanek (4):
> fs: always build llseek.
> powerpc: move common register copy functions from signal_32.c to
> signal.c
> powerpc/64: make buildable without CONFIG_COMPAT
> powerpc/64: Disable COMPAT if littleendian.
>
> arch/powerpc/Kconfig | 2 +-
> arch/powerpc/include/asm/syscall.h | 2 +
> arch/powerpc/kernel/Makefile | 15 ++-
> arch/powerpc/kernel/entry_64.S | 2 +
> arch/powerpc/kernel/signal.c | 146 ++++++++++++++++++++++++++++-
> arch/powerpc/kernel/signal_32.c | 140 ---------------------------
> arch/powerpc/kernel/syscall_64.c | 5 +-
> arch/powerpc/kernel/vdso.c | 4 +-
> arch/powerpc/perf/callchain.c | 14 ++-
> fs/read_write.c | 2 -
> 10 files changed, 177 insertions(+), 155 deletions(-)
>
On Wed, 28 Aug 2019 13:08:48 +0000
Christophe Leroy <[email protected]> wrote:
> On 08/28/2019 10:30 AM, Michal Suchanek wrote:
> > With endian switch disabled by default the ppc64le compat supports
> > ppc32le only which is something next to nobody has binaries for.
> >
> > Less code means less bugs so drop the compat stuff.
> >
> > I am not particularly sure about the best way to resolve the llseek
> > situation. I don't see anything in the syscal tables making it
> > 32bit-only so I suppose it should be available on 64bit as well.
> >
> > This is tested on ppc64le top of
>
> Really ?
Really. It boots with the unused variable. It might depend on some
config options or gcc features if unused variables are fatal.
Thanks
Michal
On Wed, 28 Aug 2019 20:57:48 +1000
Nicholas Piggin <[email protected]> wrote:
> Michal Suchanek's on August 28, 2019 8:30 pm:
> > With endian switch disabled by default the ppc64le compat supports
> > ppc32le only which is something next to nobody has binaries for.
> >
> > Less code means less bugs so drop the compat stuff.
>
> Interesting patches, thanks for looking into it. I don't know much
> about compat and wrong endian userspaces. I think sys_switch_endian
> is enabled though, it's just a strange fast endian swap thing that
> has been disabled by default.
>
> The first patches look pretty good. Maybe for the last one it could
> become a selectable option?
That sounds good.
>
>
> > I am not particularly sure about the best way to resolve the llseek
> > situation. I don't see anything in the syscal tables making it
> > 32bit-only so I suppose it should be available on 64bit as well.
>
> It's for 32-bit userspace only. Can we just get rid of it, or is
> there some old broken 64-bit BE userspace that tries to call it?
That sounds like a bug in creating these unified syscall tables then.
On architectures that have split tables the 64bit ones do not have
llseek. On architectures with one table the syscall is marked as common.
Thanks
Michal