[v3,7/7] ia64: wire up system calls

Message ID 1539231895-4118-8-git-send-email-firoz.khan@linaro.org
State New
Headers show
Series
  • ia64: system call table generation support
Related show

Commit Message

Firoz Khan Oct. 11, 2018, 4:24 a.m.
wire up perf_event_open, seccomp, pkey_mprotect, pkey_alloc,
pkey_free, statx, io_pgetevents and rseq system calls

This require an architecture specific implementation as it not
present now.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>

---
 arch/ia64/kernel/syscalls/syscall.tbl | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

-- 
1.9.1

Comments

Arnd Bergmann Oct. 11, 2018, 7:24 a.m. | #1
On Thu, Oct 11, 2018 at 6:26 AM Firoz Khan <firoz.khan@linaro.org> wrote:
>

> wire up perf_event_open, seccomp, pkey_mprotect, pkey_alloc,

> pkey_free, statx, io_pgetevents and rseq system calls

>

> This require an architecture specific implementation as it not

> present now.

>

> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>

> ---

>  arch/ia64/kernel/syscalls/syscall.tbl | 16 ++++++++++++++++

>  1 file changed, 16 insertions(+)

>

> diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl

> index 6b64f60..1f42b60 100644

> --- a/arch/ia64/kernel/syscalls/syscall.tbl

> +++ b/arch/ia64/kernel/syscalls/syscall.tbl

> @@ -335,3 +335,19 @@

>  323     common  copy_file_range                 sys_copy_file_range

>  324     common  preadv2                         sys_preadv2

>  325     common  pwritev2                        sys_pwritev2

> +# perf_event_open requires an architecture specific implementation

> +326    common  perf_event_open                 sys_perf_event_open

> +# seccomp requires an architecture specific implementation

> +327    common  seccomp                         sys_seccomp


I don't think that's correct for these two. perf_event_open() of
course requires 'perf' support that ia64 does not have, but
at least seccomp should just work.

> +# pkey_mprotect requires an architecture specific implementation

> +328    common  pkey_mprotect                   sys_pkey_mprotect

> +# pkey_alloc requires an architecture specific implementation

> +329    common  pkey_alloc                      sys_pkey_alloc

> +# pkey_free requires an architecture specific implementation

> +330    common  pkey_free                       sys_pkey_free


One comment for all pkey calls would be sufficient. More importantly
it requires hardware support that ia64 does not have AFAICT.

> +# statx requires an architecture specific implementation

> +331    common  statx                           sys_statx

> +# io_pgetevents requires an architecture specific implementation

> +332    common  io_pgetevents                   sys_io_pgetevents


It certainly does not require any support from the architecture for these.

> +# rseq requires an architecture specific implementation

> +333    common  rseq                            sys_rseq


Maybe leave rseq and pkey_* commented out so we reserve
the number but don't add it for real? Maybe the ia64 maintainers
have a preference.

As asm-generic maintainer, I'd like to have the various asm/unistd.h
headers be as similar as possible and at least reserve all the
numbers even if we don't need the calls on a given architecture.

       Arnd
Firoz Khan Oct. 11, 2018, 8:35 a.m. | #2
Hi Arnd,

On Thu, 11 Oct 2018 at 12:55, Arnd Bergmann <arnd@arndb.de> wrote:
>

> On Thu, Oct 11, 2018 at 6:26 AM Firoz Khan <firoz.khan@linaro.org> wrote:

> >

> > wire up perf_event_open, seccomp, pkey_mprotect, pkey_alloc,

> > pkey_free, statx, io_pgetevents and rseq system calls

> >

> > This require an architecture specific implementation as it not

> > present now.

> >

> > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>

> > ---

> >  arch/ia64/kernel/syscalls/syscall.tbl | 16 ++++++++++++++++

> >  1 file changed, 16 insertions(+)

> >

> > diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl

> > index 6b64f60..1f42b60 100644

> > --- a/arch/ia64/kernel/syscalls/syscall.tbl

> > +++ b/arch/ia64/kernel/syscalls/syscall.tbl

> > @@ -335,3 +335,19 @@

> >  323     common  copy_file_range                 sys_copy_file_range

> >  324     common  preadv2                         sys_preadv2

> >  325     common  pwritev2                        sys_pwritev2

> > +# perf_event_open requires an architecture specific implementation

> > +326    common  perf_event_open                 sys_perf_event_open

> > +# seccomp requires an architecture specific implementation

> > +327    common  seccomp                         sys_seccomp

>

> I don't think that's correct for these two. perf_event_open() of

> course requires 'perf' support that ia64 does not have, but

> at least seccomp should just work.

>

> > +# pkey_mprotect requires an architecture specific implementation

> > +328    common  pkey_mprotect                   sys_pkey_mprotect

> > +# pkey_alloc requires an architecture specific implementation

> > +329    common  pkey_alloc                      sys_pkey_alloc

> > +# pkey_free requires an architecture specific implementation

> > +330    common  pkey_free                       sys_pkey_free

>

> One comment for all pkey calls would be sufficient. More importantly

> it requires hardware support that ia64 does not have AFAICT.

>

> > +# statx requires an architecture specific implementation

> > +331    common  statx                           sys_statx

> > +# io_pgetevents requires an architecture specific implementation

> > +332    common  io_pgetevents                   sys_io_pgetevents

>

> It certainly does not require any support from the architecture for these.

>

> > +# rseq requires an architecture specific implementation

> > +333    common  rseq                            sys_rseq

>

> Maybe leave rseq and pkey_* commented out so we reserve

> the number but don't add it for real? Maybe the ia64 maintainers

> have a preference.

>

> As asm-generic maintainer, I'd like to have the various asm/unistd.h

> headers be as similar as possible and at least reserve all the

> numbers even if we don't need the calls on a given architecture.

>


Thanks for your review.

Firoz

>        Arnd
Eugene Syromiatnikov Oct. 11, 2018, 3:06 p.m. | #3
On Thu, Oct 11, 2018 at 09:24:43AM +0200, Arnd Bergmann wrote:
> On Thu, Oct 11, 2018 at 6:26 AM Firoz Khan <firoz.khan@linaro.org> wrote:

> > +# perf_event_open requires an architecture specific implementation

> > +326    common  perf_event_open                 sys_perf_event_open

[...]
> 

> I don't think that's correct for these two. perf_event_open() of

> course requires 'perf' support that ia64 does not have


That's actuallt quite funny, given the fact that IA-64 has perfmonctl()
which likely was the precursor of current perf infractructure.

> > +# pkey_mprotect requires an architecture specific implementation

> > +328    common  pkey_mprotect                   sys_pkey_mprotect

> > +# pkey_alloc requires an architecture specific implementation

> > +329    common  pkey_alloc                      sys_pkey_alloc

> > +# pkey_free requires an architecture specific implementation

> > +330    common  pkey_free                       sys_pkey_free

> 

> One comment for all pkey calls would be sufficient. More importantly

> it requires hardware support that ia64 does not have AFAICT.


Except it has[1].

[1] https://www.thailand.intel.com/content/dam/www/public/us/en/documents/manuals/itanium-architecture-software-developer-rev-2-3-vol-2-manual.pdf#page=78
Arnd Bergmann Oct. 11, 2018, 3:09 p.m. | #4
On 10/11/18, Eugene Syromiatnikov <esyr@redhat.com> wrote:
> On Thu, Oct 11, 2018 at 09:24:43AM +0200, Arnd Bergmann wrote:

>> On Thu, Oct 11, 2018 at 6:26 AM Firoz Khan <firoz.khan@linaro.org> wrote:

>

>> > +# pkey_mprotect requires an architecture specific implementation

>> > +328    common  pkey_mprotect                   sys_pkey_mprotect

>> > +# pkey_alloc requires an architecture specific implementation

>> > +329    common  pkey_alloc                      sys_pkey_alloc

>> > +# pkey_free requires an architecture specific implementation

>> > +330    common  pkey_free                       sys_pkey_free

>>

>> One comment for all pkey calls would be sufficient. More importantly

>> it requires hardware support that ia64 does not have AFAICT.

>

> Except it has[1].

>


Ok, then we should definitely assign the system call numbers.

      Arnd

Patch

diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl
index 6b64f60..1f42b60 100644
--- a/arch/ia64/kernel/syscalls/syscall.tbl
+++ b/arch/ia64/kernel/syscalls/syscall.tbl
@@ -335,3 +335,19 @@ 
 323     common  copy_file_range                 sys_copy_file_range
 324     common  preadv2                         sys_preadv2
 325     common  pwritev2                        sys_pwritev2
+# perf_event_open requires an architecture specific implementation
+326	common	perf_event_open			sys_perf_event_open
+# seccomp requires an architecture specific implementation
+327	common	seccomp				sys_seccomp
+# pkey_mprotect requires an architecture specific implementation
+328	common	pkey_mprotect			sys_pkey_mprotect
+# pkey_alloc requires an architecture specific implementation
+329	common	pkey_alloc			sys_pkey_alloc
+# pkey_free requires an architecture specific implementation
+330	common	pkey_free			sys_pkey_free
+# statx requires an architecture specific implementation
+331	common	statx				sys_statx
+# io_pgetevents requires an architecture specific implementation
+332	common	io_pgetevents			sys_io_pgetevents
+# rseq requires an architecture specific implementation
+333	common	rseq				sys_rseq