[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKEwX=NW=sHAkQQw3TPA5tK9O+MC9AwX05=Wp8DRFbRZ4w-JAg@mail.gmail.com>
Date: Wed, 10 May 2023 16:20:53 -0700
From: Nhat Pham <nphamcs@...il.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Johannes Weiner <hannes@...xchg.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, bfoster@...hat.com,
Matthew Wilcox <willy@...radead.org>,
linux-api@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH v13 2/3] cachestat: implement cachestat syscall
On Sat, May 6, 2023 at 10:35 AM Arnd Bergmann <arnd@...db.de> wrote:
>
> On Fri, May 5, 2023, at 22:34, Andrew Morton wrote:
> > On Thu, 4 May 2023 19:26:11 +0200 Geert Uytterhoeven
> > <geert@...ux-m68k.org> wrote:
> >
> >> > arch/x86/entry/syscalls/syscall_32.tbl | 1 +
> >> > arch/x86/entry/syscalls/syscall_64.tbl | 1 +
> >>
> >> This should be wired up on each and every architecture.
> >> Currently we're getting
> >>
> >> <stdin>:1567:2: warning: #warning syscall cachestat not implemented [-Wcpp]
> >>
> >> in linux-next for all the missing architectures.
> >
> > Is that wise? We risk adding a syscall to an architecture without the
> > arch maintainers and testers even knowing about it.
> >
> > The compile-time nag is there to inform the arch maintainers that a new
> > syscall is available and that they should wire it up, run the selftest
> > and then ship the code if they're happy with the result.
>
> The usual approach is for the author of a new syscall to
> include a patch with all the architecture specific changes
> and Cc the architecture maintainers for that.
>
> Note that half the architectures get the entry from
> include/uapi/asm-generic/unistd.h, so adding it there
> does not necessarily trigger adding each maintainer
> from scripts/get_maintainer.pl.
>
> The only real risk in adding a new syscall is passing __u64
> register arguments that behave differently across
> architectures, or using pointers to data structures that
> require a compat handler on some architectures. I watch out
> for those as they get sent to me or the linux-arch list,
> and this one is fine.
>
> Arnd
I took a stab at wiring the new syscall in this follow-up patch:
https://lore.kernel.org/lkml/20230510195806.2902878-1-nphamcs@gmail.com/
Let me know if I missed something! Review and/or suggestion
is very much appreciated.
Powered by blists - more mailing lists