Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.9 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795951818; b=fE8DOOvppjq8dIADtzVotXPbr9qqpyaiy2YFJHK3hcG27JsXhbQJF0X4wEoYRNUS9S41 7AAFGuWiqnpjO/MEEgtxlJGYVNvAMQvCtrYgHKiJwnnV7MsDXQstFyZVxZ65LvqHmngZ3 UvcbJWzGTgr8SvZwe0gG5YFwVat/Agp27iOw2hgWwZIg1UcHSl+nmo6as/2MqN84wYuhF VDpsPevvgSRZNnSxh7RS943oOFh3cyP05BY4YKA3aMPSF9RgZeMMfjx3MUAaadOIAgde9 c0mh8AOHYXoVXpWDGf4klsstjsGvPKPQyLIKv0FpgOjp1Vt1IG5lNgeS9jiCaHxBBrQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795951818; 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=ii4gYMaI6ngOFr6Hy+bhLgZlqAb2tmVEoXPYcZqpUsA=; b=TQNxiG9sxUtIxOH6PoBJy3LW+Cseej/IvKFy/zHwFqr6LgOGyMYzx0jA4CvtHG0Hqr63 MTYY4Gc4iQ/4HLYJQcBkSPpiNI0N6FwG1m/xUSRT8J0/kyfWc6ryhDNOEXd6CXQE+D1Tc 9R25oP8s6HMDQZ4cx6Sz5Z4pTK+u9FuQI5/ovLKCCEd2XEVAOMxKeWGVhYvcz1eJQiqNT TdB9pxgv0hvwTd90PAKj551A5ODoXyr++tC+6ub3El4lhQxbf0uE/wW/8lHN/hhj9o1Vr O3s/KwY2C57wA9H/aa3Cc8aP41o2vc9rGyU/2pBxDu4yUeRM5608jJAWG8R3PcfkO5g== 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=gdnE3N1D; arc=none smtp.remote-ip=198.175.65.9 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 0D13F606A32E for ; Sun, 29 Nov 2026 11:30:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0D13F606A32E 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) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=gdnE3N1D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1795951818; x=1827487818; h=date:from:to:cc:subject:message-id; bh=zeGkRynOH+TLMQMFPtWitPvm6di66SSegb5CDXXVajc=; b=gdnE3N1Dsc3ru6FrqX1hVNNtxeA5lPEvnrz26I+YJAHYoRj8NvyilR2A i4CPs+gOI2mIsmkDpBY09kohiZwDgXUq3T3l7iu6f05gLO1d0SkNJziCh gMHm/K6LmoN7pPdWxD1N2e+EymTgrVGJujbv03On50Ff8PIrNvA3zf9EJ W1+UkMBLynSWReK+fvpJ+goxMOU70/nRUpx977cXRSDA2DwYAKZp5C3ua j9tHinbdvUTfTK76yrDYXG0NIKctv5JEZ9G+V81yHQuo0y2/viqcPgbIV /ltkOw3VOx8dtx9e6wr82ZiexHyf1cKt/eEWFVsSKEmnjyeabpZDduB6w A==; X-CSE-ConnectionGUID: Q6fd/ZePQSCmT9pa8nzBGg== X-CSE-MsgGUID: AaIld7ZlSOu0rsyPLOd0WQ== X-IronPort-AV: E=McAfee;i="6800,10657,11980"; a="4701871" X-IronPort-AV: E=Sophos;i="6.27,240,1787036400"; d="scan'208";a="4701871" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2026 03:30:17 -0800 X-CSE-ConnectionGUID: Q0WgqanWQ4CAP0+/bHbDzQ== X-CSE-MsgGUID: bcCYKeqCR1+GrbNCBs4xoA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,240,1787036400"; d="scan'208";a="12757784" Received: from igk-lkp-server01.igk.intel.com (HELO 146cf1e082f1) ([10.211.93.152]) by orviesa006.jf.intel.com with ESMTP; 29 Nov 2026 03:30:15 -0800 Received: from kbuild by 146cf1e082f1 with local (Exim 4.98.2) (envelope-from ) id 1xXd6j-00000000132-2Yj3; Sun, 29 Nov 2026 11:30:13 +0000 Date: Sun, 29 Nov 2026 12:30:12 +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:40: error: 'struct seccomp' has no member named 'mode' Message-ID: <20261129122548.tGrhJ9jn-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-2000-20261129 (https://download.01.org/0day-ci/archive/20261129/20261129122548.tGrhJ9jn-lkp@intel.com/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261129/20261129122548.tGrhJ9jn-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/20261129122548.tGrhJ9jn-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from : kernel/bpf/sys_call.c: In function 'bpf_sys_call_check': >> kernel/bpf/sys_call.c:127:40: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/sys_call.c:127:14: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ >> kernel/bpf/sys_call.c:127:40: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/sys_call.c:127:14: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ >> kernel/bpf/sys_call.c:127:40: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/sys_call.c:127:14: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ >> kernel/bpf/sys_call.c:127:40: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/sys_call.c:127:14: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ >> kernel/bpf/sys_call.c:127:40: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/sys_call.c:127:14: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ >> kernel/bpf/sys_call.c:127:40: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/linux/compiler_types.h:635:53: note: in definition of macro '__unqual_scalar_typeof' 635 | #define __unqual_scalar_typeof(x) __typeof_unqual__(x) | ^ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ kernel/bpf/sys_call.c:127:14: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ In file included from ./arch/x86/include/generated/asm/rwonce.h:1, from include/linux/compiler.h:394, from arch/um/include/asm/current.h:5, from include/linux/sched.h:12, from include/linux/audit.h:12, from kernel/bpf/sys_call.c:52: >> kernel/bpf/sys_call.c:127:40: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE' 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ^ kernel/bpf/sys_call.c:127:14: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ kernel/bpf/sys_call.c:127:73: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/sys_call.c:127:50: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ kernel/bpf/sys_call.c:127:73: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/sys_call.c:127:50: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ kernel/bpf/sys_call.c:127:73: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/sys_call.c:127:50: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ kernel/bpf/sys_call.c:127:73: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/sys_call.c:127:50: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ kernel/bpf/sys_call.c:127:73: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/sys_call.c:127:50: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ kernel/bpf/sys_call.c:127:73: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/linux/compiler_types.h:635:53: note: in definition of macro '__unqual_scalar_typeof' 635 | #define __unqual_scalar_typeof(x) __typeof_unqual__(x) | ^ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ kernel/bpf/sys_call.c:127:50: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ kernel/bpf/sys_call.c:127:73: error: 'struct seccomp' has no member named 'mode' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^ include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE' 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ^ kernel/bpf/sys_call.c:127:50: note: in expansion of macro 'READ_ONCE' 127 | (READ_ONCE(current->seccomp.mode) || READ_ONCE(task->seccomp.mode))) | ^~~~~~~~~ kernel/bpf/sys_call.c: In function 'bpf_sys_call': >> kernel/bpf/sys_call.c:209:13: error: 'struct pt_regs' has no member named 'orig_ax' 209 | regs.orig_ax = nr; | ^ >> kernel/bpf/sys_call.c:210:13: error: 'struct pt_regs' has no member named 'di' 210 | regs.di = args[0]; | ^ >> kernel/bpf/sys_call.c:211:13: error: 'struct pt_regs' has no member named 'si' 211 | regs.si = args[1]; | ^ >> kernel/bpf/sys_call.c:212:13: error: 'struct pt_regs' has no member named 'dx' 212 | regs.dx = args[2]; | ^ >> kernel/bpf/sys_call.c:213:13: error: 'struct pt_regs' has no member named 'r10' 213 | regs.r10 = args[3]; | ^ >> kernel/bpf/sys_call.c:214:13: error: 'struct pt_regs' has no member named 'r8' 214 | regs.r8 = args[4]; | ^ >> kernel/bpf/sys_call.c:215:13: error: 'struct pt_regs' has no member named 'r9' 215 | regs.r9 = args[5]; | ^ >> kernel/bpf/sys_call.c:234:34: error: passing argument 1 of 'sys_call_table[nr]' makes integer from pointer without a cast [-Wint-conversion] 234 | ret = sys_call_table[nr](®s); | ^~~~~ | | | struct pt_regs * kernel/bpf/sys_call.c:234:34: note: expected 'long unsigned int' but argument is of type 'struct pt_regs *' >> kernel/bpf/sys_call.c:234:15: error: too few arguments to function 'sys_call_table[nr]' 234 | ret = sys_call_table[nr](®s); | ^~~~~~~~~~~~~~ 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