Re: [PATCH v4 1/4] powerpc: make llseek 32bit-only.

From: Michal SuchÃnek
Date: Thu Aug 29 2019 - 08:37:24 EST


On Thu, 29 Aug 2019 14:19:46 +0200
Arnd Bergmann <arnd@xxxxxxxx> wrote:

> On Thu, Aug 29, 2019 at 12:23 PM Michal Suchanek <msuchanek@xxxxxxx> wrote:
> >
> > Fixes: aff850393200 ("powerpc: add system call table generation support")
>
> This patch needs a proper explanation. The Fixes tag doesn't seem right
> here, since ppc64 has had llseek since the start in 2002 commit 3939e37587e7
> ("Add ppc64 support. This includes both pSeries (RS/6000) and iSeries
> (AS/400).").
>
> > diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl b/arch/powerpc/kernel/syscalls/syscall.tbl
> > index 010b9f445586..53e427606f6c 100644
> > --- a/arch/powerpc/kernel/syscalls/syscall.tbl
> > +++ b/arch/powerpc/kernel/syscalls/syscall.tbl
> > @@ -188,7 +188,7 @@
> > 137 common afs_syscall sys_ni_syscall
> > 138 common setfsuid sys_setfsuid
> > 139 common setfsgid sys_setfsgid
> > -140 common _llseek sys_llseek
> > +140 32 _llseek sys_llseek
> > 141 common getdents sys_getdents compat_sys_getdents
> > 142 common _newselect sys_select compat_sys_select
> > 143 common flock sys_flock
>
> In particular, I don't see why you single out llseek here, but leave other
> syscalls that are not needed on 64-bit machines such as pread64().

Because llseek is not built in fs/ when building 64bit only causing a
link error.

I initially posted patch to build it always but it was pointed out it
is not needed, and the interface does not make sense on 64bit, and
that platforms that don't have it on 64bit now don't want that useless
code.

Thanks

Michal