Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1472812

Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per syscall

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per syscall
Date 2016-08-30 21:40 +0200
Message-ID <sbX33-GW-3@gated-at.bofh.it> (permalink)
References <sbrcS-5yr-17@gated-at.bofh.it> <sbED7-5tL-17@gated-at.bofh.it> <sbMqZ-2gM-15@gated-at.bofh.it> <sbWql-b6-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 30 Aug 2016 11:52:39 -0700
Andy Lutomirski <luto@amacapital.net> wrote:


> Okay, I think I see what's going on.  init_ftrace_syscalls() does:
> 
>         meta = find_syscall_meta(addr);
> 
> Unless I'm missing some reason why this is a sensible thing to do,
> this seems overcomplicated and incorrect.  There is exactly one caller
> of find_syscall_meta() and that caller knows the syscall number.  Why
> doesn't it just look up the metadata by *number* instead of by syscall
> implementation address?  There are plenty of architectures for which
> multiple logically different syscalls can share an implementation
> (e.g. pretty much everything that calls in_compat_syscall()).

The problem is that the meta data is created at the syscalls
themselves. Look at all the macro magic in include/linux/syscalls.h,
and search for __syscall_metadata. The meta data is created via linker
magic, and the find_syscall_meta() is what finds a specific system call
and the meta data associated with it.

Then it can use the number to system call mapping.

Yes, this code needs some loving.

-- Steve

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per syscall Marcin Nowakowski <marcin.nowakowski@imgtec.com> - 2016-08-29 11:40 +0200
  Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per syscall Andy Lutomirski <luto@amacapital.net> - 2016-08-30 02:00 +0200
    Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per  syscall Marcin Nowakowski <marcin.nowakowski@imgtec.com> - 2016-08-30 10:20 +0200
      Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per syscall Andy Lutomirski <luto@amacapital.net> - 2016-08-30 21:00 +0200
        Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers  per syscall Steven Rostedt <rostedt@goodmis.org> - 2016-08-30 21:40 +0200
          Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per syscall Andy Lutomirski <luto@amacapital.net> - 2016-08-30 22:00 +0200
            Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers  per syscall Steven Rostedt <rostedt@goodmis.org> - 2016-08-30 23:00 +0200
              Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per syscall Andy Lutomirski <luto@amacapital.net> - 2016-08-30 23:50 +0200
                Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers  per syscall Steven Rostedt <rostedt@goodmis.org> - 2016-08-31 00:10 +0200
                Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per syscall Andy Lutomirski <luto@amacapital.net> - 2016-08-31 00:10 +0200
                Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers  per syscall Steven Rostedt <rostedt@goodmis.org> - 2016-08-31 00:40 +0200
                Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per syscall Andy Lutomirski <luto@amacapital.net> - 2016-08-31 01:10 +0200
                Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers  per syscall Steven Rostedt <rostedt@goodmis.org> - 2016-08-31 01:30 +0200
                Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per syscall Andy Lutomirski <luto@amacapital.net> - 2016-08-31 02:10 +0200
                Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per  syscall Marcin Nowakowski <marcin.nowakowski@imgtec.com> - 2016-08-31 16:10 +0200
                Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per  syscall Marcin Nowakowski <marcin.nowakowski@imgtec.com> - 2016-08-31 09:20 +0200
            Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers per syscall Arnd Bergmann <arnd@arndb.de> - 2016-08-31 10:30 +0200
              Re: [PATCH 1/2] tracing/syscalls: allow multiple syscall numbers  per syscall Steven Rostedt <rostedt@goodmis.org> - 2016-09-01 17:30 +0200

csiph-web