syscall_get_* functions are required to be implemented on all
architectures in order to extend the generic ptrace API with
PTRACE_GET_SYSCALL_INFO request.
This adds all 5 syscall_get_* functions on xtensa as documented
in asm-generic/syscall.h: syscall_get_nr, syscall_get_arguments,
syscall_get_error, syscall_get_return_value, and syscall_get_arch.
Cc: Max Filippov <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Elvira Khabirova <[email protected]>
Cc: Eugene Syromyatnikov <[email protected]>
Cc: Chris Zankel <[email protected]>
Cc: Paul Moore <[email protected]>
Cc: Eric Paris <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Dmitry V. Levin <[email protected]>
---
Notes:
v5: added syscall_get_nr, syscall_get_arguments, syscall_get_error,
and syscall_get_return_value
v2: added Acked-by
v1: added syscall_get_arch
arch/xtensa/include/asm/syscall.h | 69 +++++++++++++++++++++++++++++++
include/uapi/linux/audit.h | 1 +
2 files changed, 70 insertions(+)
diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h
index 3673ff1f1bc5..d529c855a144 100644
--- a/arch/xtensa/include/asm/syscall.h
+++ b/arch/xtensa/include/asm/syscall.h
@@ -8,6 +8,75 @@
* Copyright (C) 2001 - 2007 Tensilica Inc.
*/
+#include <uapi/linux/audit.h>
+
+static inline int
+syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
+{
+ return regs->syscall;
+}
+
+static inline void
+syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
+ unsigned int i, unsigned int n, unsigned long *args)
+{
+ switch (i) {
+ case 0:
+ if (!n--)
+ break;
+ *args++ = regs->areg[6];
+ /* fall through */
+ case 1:
+ if (!n--)
+ break;
+ *args++ = regs->areg[3];
+ /* fall through */
+ case 2:
+ if (!n--)
+ break;
+ *args++ = regs->areg[4];
+ /* fall through */
+ case 3:
+ if (!n--)
+ break;
+ *args++ = regs->areg[5];
+ /* fall through */
+ case 4:
+ if (!n--)
+ break;
+ *args++ = regs->areg[8];
+ /* fall through */
+ case 5:
+ if (!n--)
+ break;
+ *args++ = regs->areg[9];
+ /* fall through */
+ case 6:
+ if (!n--)
+ break;
+ /* fall through */
+ default:
+ BUG();
+ }
+}
+
+static inline long
+syscall_get_error(struct task_struct *task, struct pt_regs *regs)
+{
+ return IS_ERR_VALUE(regs->areg[2]) ? regs->areg[2] : 0;
+
+static inline long
+syscall_get_return_value(struct task_struct *task, struct pt_regs *regs)
+{
+ return regs->areg[2];
+}
+
+static inline int
+syscall_get_arch(void)
+{
+ return AUDIT_ARCH_XTENSA;
+}
+
struct pt_regs;
asmlinkage long xtensa_ptrace(long, long, long, long);
asmlinkage long xtensa_sigreturn(struct pt_regs*);
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index 1e9808f3a240..bcc0619b046f 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -425,6 +425,7 @@ enum {
#define AUDIT_ARCH_TILEGX32 (EM_TILEGX|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_TILEPRO (EM_TILEPRO|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
+#define AUDIT_ARCH_XTENSA (EM_XTENSA)
#define AUDIT_PERM_EXEC 1
#define AUDIT_PERM_WRITE 2
--
ldv
Hello,
On Sun, Dec 9, 2018 at 8:30 PM Dmitry V. Levin <[email protected]> wrote:
> syscall_get_* functions are required to be implemented on all
> architectures in order to extend the generic ptrace API with
> PTRACE_GET_SYSCALL_INFO request.
>
> This adds all 5 syscall_get_* functions on xtensa as documented
> in asm-generic/syscall.h: syscall_get_nr, syscall_get_arguments,
> syscall_get_error, syscall_get_return_value, and syscall_get_arch.
I have this set of functions plus syscall_set_arguments implemented
for syscall tracing here:
https://github.com/jcmvbkbc/linux-xtensa/commit/0023f56298cc92ce47e61b1b5dd1038f7be4f826
How should we synchronize our changes?
> diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h
> index 3673ff1f1bc5..d529c855a144 100644
> --- a/arch/xtensa/include/asm/syscall.h
> +++ b/arch/xtensa/include/asm/syscall.h
[...]
> +static inline void
> +syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
> + unsigned int i, unsigned int n, unsigned long *args)
> +{
> + switch (i) {
> + case 0:
> + if (!n--)
> + break;
> + *args++ = regs->areg[6];
> + /* fall through */
> + case 1:
> + if (!n--)
> + break;
> + *args++ = regs->areg[3];
> + /* fall through */
> + case 2:
> + if (!n--)
> + break;
> + *args++ = regs->areg[4];
> + /* fall through */
> + case 3:
> + if (!n--)
> + break;
> + *args++ = regs->areg[5];
> + /* fall through */
> + case 4:
> + if (!n--)
> + break;
> + *args++ = regs->areg[8];
> + /* fall through */
> + case 5:
> + if (!n--)
> + break;
> + *args++ = regs->areg[9];
> + /* fall through */
> + case 6:
> + if (!n--)
> + break;
> + /* fall through */
> + default:
> + BUG();
A WARN should be enough.
--
Thanks.
-- Max
Hi,
On Sun, Dec 09, 2018 at 09:02:50PM -0800, Max Filippov wrote:
> Hello,
>
> On Sun, Dec 9, 2018 at 8:30 PM Dmitry V. Levin <[email protected]> wrote:
> > syscall_get_* functions are required to be implemented on all
> > architectures in order to extend the generic ptrace API with
> > PTRACE_GET_SYSCALL_INFO request.
> >
> > This adds all 5 syscall_get_* functions on xtensa as documented
> > in asm-generic/syscall.h: syscall_get_nr, syscall_get_arguments,
> > syscall_get_error, syscall_get_return_value, and syscall_get_arch.
>
> I have this set of functions plus syscall_set_arguments implemented
> for syscall tracing here:
> https://github.com/jcmvbkbc/linux-xtensa/commit/0023f56298cc92ce47e61b1b5dd1038f7be4f826
Good, but we also need syscall_get_arch for PTRACE_GET_SYSCALL_INFO.
> How should we synchronize our changes?
No problem, I can revert to the previous edition of this patch
that just adds syscall_get_arch.
Alternatively, you can just take that couple of patches (v5 18/25
and v2 15/15) into your tree.
> > diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h
> > index 3673ff1f1bc5..d529c855a144 100644
> > --- a/arch/xtensa/include/asm/syscall.h
> > +++ b/arch/xtensa/include/asm/syscall.h
>
> [...]
>
> > +static inline void
> > +syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
> > + unsigned int i, unsigned int n, unsigned long *args)
> > +{
> > + switch (i) {
> > + case 0:
> > + if (!n--)
> > + break;
> > + *args++ = regs->areg[6];
> > + /* fall through */
> > + case 1:
> > + if (!n--)
> > + break;
> > + *args++ = regs->areg[3];
> > + /* fall through */
> > + case 2:
> > + if (!n--)
> > + break;
> > + *args++ = regs->areg[4];
> > + /* fall through */
> > + case 3:
> > + if (!n--)
> > + break;
> > + *args++ = regs->areg[5];
> > + /* fall through */
> > + case 4:
> > + if (!n--)
> > + break;
> > + *args++ = regs->areg[8];
> > + /* fall through */
> > + case 5:
> > + if (!n--)
> > + break;
> > + *args++ = regs->areg[9];
> > + /* fall through */
> > + case 6:
> > + if (!n--)
> > + break;
> > + /* fall through */
> > + default:
> > + BUG();
>
> A WARN should be enough.
This is what most of other architectures do in syscall_get_arguments,
but I agree that a WARN_ON_ONCE should be enough.
--
ldv
On Mon, Dec 10, 2018 at 4:53 AM Dmitry V. Levin <[email protected]> wrote:
> On Sun, Dec 09, 2018 at 09:02:50PM -0800, Max Filippov wrote:
> > How should we synchronize our changes?
>
> No problem, I can revert to the previous edition of this patch
> that just adds syscall_get_arch.
> Alternatively, you can just take that couple of patches (v5 18/25
> and v2 15/15) into your tree.
Sure I can do the second. Will it work for v2 16/15 that changes
syscall_get_arch adding an argument to it?
--
Thanks.
-- Max
On Mon, Dec 10, 2018 at 11:24:02PM +0300, Dmitry V. Levin wrote:
> On Mon, Dec 10, 2018 at 12:14:37PM -0800, Max Filippov wrote:
> > On Mon, Dec 10, 2018 at 4:53 AM Dmitry V. Levin <[email protected]> wrote:
> > > On Sun, Dec 09, 2018 at 09:02:50PM -0800, Max Filippov wrote:
> > > > How should we synchronize our changes?
> > >
> > > No problem, I can revert to the previous edition of this patch
> > > that just adds syscall_get_arch.
> > > Alternatively, you can just take that couple of patches (v5 18/25
> > > and v2 15/15) into your tree.
> >
> > Sure I can do the second. Will it work for v2 16/15 that changes
> > syscall_get_arch adding an argument to it?
>
> No, I'm afraid it won't work for v2 16/15 (aka v5 22/25), which means
> I'd have to keep them in the series.
You can surely take them into your tree, but I'll have to keep them
in the series because of that change of syscall_get_arch signature.
Sorry for confusion.
--
ldv
On Mon, Dec 10, 2018 at 12:14:37PM -0800, Max Filippov wrote:
> On Mon, Dec 10, 2018 at 4:53 AM Dmitry V. Levin <[email protected]> wrote:
> > On Sun, Dec 09, 2018 at 09:02:50PM -0800, Max Filippov wrote:
> > > How should we synchronize our changes?
> >
> > No problem, I can revert to the previous edition of this patch
> > that just adds syscall_get_arch.
> > Alternatively, you can just take that couple of patches (v5 18/25
> > and v2 15/15) into your tree.
>
> Sure I can do the second. Will it work for v2 16/15 that changes
> syscall_get_arch adding an argument to it?
No, I'm afraid it won't work for v2 16/15 (aka v5 22/25), which means
I'd have to keep them in the series.
--
ldv
On Mon, Dec 10, 2018 at 12:30 PM Dmitry V. Levin <[email protected]> wrote:
> On Mon, Dec 10, 2018 at 11:24:02PM +0300, Dmitry V. Levin wrote:
> > On Mon, Dec 10, 2018 at 12:14:37PM -0800, Max Filippov wrote:
> > > On Mon, Dec 10, 2018 at 4:53 AM Dmitry V. Levin <[email protected]> wrote:
> > > > On Sun, Dec 09, 2018 at 09:02:50PM -0800, Max Filippov wrote:
> > > > > How should we synchronize our changes?
> > > >
> > > > No problem, I can revert to the previous edition of this patch
> > > > that just adds syscall_get_arch.
> > > > Alternatively, you can just take that couple of patches (v5 18/25
> > > > and v2 15/15) into your tree.
> > >
> > > Sure I can do the second. Will it work for v2 16/15 that changes
> > > syscall_get_arch adding an argument to it?
> >
> > No, I'm afraid it won't work for v2 16/15 (aka v5 22/25), which means
> > I'd have to keep them in the series.
>
> You can surely take them into your tree, but I'll have to keep them
> in the series because of that change of syscall_get_arch signature.
> Sorry for confusion.
Ok, no problem, I'll take them. I'm planning to merge this branch into the
for-next in a couple of days, let's see how it goes after that.
--
Thanks.
-- Max
Hi Dmitry,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc6]
[cannot apply to next-20181211]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Dmitry-V-Levin/ptrace-add-PTRACE_GET_SYSCALL_INFO-request/20181210-174745
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=xtensa
All error/warnings (new ones prefixed by >>):
In file included from arch/xtensa/kernel/syscall.c:19:
arch/xtensa/include/asm/syscall.h: In function 'syscall_get_error':
arch/xtensa/include/asm/syscall.h:66:9: error: implicit declaration of function 'IS_ERR_VALUE'; did you mean 'USER_PS_VALUE'? [-Werror=implicit-function-declaration]
return IS_ERR_VALUE(regs->areg[2]) ? regs->areg[2] : 0;
^~~~~~~~~~~~
USER_PS_VALUE
>> arch/xtensa/include/asm/syscall.h:69:1: error: invalid storage class for function 'syscall_get_return_value'
syscall_get_return_value(struct task_struct *task, struct pt_regs *regs)
^~~~~~~~~~~~~~~~~~~~~~~~
>> arch/xtensa/include/asm/syscall.h:68:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static inline long
^~~~~~
>> arch/xtensa/include/asm/syscall.h:75:1: error: invalid storage class for function 'syscall_get_arch'
syscall_get_arch(void)
^~~~~~~~~~~~~~~~
In file included from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/uapi/linux/aio_abi.h:31,
from include/linux/syscalls.h:74,
from arch/xtensa/kernel/syscall.c:24:
include/linux/wait.h:31:19: error: field 'entry' has incomplete type
struct list_head entry;
^~~~~
include/linux/wait.h:36:19: error: field 'head' has incomplete type
struct list_head head;
^~~~
include/linux/wait.h:79:20: error: invalid storage class for function 'init_waitqueue_entry'
static inline void init_waitqueue_entry(struct wait_queue_entry *wq_entry, struct task_struct *p)
^~~~~~~~~~~~~~~~~~~~
include/linux/wait.h:87:1: error: invalid storage class for function 'init_waitqueue_func_entry'
init_waitqueue_func_entry(struct wait_queue_entry *wq_entry, wait_queue_func_t func)
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/wait.h:124:19: error: invalid storage class for function 'waitqueue_active'
static inline int waitqueue_active(struct wait_queue_head *wq_head)
^~~~~~~~~~~~~~~~
include/linux/wait.h:137:20: error: invalid storage class for function 'wq_has_sleeper'
static inline bool wq_has_sleeper(struct wait_queue_head *wq_head)
^~~~~~~~~~~~~~
include/linux/wait.h:154:20: error: invalid storage class for function '__add_wait_queue'
static inline void __add_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry)
^~~~~~~~~~~~~~~~
include/linux/wait.h:163:1: error: invalid storage class for function '__add_wait_queue_exclusive'
__add_wait_queue_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry)
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/wait.h:169:20: error: invalid storage class for function '__add_wait_queue_entry_tail'
static inline void __add_wait_queue_entry_tail(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/wait.h:175:1: error: invalid storage class for function '__add_wait_queue_entry_tail_exclusive'
__add_wait_queue_entry_tail_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/wait.h:182:1: error: invalid storage class for function '__remove_wait_queue'
__remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry)
^~~~~~~~~~~~~~~~~~~
In file included from include/linux/fs.h:6,
from include/uapi/linux/aio_abi.h:31,
from include/linux/syscalls.h:74,
from arch/xtensa/kernel/syscall.c:24:
include/linux/wait_bit.h:71:1: error: invalid storage class for function 'wait_on_bit'
wait_on_bit(unsigned long *word, int bit, unsigned mode)
^~~~~~~~~~~
include/linux/wait_bit.h:96:1: error: invalid storage class for function 'wait_on_bit_io'
wait_on_bit_io(unsigned long *word, int bit, unsigned mode)
^~~~~~~~~~~~~~
include/linux/wait_bit.h:122:1: error: invalid storage class for function 'wait_on_bit_timeout'
wait_on_bit_timeout(unsigned long *word, int bit, unsigned mode,
^~~~~~~~~~~~~~~~~~~
include/linux/wait_bit.h:150:1: error: invalid storage class for function 'wait_on_bit_action'
wait_on_bit_action(unsigned long *word, int bit, wait_bit_action_f *action,
^~~~~~~~~~~~~~~~~~
include/linux/wait_bit.h:179:1: error: invalid storage class for function 'wait_on_bit_lock'
wait_on_bit_lock(unsigned long *word, int bit, unsigned mode)
^~~~~~~~~~~~~~~~
include/linux/wait_bit.h:203:1: error: invalid storage class for function 'wait_on_bit_lock_io'
wait_on_bit_lock_io(unsigned long *word, int bit, unsigned mode)
^~~~~~~~~~~~~~~~~~~
include/linux/wait_bit.h:229:1: error: invalid storage class for function 'wait_on_bit_lock_action'
wait_on_bit_lock_action(unsigned long *word, int bit, wait_bit_action_f *action,
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/wait_bit.h:317:20: error: invalid storage class for function 'clear_and_wake_up_bit'
static inline void clear_and_wake_up_bit(int bit, void *word)
^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/fs.h:7,
from include/uapi/linux/aio_abi.h:31,
from include/linux/syscalls.h:74,
from arch/xtensa/kernel/syscall.c:24:
include/linux/kdev_t.h:24:20: error: invalid storage class for function 'old_valid_dev'
static inline bool old_valid_dev(dev_t dev)
^~~~~~~~~~~~~
include/linux/kdev_t.h:29:19: error: invalid storage class for function 'old_encode_dev'
static inline u16 old_encode_dev(dev_t dev)
^~~~~~~~~~~~~~
include/linux/kdev_t.h:34:21: error: invalid storage class for function 'old_decode_dev'
static inline dev_t old_decode_dev(u16 val)
^~~~~~~~~~~~~~
include/linux/kdev_t.h:39:19: error: invalid storage class for function 'new_encode_dev'
static inline u32 new_encode_dev(dev_t dev)
^~~~~~~~~~~~~~
include/linux/kdev_t.h:46:21: error: invalid storage class for function 'new_decode_dev'
static inline dev_t new_decode_dev(u32 dev)
^~~~~~~~~~~~~~
include/linux/kdev_t.h:53:19: error: invalid storage class for function 'huge_encode_dev'
static inline u64 huge_encode_dev(dev_t dev)
^~~~~~~~~~~~~~~
include/linux/kdev_t.h:58:21: error: invalid storage class for function 'huge_decode_dev'
static inline dev_t huge_decode_dev(u64 dev)
^~~~~~~~~~~~~~~
include/linux/kdev_t.h:63:19: error: invalid storage class for function 'sysv_valid_dev'
static inline int sysv_valid_dev(dev_t dev)
^~~~~~~~~~~~~~
include/linux/kdev_t.h:68:19: error: invalid storage class for function 'sysv_encode_dev'
static inline u32 sysv_encode_dev(dev_t dev)
^~~~~~~~~~~~~~~
include/linux/kdev_t.h:73:24: error: invalid storage class for function 'sysv_major'
vim +/syscall_get_return_value +69 arch/xtensa/include/asm/syscall.h
62
63 static inline long
64 syscall_get_error(struct task_struct *task, struct pt_regs *regs)
65 {
> 66 return IS_ERR_VALUE(regs->areg[2]) ? regs->areg[2] : 0;
67
> 68 static inline long
> 69 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs)
70 {
71 return regs->areg[2];
72 }
73
74 static inline int
> 75 syscall_get_arch(void)
76 {
77 return AUDIT_ARCH_XTENSA;
78 }
79
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi Dmitry,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc7]
[cannot apply to next-20181218]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Dmitry-V-Levin/ptrace-add-PTRACE_GET_SYSCALL_INFO-request/20181210-174745
config: xtensa-iss_defconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=xtensa
All errors (new ones prefixed by >>):
^~~~~~~~~~
include/linux/signal.h:122:20: note: in definition of macro '_SIG_SET_BINOP'
static inline void name(sigset_t *r, const sigset_t *a, const sigset_t *b) \
^~~~
include/linux/signal.h:153:16: error: invalid storage class for function 'sigandnsets'
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~
include/linux/signal.h:122:20: note: in definition of macro '_SIG_SET_BINOP'
static inline void name(sigset_t *r, const sigset_t *a, const sigset_t *b) \
^~~~
include/linux/signal.h:177:13: error: invalid storage class for function 'signotset'
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~
include/linux/signal.h:161:20: note: in definition of macro '_SIG_SET_OP'
static inline void name(sigset_t *set) \
^~~~
include/linux/signal.h:182:20: error: invalid storage class for function 'sigemptyset'
static inline void sigemptyset(sigset_t *set)
^~~~~~~~~~~
include/linux/signal.h:195:20: error: invalid storage class for function 'sigfillset'
static inline void sigfillset(sigset_t *set)
^~~~~~~~~~
include/linux/signal.h:210:20: error: invalid storage class for function 'sigaddsetmask'
static inline void sigaddsetmask(sigset_t *set, unsigned long mask)
^~~~~~~~~~~~~
include/linux/signal.h:215:20: error: invalid storage class for function 'sigdelsetmask'
static inline void sigdelsetmask(sigset_t *set, unsigned long mask)
^~~~~~~~~~~~~
include/linux/signal.h:220:19: error: invalid storage class for function 'sigtestsetmask'
static inline int sigtestsetmask(sigset_t *set, unsigned long mask)
^~~~~~~~~~~~~~
include/linux/signal.h:225:20: error: invalid storage class for function 'siginitset'
static inline void siginitset(sigset_t *set, unsigned long mask)
^~~~~~~~~~
include/linux/signal.h:237:20: error: invalid storage class for function 'siginitsetinv'
static inline void siginitsetinv(sigset_t *set, unsigned long mask)
^~~~~~~~~~~~~
include/linux/signal.h:251:20: error: invalid storage class for function 'init_sigpending'
static inline void init_sigpending(struct sigpending *sig)
^~~~~~~~~~~~~~~
include/linux/signal.h:260:19: error: invalid storage class for function 'valid_signal'
static inline int valid_signal(unsigned long sig)
^~~~~~~~~~~~
include/linux/signal.h:285:20: error: invalid storage class for function 'allow_signal'
static inline void allow_signal(int sig)
^~~~~~~~~~~~
include/linux/signal.h:295:20: error: invalid storage class for function 'disallow_signal'
static inline void disallow_signal(int sig)
^~~~~~~~~~~~~~~
In file included from include/linux/key.h:22,
from include/linux/syscalls.h:83,
from arch/xtensa/kernel/syscall.c:24:
include/linux/sysctl.h:100:21: error: invalid storage class for function 'proc_sys_poll_event'
static inline void *proc_sys_poll_event(struct ctl_table_poll *poll)
^~~~~~~~~~~~~~~~~~~
In file included from include/linux/static_key.h:1,
from include/linux/tracepoint-defs.h:12,
from include/linux/tracepoint.h:23,
from include/trace/syscall.h:5,
from include/linux/syscalls.h:85,
from arch/xtensa/kernel/syscall.c:24:
include/linux/jump_label.h:253:19: error: invalid storage class for function 'static_key_count'
static inline int static_key_count(struct static_key *key)
^~~~~~~~~~~~~~~~
include/linux/jump_label.h:258:29: error: invalid storage class for function 'jump_label_init'
static __always_inline void jump_label_init(void)
^~~~~~~~~~~~~~~
include/linux/jump_label.h:263:29: error: invalid storage class for function 'static_key_false'
static __always_inline bool static_key_false(struct static_key *key)
^~~~~~~~~~~~~~~~
include/linux/jump_label.h:270:29: error: invalid storage class for function 'static_key_true'
static __always_inline bool static_key_true(struct static_key *key)
^~~~~~~~~~~~~~~
include/linux/jump_label.h:277:20: error: invalid storage class for function 'static_key_slow_inc'
static inline void static_key_slow_inc(struct static_key *key)
^~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:283:20: error: invalid storage class for function 'static_key_slow_dec'
static inline void static_key_slow_dec(struct static_key *key)
^~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:292:19: error: invalid storage class for function 'jump_label_text_reserved'
static inline int jump_label_text_reserved(void *start, void *end)
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:297:20: error: invalid storage class for function 'jump_label_lock'
static inline void jump_label_lock(void) {}
^~~~~~~~~~~~~~~
include/linux/jump_label.h:298:20: error: invalid storage class for function 'jump_label_unlock'
static inline void jump_label_unlock(void) {}
^~~~~~~~~~~~~~~~~
include/linux/jump_label.h:300:19: error: invalid storage class for function 'jump_label_apply_nops'
static inline int jump_label_apply_nops(struct module *mod)
^~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:305:20: error: invalid storage class for function 'static_key_enable'
static inline void static_key_enable(struct static_key *key)
^~~~~~~~~~~~~~~~~
include/linux/jump_label.h:316:20: error: invalid storage class for function 'static_key_disable'
static inline void static_key_disable(struct static_key *key)
^~~~~~~~~~~~~~~~~~
In file included from include/trace/syscall.h:5,
from include/linux/syscalls.h:85,
from arch/xtensa/kernel/syscall.c:24:
>> include/linux/tracepoint.h:60:20: error: invalid storage class for function 'trace_module_has_bad_taint'
static inline bool trace_module_has_bad_taint(struct module *mod)
^~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/tracepoint.h:65:5: error: invalid storage class for function 'register_tracepoint_module_notifier'
int register_tracepoint_module_notifier(struct notifier_block *nb)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/tracepoint.h:70:5: error: invalid storage class for function 'unregister_tracepoint_module_notifier'
int unregister_tracepoint_module_notifier(struct notifier_block *nb)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/tracepoint.h:88:20: error: invalid storage class for function 'tracepoint_synchronize_unregister'
static inline void tracepoint_synchronize_unregister(void)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/tracepoint.h:114:34: error: invalid storage class for function 'tracepoint_ptr_deref'
static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/mm.h:18,
from include/linux/ring_buffer.h:5,
from include/linux/trace_events.h:6,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:85,
from arch/xtensa/kernel/syscall.c:24:
include/linux/range.h:24:31: error: invalid storage class for function 'cap_resource'
static inline resource_size_t cap_resource(u64 val)
^~~~~~~~~~~~
In file included from include/linux/mm.h:20,
from include/linux/ring_buffer.h:5,
from include/linux/trace_events.h:6,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:85,
from arch/xtensa/kernel/syscall.c:24:
include/linux/percpu-refcount.h:126:20: error: invalid storage class for function 'percpu_ref_kill'
static inline void percpu_ref_kill(struct percpu_ref *ref)
^~~~~~~~~~~~~~~
include/linux/percpu-refcount.h:137:20: error: invalid storage class for function '__ref_is_percpu'
static inline bool __ref_is_percpu(struct percpu_ref *ref,
^~~~~~~~~~~~~~~
include/linux/percpu-refcount.h:177:20: error: invalid storage class for function 'percpu_ref_get_many'
static inline void percpu_ref_get_many(struct percpu_ref *ref, unsigned long nr)
^~~~~~~~~~~~~~~~~~~
include/linux/percpu-refcount.h:199:20: error: invalid storage class for function 'percpu_ref_get'
static inline void percpu_ref_get(struct percpu_ref *ref)
^~~~~~~~~~~~~~
include/linux/percpu-refcount.h:213:20: error: invalid storage class for function 'percpu_ref_tryget'
static inline bool percpu_ref_tryget(struct percpu_ref *ref)
^~~~~~~~~~~~~~~~~
include/linux/percpu-refcount.h:247:20: error: invalid storage class for function 'percpu_ref_tryget_live'
static inline bool percpu_ref_tryget_live(struct percpu_ref *ref)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-refcount.h:276:20: error: invalid storage class for function 'percpu_ref_put_many'
static inline void percpu_ref_put_many(struct percpu_ref *ref, unsigned long nr)
^~~~~~~~~~~~~~~~~~~
include/linux/percpu-refcount.h:299:20: error: invalid storage class for function 'percpu_ref_put'
static inline void percpu_ref_put(struct percpu_ref *ref)
^~~~~~~~~~~~~~
include/linux/percpu-refcount.h:313:20: error: invalid storage class for function 'percpu_ref_is_dying'
static inline bool percpu_ref_is_dying(struct percpu_ref *ref)
^~~~~~~~~~~~~~~~~~~
include/linux/percpu-refcount.h:326:20: error: invalid storage class for function 'percpu_ref_is_zero'
static inline bool percpu_ref_is_zero(struct percpu_ref *ref)
^~~~~~~~~~~~~~~~~~
In file included from include/linux/mm.h:24,
from include/linux/ring_buffer.h:5,
from include/linux/trace_events.h:6,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:85,
from arch/xtensa/kernel/syscall.c:24:
include/linux/page_ext.h:58:20: error: invalid storage class for function 'pgdat_page_ext_init'
static inline void pgdat_page_ext_init(struct pglist_data *pgdat)
^~~~~~~~~~~~~~~~~~~
include/linux/page_ext.h:62:32: error: invalid storage class for function 'lookup_page_ext'
static inline struct page_ext *lookup_page_ext(const struct page *page)
^~~~~~~~~~~~~~~
include/linux/page_ext.h:67:20: error: invalid storage class for function 'page_ext_init'
static inline void page_ext_init(void)
^~~~~~~~~~~~~
include/linux/page_ext.h:71:20: error: invalid storage class for function 'page_ext_init_flatmem'
static inline void page_ext_init_flatmem(void)
^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/page_ref.h:7,
from include/linux/mm.h:26,
from include/linux/ring_buffer.h:5,
from include/linux/trace_events.h:6,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:85,
from arch/xtensa/kernel/syscall.c:24:
include/linux/page-flags.h:141:28: error: invalid storage class for function 'compound_head'
static inline struct page *compound_head(struct page *page)
^~~~~~~~~~~~~
include/linux/page-flags.h:150:28: error: invalid storage class for function 'PageTail'
static __always_inline int PageTail(struct page *page)
^~~~~~~~
include/linux/page-flags.h:155:28: error: invalid storage class for function 'PageCompound'
static __always_inline int PageCompound(struct page *page)
^~~~~~~~~~~~
include/linux/page-flags.h:161:19: error: invalid storage class for function 'PagePoisoned'
static inline int PagePoisoned(const struct page *page)
^~~~~~~~~~~~
include/linux/page-flags.h:169:20: error: invalid storage class for function 'page_init_poison'
static inline void page_init_poison(struct page *page, size_t size)
^~~~~~~~~~~~~~~~
include/linux/page-flags.h:216:28: error: invalid storage class for function 'PageLocked'
static __always_inline int Page##uname(struct page *page) \
^~~~
include/linux/page-flags.h:249:2: note: in expansion of macro 'TESTPAGEFLAG'
TESTPAGEFLAG(uname, lname, policy) \
^~~~~~~~~~~~
include/linux/page-flags.h:281:1: note: in expansion of macro '__PAGEFLAG'
vim +/trace_module_has_bad_taint +60 include/linux/tracepoint.h
de7b29739 Mathieu Desnoyers 2014-04-08 55
45ab2813d Steven Rostedt (Red Hat 2014-02-26 56) bool trace_module_has_bad_taint(struct module *mod);
de7b29739 Mathieu Desnoyers 2014-04-08 57 extern int register_tracepoint_module_notifier(struct notifier_block *nb);
de7b29739 Mathieu Desnoyers 2014-04-08 58 extern int unregister_tracepoint_module_notifier(struct notifier_block *nb);
45ab2813d Steven Rostedt (Red Hat 2014-02-26 59) #else
45ab2813d Steven Rostedt (Red Hat 2014-02-26 @60) static inline bool trace_module_has_bad_taint(struct module *mod)
45ab2813d Steven Rostedt (Red Hat 2014-02-26 61) {
45ab2813d Steven Rostedt (Red Hat 2014-02-26 62) return false;
45ab2813d Steven Rostedt (Red Hat 2014-02-26 63) }
de7b29739 Mathieu Desnoyers 2014-04-08 64 static inline
de7b29739 Mathieu Desnoyers 2014-04-08 @65 int register_tracepoint_module_notifier(struct notifier_block *nb)
de7b29739 Mathieu Desnoyers 2014-04-08 66 {
de7b29739 Mathieu Desnoyers 2014-04-08 67 return 0;
de7b29739 Mathieu Desnoyers 2014-04-08 68 }
de7b29739 Mathieu Desnoyers 2014-04-08 69 static inline
de7b29739 Mathieu Desnoyers 2014-04-08 @70 int unregister_tracepoint_module_notifier(struct notifier_block *nb)
de7b29739 Mathieu Desnoyers 2014-04-08 71 {
de7b29739 Mathieu Desnoyers 2014-04-08 72 return 0;
de7b29739 Mathieu Desnoyers 2014-04-08 73 }
b75ef8b44 Mathieu Desnoyers 2011-08-10 74 #endif /* CONFIG_MODULES */
b75ef8b44 Mathieu Desnoyers 2011-08-10 75
:::::: The code at line 60 was first introduced by commit
:::::: 45ab2813d40d88fc575e753c38478de242d03f88 tracing: Do not add event files for modules that fail tracepoints
:::::: TO: Steven Rostedt (Red Hat) <[email protected]>
:::::: CC: Steven Rostedt <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation