Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.11 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795953740; b=AHb0qk1949N3ch3+pun/jc5sEHR6Lvjn9lB83TS8LVcwmVTvyP7jc4WS6CZBhVvhHyaj 32JRYavNSmSlRPMW5ZCetoFbRaB+aNOiJcdpMAGFJ+9wPjoMUMsgnPiYYVAPR+lq6bNkH MQLjq3e2gHEoerNmdm3pD85PttlJ9GwFvFNXgto+0fIA5DW8l3kFFJcIA3SG4d959arsN XD7lNee0om32e5LULfO/IBjzeKtnfDvI00QZEeaXjR0BwNwI8n3OKB/t1sdy6MAlEE9OR 7jWt2jqJUXXISih+8/mIvJasndTvE4oCU6iaU+zZgns39G27UD6900QOeolsfUz3z+g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795953740; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:User-Agent; bh=1jQ2bzE3VB1Jou48woJs8cr+CCYBl7No70y74Je8wxQ=; b=jOi4ilEIbKJLbtExqcJMOLfGEJOZInmhZkV+wQgt9Qqhp8ktdSw/1pElZXGsBDyTxx1W +ivDQKBNPUT/W2gDz75RzZGigApfzISPwFNb1X1YMomsI2qX/ROu9mk7RxkCtIUhYGXS7 26VcE3g2LAMtz/gBGFBCZQl9jibAkLD4UFSzJh2g469YxpAZDEy1N5BGADUb/kHzqW0eF y74BoLqy/LKJolc6EosX9WILf/kxa1EXaOtLtWfi2/S0n6yCYF3qFj6VnlXUiBcN2Pgwj equYrzoB0wHWjeDD4bPdQO/wFjDRi4JYZ7m/vJkHv7HlGKCeBvXRBiB0ZmBMlpOGNHg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=dMwHRmfg; arc=none smtp.remote-ip=198.175.65.11 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50BDC606A327 for ; Sun, 29 Nov 2026 12:02:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 50BDC606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=dMwHRmfg DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1795953739; x=1827489739; h=date:from:to:cc:subject:message-id; bh=uLdMJORL/je0xoBo7sZVDsZaZTE1TDeY3Xo6mhDUvRU=; b=dMwHRmfgoG+wu6oU9LSPKv0pYgVKoFw5OX0qFtjHpFrrefZOeVO7sDrF d/JmTwlN8lJQcwFW1jOEnPpy5czhEHOHSEbL3FEjPDl35LzeIqqDwsMy3 en8nktM5cf8Y9iiVbMtlSyZyme3Lq0QZQlaDq0Ad3R0kJRKs4NyQykCSC rm3wRHoYeFVyn+BSXQyN/IDCPn3I7aMNa463ipFsKUELPbCcWgykR6ZsO lOBbULtei+tHbATleFnqKbZ3Bofe84fu+6YuASggmKWeN9k9NC79cad5X DJdGP2p+J+5B2hYndixFzWQksdHCX7LA/hq6bYoRTo91cz6E8h1POG5JY g==; X-CSE-ConnectionGUID: erO7y35QSNOyT/vZAvpfRw== X-CSE-MsgGUID: xB+G/Q99TSeg/W112x5g9w== X-IronPort-AV: E=McAfee;i="6800,10657,11980"; a="4682098" X-IronPort-AV: E=Sophos;i="6.27,240,1787036400"; d="scan'208";a="4682098" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2026 04:02:18 -0800 X-CSE-ConnectionGUID: 3FhN2ApvQ4ORBT6zz42agQ== X-CSE-MsgGUID: UzAuDUn8QMa/+gRGj4bthA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,240,1787036400"; d="scan'208";a="12967192" Received: from igk-lkp-server01.igk.intel.com (HELO 146cf1e082f1) ([10.211.93.152]) by fmviesa002.fm.intel.com with ESMTP; 29 Nov 2026 04:02:17 -0800 Received: from kbuild by 146cf1e082f1 with local (Exim 4.98.2) (envelope-from ) id 1xXdbi-0000000013G-01DG; Sun, 29 Nov 2026 12:02:14 +0000 Date: Sun, 29 Nov 2026 13:01:49 +0100 From: kernel test robot To: Kumar Kartikeya Dwivedi Cc: oe-kbuild-all@lists.linux.dev Subject: [kkdwivedi:sys-ext 53/54] kernel/bpf/sys_call.c:127:34: error: no member named 'mode' in 'struct seccomp' Message-ID: <20261129125346.7uIs5ciA-lkp@intel.com> User-Agent: s-nail v14.9.25 X-Mailing-List: oe-kbuild-all@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list tree: https://github.com/kkdwivedi/linux sys-ext head: 79d84dbb504831f04e5d82b21db272463339a59d commit: b261415512b693cb1b56af55aa2c4790d2b98c6a [53/54] bpf: Let a syscall program make system calls for its process's threads config: um-randconfig-2001-20261129 (https://download.01.org/0day-ci/archive/20261129/20261129125346.7uIs5ciA-lkp@intel.com/config) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261129/20261129125346.7uIs5ciA-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/20261129125346.7uIs5ciA-lkp@intel.com/ All errors (new ones prefixed by >>): >> kernel/bpf/sys_call.c:127:34: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' 49 | compiletime_assert_rwonce_type(x); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 | "Unsupported access size for {READ,WRITE}_ONCE().") | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:663:10: note: expanded from macro '__native_word' 663 | (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \ | ^ include/linux/compiler_types.h:702:22: note: expanded from macro 'compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:690:23: note: expanded from macro '_compiletime_assert' 690 | __compiletime_assert(condition, msg, prefix, suffix) | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:682:9: note: expanded from macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ >> kernel/bpf/sys_call.c:127:34: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' 49 | compiletime_assert_rwonce_type(x); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 | "Unsupported access size for {READ,WRITE}_ONCE().") | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:663:39: note: expanded from macro '__native_word' 663 | (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \ | ^ include/linux/compiler_types.h:702:22: note: expanded from macro 'compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:690:23: note: expanded from macro '_compiletime_assert' 690 | __compiletime_assert(condition, msg, prefix, suffix) | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:682:9: note: expanded from macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ >> kernel/bpf/sys_call.c:127:34: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' 49 | compiletime_assert_rwonce_type(x); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 | "Unsupported access size for {READ,WRITE}_ONCE().") | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:664:10: note: expanded from macro '__native_word' 664 | sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) | ^ include/linux/compiler_types.h:702:22: note: expanded from macro 'compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:690:23: note: expanded from macro '_compiletime_assert' 690 | __compiletime_assert(condition, msg, prefix, suffix) | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:682:9: note: expanded from macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ >> kernel/bpf/sys_call.c:127:34: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' 49 | compiletime_assert_rwonce_type(x); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 | "Unsupported access size for {READ,WRITE}_ONCE().") | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:664:38: note: expanded from macro '__native_word' 664 | sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) | ^ include/linux/compiler_types.h:702:22: note: expanded from macro 'compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:690:23: note: expanded from macro '_compiletime_assert' 690 | __compiletime_assert(condition, msg, prefix, suffix) | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:682:9: note: expanded from macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ >> kernel/bpf/sys_call.c:127:34: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' 49 | compiletime_assert_rwonce_type(x); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ include/asm-generic/rwonce.h:36:48: note: expanded from macro 'compiletime_assert_rwonce_type' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 | "Unsupported access size for {READ,WRITE}_ONCE().") | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:702:22: note: expanded from macro 'compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:690:23: note: expanded from macro '_compiletime_assert' 690 | __compiletime_assert(condition, msg, prefix, suffix) | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:682:9: note: expanded from macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ >> kernel/bpf/sys_call.c:127:34: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE' 50 | __READ_ONCE(x); \ | ~~~~~~~~~~~~^~ include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE' 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ~~~~~~~~~~~~~~~~~~~~~~~^~ include/linux/compiler_types.h:635:53: note: expanded from macro '__unqual_scalar_typeof' 635 | #define __unqual_scalar_typeof(x) __typeof_unqual__(x) | ^ >> kernel/bpf/sys_call.c:127:34: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE' 50 | __READ_ONCE(x); \ | ~~~~~~~~~~~~^~ include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE' 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ^ kernel/bpf/sys_call.c:127:67: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~ ^ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' 49 | compiletime_assert_rwonce_type(x); \ | ^ include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^ include/linux/compiler_types.h:663:10: note: expanded from macro '__native_word' 663 | (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \ | ^ include/linux/compiler_types.h:702:22: note: expanded from macro 'compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~ include/linux/compiler_types.h:690:23: note: expanded from macro '_compiletime_assert' 690 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~ include/linux/compiler_types.h:682:9: note: expanded from macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ kernel/bpf/sys_call.c:127:67: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~ ^ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' 49 | compiletime_assert_rwonce_type(x); \ | ^ include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^ include/linux/compiler_types.h:663:39: note: expanded from macro '__native_word' 663 | (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \ | ^ include/linux/compiler_types.h:702:22: note: expanded from macro 'compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~ include/linux/compiler_types.h:690:23: note: expanded from macro '_compiletime_assert' 690 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~ include/linux/compiler_types.h:682:9: note: expanded from macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ kernel/bpf/sys_call.c:127:67: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~ ^ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' 49 | compiletime_assert_rwonce_type(x); \ | ^ include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^ include/linux/compiler_types.h:664:10: note: expanded from macro '__native_word' 664 | sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) | ^ include/linux/compiler_types.h:702:22: note: expanded from macro 'compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~ include/linux/compiler_types.h:690:23: note: expanded from macro '_compiletime_assert' 690 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~ include/linux/compiler_types.h:682:9: note: expanded from macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ kernel/bpf/sys_call.c:127:67: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~ ^ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' 49 | compiletime_assert_rwonce_type(x); \ | ^ include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^ include/linux/compiler_types.h:664:38: note: expanded from macro '__native_word' 664 | sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) | ^ include/linux/compiler_types.h:702:22: note: expanded from macro 'compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~ include/linux/compiler_types.h:690:23: note: expanded from macro '_compiletime_assert' 690 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~ include/linux/compiler_types.h:682:9: note: expanded from macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ kernel/bpf/sys_call.c:127:67: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~ ^ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' 49 | compiletime_assert_rwonce_type(x); \ | ^ include/asm-generic/rwonce.h:36:48: note: expanded from macro 'compiletime_assert_rwonce_type' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^ include/linux/compiler_types.h:702:22: note: expanded from macro 'compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~ include/linux/compiler_types.h:690:23: note: expanded from macro '_compiletime_assert' 690 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~ include/linux/compiler_types.h:682:9: note: expanded from macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ kernel/bpf/sys_call.c:127:67: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~ ^ include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE' 50 | __READ_ONCE(x); \ | ^ include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE' 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ^ include/linux/compiler_types.h:635:53: note: expanded from macro '__unqual_scalar_typeof' 635 | #define __unqual_scalar_typeof(x) __typeof_unqual__(x) | ^ kernel/bpf/sys_call.c:127:67: error: no member named 'mode' in 'struct seccomp' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ~~~~~~~~~~~~~ ^ include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE' 50 | __READ_ONCE(x); \ | ^ include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE' 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ^ >> kernel/bpf/sys_call.c:209:7: error: no member named 'orig_ax' in 'struct pt_regs' 209 | regs.orig_ax = nr; | ~~~~ ^ >> kernel/bpf/sys_call.c:210:7: error: no member named 'di' in 'struct pt_regs' 210 | regs.di = args[0]; | ~~~~ ^ >> kernel/bpf/sys_call.c:211:7: error: no member named 'si' in 'struct pt_regs' 211 | regs.si = args[1]; | ~~~~ ^ >> kernel/bpf/sys_call.c:212:7: error: no member named 'dx' in 'struct pt_regs' 212 | regs.dx = args[2]; | ~~~~ ^ >> kernel/bpf/sys_call.c:213:7: error: no member named 'r10' in 'struct pt_regs' 213 | regs.r10 = args[3]; | ~~~~ ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. vim +127 kernel/bpf/sys_call.c 106 107 /* 108 * Whether @task has what a call made by the current thread would use in its 109 * place: the file table, the fs and the namespaces, and no filter or audit 110 * that the call would pass by. The pointers are compared, not followed: each 111 * changes only by its own thread, and a call that raced with such a change 112 * was made before it. 113 */ 114 static int bpf_sys_call_check(struct task_struct *task) 115 { 116 if (task != current) { 117 if (!same_thread_group(task, current)) 118 return -EPERM; 119 if (READ_ONCE(task->flags) & PF_EXITING) 120 return -ESRCH; 121 if (READ_ONCE(task->files) != current->files || 122 READ_ONCE(task->fs) != current->fs || 123 READ_ONCE(task->nsproxy) != current->nsproxy) 124 return -EPERM; 125 } 126 if (IS_ENABLED(CONFIG_SECCOMP) && > 127 (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) 128 return -EPERM; 129 if (!audit_dummy_context()) 130 return -EPERM; 131 return 0; 132 } 133 134 /* 135 * The work that the return to user mode would run for the calling thread: 136 * the release of a file whose last reference a call dropped, above all, 137 * which would otherwise wait until the thread leaves the program. io threads run theirs 138 * the same way, see io_run_task_work(). 139 */ 140 static void bpf_sys_call_task_work(void) 141 { 142 if (test_thread_flag(TIF_NOTIFY_SIGNAL)) 143 clear_notify_signal(); 144 if (task_work_pending(current)) { 145 __set_current_state(TASK_RUNNING); 146 task_work_run(); 147 } 148 } 149 150 __bpf_kfunc_start_defs(); 151 152 /** 153 * bpf_sys_call - Make a system call for a thread of the caller's process 154 * @task: the thread the call is made for, the calling thread or another one 155 * of its process 156 * @nr: the system call's number 157 * @args: its six arguments 158 * @args__sz: the size of @args, 48 159 * @aux: the calling program, set by the verifier 160 * 161 * Makes system call @nr in the calling thread, a thread of a user process 162 * running a syscall program, as @task would make it: see the comment at the 163 * top for what is the task's and what is refused. Pointers in @args are user 164 * addresses of the process. 165 * 166 * For the verifier the call is a park, see bpf_task_park(): the program 167 * leaves its Tasks Trace RCU read section and may migrate for the time of the 168 * call, which may sleep for as long as the system call does, and the time 169 * slice of its loops starts over when it returns. 170 * 171 * Signals are delivered on the return to user mode, which the call does not 172 * make. A call that a signal interrupted returns -ERESTARTSYS, 173 * -ERESTARTNOINTR, -ERESTARTNOHAND or -ERESTART_RESTARTBLOCK, as the system 174 * call gave it: it did nothing, and the program makes it again once the 175 * thread has been to user mode, or completes it with -EINTR. The program does 176 * not hand those codes to user space. A call is not begun while a signal is 177 * pending: that returns -ERESTARTNOINTR. Work queued for the thread's return 178 * to user mode, the release of a file whose last reference a call dropped 179 * among it, is run before and after the call. 180 * 181 * Return: what the system call returned, or -EINVAL if @args__sz is not 48, 182 * -ENOSYS if @nr is not a call that may be made for @task, -EPERM if the 183 * calling thread is not a thread of a user process, @task is not of its 184 * process or does not have its files, fs or namespaces, or a seccomp filter 185 * or syscall auditing applies, -ESRCH if @task is exiting, and 186 * -ERESTARTNOINTR if a signal is pending. 187 */ 188 __bpf_kfunc long bpf_sys_call(struct task_struct *task, u32 nr, const u64 *args, u32 args__sz, 189 struct bpf_prog_aux *aux) 190 { 191 const struct cred *cred = NULL, *old; 192 struct pt_regs regs = {}; 193 long ret; 194 195 if (args__sz != 6 * sizeof(u64)) 196 return -EINVAL; 197 if (!current->mm || (current->flags & (PF_KTHREAD | PF_USER_WORKER))) 198 return -EPERM; 199 if (nr >= NR_syscalls) 200 return -ENOSYS; 201 nr = array_index_nospec(nr, NR_syscalls); 202 if (!test_bit(nr, bpf_sys_call_for_process) && 203 !(task == current && test_bit(nr, bpf_sys_call_for_self))) 204 return -ENOSYS; 205 ret = bpf_sys_call_check(task); 206 if (ret) 207 return ret; 208 > 209 regs.orig_ax = nr; > 210 regs.di = args[0]; > 211 regs.si = args[1]; > 212 regs.dx = args[2]; > 213 regs.r10 = args[3]; 214 regs.r8 = args[4]; 215 regs.r9 = args[5]; 216 217 /* What bpf_task_park() does for its sleep, and for the same reasons. */ 218 migrate_enable(); 219 rcu_read_unlock_trace(); 220 221 bpf_sys_call_task_work(); 222 if (signal_pending(current)) { 223 ret = -ERESTARTNOINTR; 224 goto out; 225 } 226 /* 227 * The task's objective credentials: its subjective ones may be an 228 * override that a call of its own made for itself for a while. 229 */ 230 if (task != current && rcu_access_pointer(task->real_cred) != current_cred()) 231 cred = get_task_cred(task); 232 if (cred) 233 old = override_creds(cred); 234 ret = sys_call_table[nr](®s); 235 if (cred) { 236 revert_creds(old); 237 put_cred(cred); 238 } 239 bpf_sys_call_task_work(); 240 out: 241 rcu_read_lock_trace(); 242 migrate_disable(); 243 bpf_timed_may_goto_rearm(aux); 244 return ret; 245 } 246 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki