Re: [RFC PATCH v2 net-next 16/16] net: bridge: switchdev: let drivers inform which bridge ports are offloaded
by kernel test robot
Hi Vladimir,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Vladimir-Oltean/Better-support-f...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 31222162557ca85808b9985de7e519041561f455
config: arm-randconfig-r025-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project fcc1ce00931751ac02498986feb37744e9ace8de)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/a25b1e23ecf26f2dc45247ebcf4ff5bde...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vladimir-Oltean/Better-support-for-sandwiched-LAGs-with-bridge-and-DSA/20210319-072218
git checkout a25b1e23ecf26f2dc45247ebcf4ff5bde213ac42
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from net/bridge/br_device.c:19:
In file included from net/bridge/br_private.h:13:
>> include/linux/if_bridge.h:204:5: warning: no previous prototype for function 'switchdev_bridge_port_offload' [-Wmissing-prototypes]
int switchdev_bridge_port_offload(struct net_device *dev,
^
include/linux/if_bridge.h:204:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int switchdev_bridge_port_offload(struct net_device *dev,
^
static
>> include/linux/if_bridge.h:210:5: warning: no previous prototype for function 'switchdev_bridge_port_unoffload' [-Wmissing-prototypes]
int switchdev_bridge_port_unoffload(struct net_device *dev)
^
include/linux/if_bridge.h:210:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int switchdev_bridge_port_unoffload(struct net_device *dev)
^
static
>> include/linux/if_bridge.h:212:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
2 warnings and 1 error generated.
--
In file included from net/bridge/br_netlink_tunnel.c:18:
In file included from net/bridge/br_private.h:13:
>> include/linux/if_bridge.h:204:5: warning: no previous prototype for function 'switchdev_bridge_port_offload' [-Wmissing-prototypes]
int switchdev_bridge_port_offload(struct net_device *dev,
^
include/linux/if_bridge.h:204:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int switchdev_bridge_port_offload(struct net_device *dev,
^
static
>> include/linux/if_bridge.h:210:5: warning: no previous prototype for function 'switchdev_bridge_port_unoffload' [-Wmissing-prototypes]
int switchdev_bridge_port_unoffload(struct net_device *dev)
^
include/linux/if_bridge.h:210:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int switchdev_bridge_port_unoffload(struct net_device *dev)
^
static
>> include/linux/if_bridge.h:212:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
net/bridge/br_netlink_tunnel.c:29:6: warning: no previous prototype for function 'vlan_tunid_inrange' [-Wmissing-prototypes]
bool vlan_tunid_inrange(const struct net_bridge_vlan *v_curr,
^
net/bridge/br_netlink_tunnel.c:29:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool vlan_tunid_inrange(const struct net_bridge_vlan *v_curr,
^
static
net/bridge/br_netlink_tunnel.c:196:5: warning: no previous prototype for function 'br_vlan_tunnel_info' [-Wmissing-prototypes]
int br_vlan_tunnel_info(const struct net_bridge_port *p, int cmd,
^
net/bridge/br_netlink_tunnel.c:196:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int br_vlan_tunnel_info(const struct net_bridge_port *p, int cmd,
^
static
4 warnings and 1 error generated.
vim +212 include/linux/if_bridge.h
198
199 #if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_NET_SWITCHDEV)
200 int switchdev_bridge_port_offload(struct net_device *dev,
201 struct netlink_ext_ack *extack);
202 int switchdev_bridge_port_unoffload(struct net_device *dev);
203 #else
> 204 int switchdev_bridge_port_offload(struct net_device *dev,
205 struct netlink_ext_ack *extack)
206 {
207 return 0;
208 }
209
> 210 int switchdev_bridge_port_unoffload(struct net_device *dev)
211 {
> 212 }
213 #endif
214
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH bpf-next 1/2] bpf: fix NULL pointer dereference in bpf_get_local_storage() helper
by kernel test robot
Hi Yonghong,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20210318]
[cannot apply to bpf-next/master bpf/master v5.12-rc3 v5.12-rc2 v5.12-rc1 v5.12-rc3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Yonghong-Song/bpf-fix-NULL-point...
base: ba5b053ab3ac674b91a6669086139819359a5e6e
config: i386-randconfig-a005-20210318 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/38b56e03d083be940fe9dc231c5f6c8f4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yonghong-Song/bpf-fix-NULL-pointer-dereference-in/20210319-082140
git checkout 38b56e03d083be940fe9dc231c5f6c8f4f282f15
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/asm-generic/percpu.h:7,
from arch/x86/include/asm/percpu.h:390,
from arch/x86/include/asm/current.h:6,
from arch/x86/include/asm/processor.h:17,
from arch/x86/include/asm/timex.h:5,
from include/linux/timex.h:65,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/workqueue.h:9,
from include/linux/bpf.h:9,
from include/linux/bpf-cgroup.h:5,
from kernel/bpf/local_storage.c:2:
>> kernel/bpf/local_storage.c:13:33: error: 'BPF_CGROUP_STORAGE_NEST_MAX' undeclared here (not in a function); did you mean 'BPF_CGROUP_STORAGE_PERCPU'?
13 | bpf_cgroup_storage_info[BPF_CGROUP_STORAGE_NEST_MAX]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:104:37: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
104 | __PCPU_ATTRS(sec) __typeof__(type) name
| ^~~~
kernel/bpf/local_storage.c:12:1: note: in expansion of macro 'DEFINE_PER_CPU'
12 | DEFINE_PER_CPU(struct bpf_cgroup_storage_info,
| ^~~~~~~~~~~~~~
vim +13 kernel/bpf/local_storage.c
11
12 DEFINE_PER_CPU(struct bpf_cgroup_storage_info,
> 13 bpf_cgroup_storage_info[BPF_CGROUP_STORAGE_NEST_MAX]);
14
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [RFC PATCH v2 net-next 16/16] net: bridge: switchdev: let drivers inform which bridge ports are offloaded
by kernel test robot
Hi Vladimir,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Vladimir-Oltean/Better-support-f...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 31222162557ca85808b9985de7e519041561f455
config: microblaze-randconfig-r031-20210318 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/a25b1e23ecf26f2dc45247ebcf4ff5bde...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vladimir-Oltean/Better-support-for-sandwiched-LAGs-with-bridge-and-DSA/20210319-072218
git checkout a25b1e23ecf26f2dc45247ebcf4ff5bde213ac42
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/ti/cpsw_switchdev.c:10:
>> include/linux/if_bridge.h:204:5: warning: no previous prototype for 'switchdev_bridge_port_offload' [-Wmissing-prototypes]
204 | int switchdev_bridge_port_offload(struct net_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/if_bridge.h:210:5: warning: no previous prototype for 'switchdev_bridge_port_unoffload' [-Wmissing-prototypes]
210 | int switchdev_bridge_port_unoffload(struct net_device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/ti/cpsw_switchdev.c:10:
include/linux/if_bridge.h: In function 'switchdev_bridge_port_unoffload':
include/linux/if_bridge.h:212:1: error: control reaches end of non-void function [-Werror=return-type]
212 | }
| ^
cc1: some warnings being treated as errors
--
drivers/net/ethernet/ti/cpsw_new.c: In function 'cpsw_netdevice_port_link':
>> drivers/net/ethernet/ti/cpsw_new.c:1527:8: error: implicit declaration of function 'switchdev_bridge_port_offload'; did you mean 'switchdev_handle_port_obj_add'? [-Werror=implicit-function-declaration]
1527 | err = switchdev_bridge_port_offload(ndev, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| switchdev_handle_port_obj_add
drivers/net/ethernet/ti/cpsw_new.c: In function 'cpsw_netdevice_port_unlink':
>> drivers/net/ethernet/ti/cpsw_new.c:1536:2: error: implicit declaration of function 'switchdev_bridge_port_unoffload'; did you mean 'switchdev_handle_port_obj_add'? [-Werror=implicit-function-declaration]
1536 | switchdev_bridge_port_unoffload(ndev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| switchdev_handle_port_obj_add
cc1: some warnings being treated as errors
--
In file included from net/dsa/port.c:9:
>> include/linux/if_bridge.h:204:5: warning: no previous prototype for 'switchdev_bridge_port_offload' [-Wmissing-prototypes]
204 | int switchdev_bridge_port_offload(struct net_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/if_bridge.h:210:5: warning: no previous prototype for 'switchdev_bridge_port_unoffload' [-Wmissing-prototypes]
210 | int switchdev_bridge_port_unoffload(struct net_device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/dsa/port.c: In function 'dsa_port_inherit_brport_flags':
net/dsa/port.c:152:34: error: implicit declaration of function 'dsa_port_to_bridge_port'; did you mean 'dsa_port_bridge_join'? [-Werror=implicit-function-declaration]
152 | struct net_device *brport_dev = dsa_port_to_bridge_port(dp);
| ^~~~~~~~~~~~~~~~~~~~~~~
| dsa_port_bridge_join
net/dsa/port.c:152:34: warning: initialization of 'struct net_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
net/dsa/port.c: In function 'dsa_port_switchdev_sync':
net/dsa/port.c:174:34: warning: initialization of 'struct net_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
174 | struct net_device *brport_dev = dsa_port_to_bridge_port(dp);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from net/dsa/port.c:9:
include/linux/if_bridge.h: In function 'switchdev_bridge_port_unoffload':
include/linux/if_bridge.h:212:1: error: control reaches end of non-void function [-Werror=return-type]
212 | }
| ^
cc1: some warnings being treated as errors
vim +1527 drivers/net/ethernet/ti/cpsw_new.c
1505
1506 static int cpsw_netdevice_port_link(struct net_device *ndev,
1507 struct net_device *br_ndev)
1508 {
1509 struct cpsw_priv *priv = netdev_priv(ndev);
1510 struct cpsw_common *cpsw = priv->cpsw;
1511 int err;
1512
1513 if (!cpsw->br_members) {
1514 cpsw->hw_bridge_dev = br_ndev;
1515 } else {
1516 /* This is adding the port to a second bridge, this is
1517 * unsupported
1518 */
1519 if (cpsw->hw_bridge_dev != br_ndev)
1520 return -EOPNOTSUPP;
1521 }
1522
1523 cpsw->br_members |= BIT(priv->emac_port);
1524
1525 cpsw_port_offload_fwd_mark_update(cpsw);
1526
> 1527 err = switchdev_bridge_port_offload(ndev, NULL);
1528 return notifier_to_errno(err);
1529 }
1530
1531 static void cpsw_netdevice_port_unlink(struct net_device *ndev)
1532 {
1533 struct cpsw_priv *priv = netdev_priv(ndev);
1534 struct cpsw_common *cpsw = priv->cpsw;
1535
> 1536 switchdev_bridge_port_unoffload(ndev);
1537
1538 cpsw->br_members &= ~BIT(priv->emac_port);
1539
1540 cpsw_port_offload_fwd_mark_update(cpsw);
1541
1542 if (!cpsw->br_members)
1543 cpsw->hw_bridge_dev = NULL;
1544 }
1545
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH bpf-next 2/2] bpf: fix bpf_cgroup_storage_set() usage in test_run
by kernel test robot
Hi Yonghong,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20210318]
[cannot apply to bpf-next/master bpf/master v5.12-rc3 v5.12-rc2 v5.12-rc1 v5.12-rc3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Yonghong-Song/bpf-fix-NULL-point...
base: ba5b053ab3ac674b91a6669086139819359a5e6e
config: arm-randconfig-r014-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project fcc1ce00931751ac02498986feb37744e9ace8de)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/4d3510a809c631ed53b78f7baa50fd4cc...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yonghong-Song/bpf-fix-NULL-pointer-dereference-in/20210319-082140
git checkout 4d3510a809c631ed53b78f7baa50fd4cc2730587
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> net/bpf/test_run.c:109:7: error: assigning to 'int' from incompatible type 'void'
ret = bpf_cgroup_storage_set(storage);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/bpf/test_run.c:118:3: error: implicit declaration of function 'bpf_cgroup_storage_unset' [-Werror,-Wimplicit-function-declaration]
bpf_cgroup_storage_unset();
^
net/bpf/test_run.c:118:3: note: did you mean 'bpf_cgroup_storage_set'?
include/linux/bpf-cgroup.h:492:20: note: 'bpf_cgroup_storage_set' declared here
static inline void bpf_cgroup_storage_set(
^
net/bpf/test_run.c:167:14: warning: no previous prototype for function 'bpf_fentry_test1' [-Wmissing-prototypes]
int noinline bpf_fentry_test1(int a)
^
net/bpf/test_run.c:167:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test1(int a)
^
static
net/bpf/test_run.c:172:14: warning: no previous prototype for function 'bpf_fentry_test2' [-Wmissing-prototypes]
int noinline bpf_fentry_test2(int a, u64 b)
^
net/bpf/test_run.c:172:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test2(int a, u64 b)
^
static
net/bpf/test_run.c:177:14: warning: no previous prototype for function 'bpf_fentry_test3' [-Wmissing-prototypes]
int noinline bpf_fentry_test3(char a, int b, u64 c)
^
net/bpf/test_run.c:177:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test3(char a, int b, u64 c)
^
static
net/bpf/test_run.c:182:14: warning: no previous prototype for function 'bpf_fentry_test4' [-Wmissing-prototypes]
int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
^
net/bpf/test_run.c:182:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
^
static
net/bpf/test_run.c:187:14: warning: no previous prototype for function 'bpf_fentry_test5' [-Wmissing-prototypes]
int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
^
net/bpf/test_run.c:187:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
^
static
net/bpf/test_run.c:192:14: warning: no previous prototype for function 'bpf_fentry_test6' [-Wmissing-prototypes]
int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
^
net/bpf/test_run.c:192:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
^
static
net/bpf/test_run.c:201:14: warning: no previous prototype for function 'bpf_fentry_test7' [-Wmissing-prototypes]
int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
^
net/bpf/test_run.c:201:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
^
static
net/bpf/test_run.c:206:14: warning: no previous prototype for function 'bpf_fentry_test8' [-Wmissing-prototypes]
int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
^
net/bpf/test_run.c:206:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
^
static
net/bpf/test_run.c:211:14: warning: no previous prototype for function 'bpf_modify_return_test' [-Wmissing-prototypes]
int noinline bpf_modify_return_test(int a, int *b)
^
net/bpf/test_run.c:211:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_modify_return_test(int a, int *b)
^
static
9 warnings and 2 errors generated.
vim +109 net/bpf/test_run.c
85
86 static int bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat,
87 u32 *retval, u32 *time, bool xdp)
88 {
89 struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = { NULL };
90 struct bpf_test_timer t = { NO_MIGRATE };
91 enum bpf_cgroup_storage_type stype;
92 int ret;
93
94 for_each_cgroup_storage_type(stype) {
95 storage[stype] = bpf_cgroup_storage_alloc(prog, stype);
96 if (IS_ERR(storage[stype])) {
97 storage[stype] = NULL;
98 for_each_cgroup_storage_type(stype)
99 bpf_cgroup_storage_free(storage[stype]);
100 return -ENOMEM;
101 }
102 }
103
104 if (!repeat)
105 repeat = 1;
106
107 bpf_test_timer_enter(&t);
108 do {
> 109 ret = bpf_cgroup_storage_set(storage);
110 if (ret)
111 break;
112
113 if (xdp)
114 *retval = bpf_prog_run_xdp(prog, ctx);
115 else
116 *retval = BPF_PROG_RUN(prog, ctx);
117
> 118 bpf_cgroup_storage_unset();
119 } while (bpf_test_timer_continue(&t, repeat, &ret, time));
120 bpf_test_timer_leave(&t);
121
122 for_each_cgroup_storage_type(stype)
123 bpf_cgroup_storage_free(storage[stype]);
124
125 return ret;
126 }
127
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [RFC PATCH v2 net-next 03/16] net: dsa: inherit the actual bridge port flags at join time
by kernel test robot
Hi Vladimir,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Vladimir-Oltean/Better-support-f...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 31222162557ca85808b9985de7e519041561f455
config: microblaze-randconfig-r031-20210318 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/cb132bd734dc880ec90ec12980b6567ef...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vladimir-Oltean/Better-support-for-sandwiched-LAGs-with-bridge-and-DSA/20210319-072218
git checkout cb132bd734dc880ec90ec12980b6567efa0819fd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
net/dsa/port.c: In function 'dsa_port_inherit_brport_flags':
>> net/dsa/port.c:152:34: error: implicit declaration of function 'dsa_port_to_bridge_port'; did you mean 'dsa_port_bridge_join'? [-Werror=implicit-function-declaration]
152 | struct net_device *brport_dev = dsa_port_to_bridge_port(dp);
| ^~~~~~~~~~~~~~~~~~~~~~~
| dsa_port_bridge_join
>> net/dsa/port.c:152:34: warning: initialization of 'struct net_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
vim +152 net/dsa/port.c
146
147 static int dsa_port_inherit_brport_flags(struct dsa_port *dp,
148 struct netlink_ext_ack *extack)
149 {
150 const unsigned long mask = BR_LEARNING | BR_FLOOD | BR_MCAST_FLOOD |
151 BR_BCAST_FLOOD;
> 152 struct net_device *brport_dev = dsa_port_to_bridge_port(dp);
153 int flag, err;
154
155 for_each_set_bit(flag, &mask, 32) {
156 struct switchdev_brport_flags flags = {0};
157
158 flags.mask = BIT(flag);
159
160 if (br_port_flag_is_set(brport_dev, BIT(flag)))
161 flags.val = BIT(flag);
162
163 err = dsa_port_bridge_flags(dp, flags, extack);
164 if (err && err != -EOPNOTSUPP)
165 return err;
166 }
167
168 return 0;
169 }
170
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH bpf-next 1/2] bpf: fix NULL pointer dereference in bpf_get_local_storage() helper
by kernel test robot
Hi Yonghong,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20210318]
[cannot apply to bpf-next/master bpf/master v5.12-rc3 v5.12-rc2 v5.12-rc1 v5.12-rc3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Yonghong-Song/bpf-fix-NULL-point...
base: ba5b053ab3ac674b91a6669086139819359a5e6e
config: powerpc-randconfig-r034-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project fcc1ce00931751ac02498986feb37744e9ace8de)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/0day-ci/linux/commit/38b56e03d083be940fe9dc231c5f6c8f4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yonghong-Song/bpf-fix-NULL-pointer-dereference-in/20210319-082140
git checkout 38b56e03d083be940fe9dc231c5f6c8f4f282f15
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:210:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/bpf/local_storage.c:6:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:212:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/bpf/local_storage.c:6:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:214:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/bpf/local_storage.c:6:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:216:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/bpf/local_storage.c:6:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:218:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/bpf/local_storage.c:6:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:220:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> kernel/bpf/local_storage.c:13:33: error: use of undeclared identifier 'BPF_CGROUP_STORAGE_NEST_MAX'
bpf_cgroup_storage_info[BPF_CGROUP_STORAGE_NEST_MAX]);
^
6 warnings and 1 error generated.
--
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:200:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/trace/bpf_trace.c:11:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:202:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/trace/bpf_trace.c:11:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:204:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/trace/bpf_trace.c:11:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:206:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/trace/bpf_trace.c:11:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:208:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/trace/bpf_trace.c:11:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:210:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> kernel/trace/bpf_trace.c:127:8: error: invalid argument type 'void' to unary expression
ret = BPF_PROG_RUN_ARRAY_CHECK(call->prog_array, ctx, BPF_PROG_RUN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bpf.h:1194:2: note: expanded from macro 'BPF_PROG_RUN_ARRAY_CHECK'
__BPF_PROG_RUN_ARRAY(array, ctx, func, true, false)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bpf.h:1141:9: note: expanded from macro '__BPF_PROG_RUN_ARRAY'
if (unlikely(bpf_cgroup_storage_set(_item->cgroup_storage))) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:40: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^~~~
>> kernel/trace/bpf_trace.c:127:8: error: implicit declaration of function 'bpf_cgroup_storage_unset' [-Werror,-Wimplicit-function-declaration]
include/linux/bpf.h:1194:2: note: expanded from macro 'BPF_PROG_RUN_ARRAY_CHECK'
__BPF_PROG_RUN_ARRAY(array, ctx, func, true, false)
^
include/linux/bpf.h:1144:5: note: expanded from macro '__BPF_PROG_RUN_ARRAY'
bpf_cgroup_storage_unset(); \
^
kernel/trace/bpf_trace.c:127:8: note: did you mean 'bpf_cgroup_storage_set'?
include/linux/bpf.h:1194:2: note: expanded from macro 'BPF_PROG_RUN_ARRAY_CHECK'
__BPF_PROG_RUN_ARRAY(array, ctx, func, true, false)
^
include/linux/bpf.h:1144:5: note: expanded from macro '__BPF_PROG_RUN_ARRAY'
bpf_cgroup_storage_unset(); \
^
include/linux/bpf-cgroup.h:492:20: note: 'bpf_cgroup_storage_set' declared here
static inline void bpf_cgroup_storage_set(
^
6 warnings and 2 errors generated.
vim +/BPF_CGROUP_STORAGE_NEST_MAX +13 kernel/bpf/local_storage.c
11
12 DEFINE_PER_CPU(struct bpf_cgroup_storage_info,
> 13 bpf_cgroup_storage_info[BPF_CGROUP_STORAGE_NEST_MAX]);
14
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH mac80211-next v6] mac80211: Switch to a virtual time-based airtime scheduler
by kernel test robot
Hi "Toke,
I love your patch! Perhaps something to improve:
[auto build test WARNING on mac80211-next/master]
url: https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/mac80211-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/23d429aa540736e04237eb11c63c03d92...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Toke-H-iland-J-rgensen/mac80211-Switch-to-a-virtual-time-based-airtime-scheduler/20210319-053617
git checkout 23d429aa540736e04237eb11c63c03d929653774
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
net/mac80211/cfg.c: In function 'sta_apply_parameters':
>> net/mac80211/cfg.c:1452:26: warning: variable 'old_weight' set but not used [-Wunused-but-set-variable]
1452 | u32 mask, set, tid, ac, old_weight;
| ^~~~~~~~~~
vim +/old_weight +1452 net/mac80211/cfg.c
1444
1445 static int sta_apply_parameters(struct ieee80211_local *local,
1446 struct sta_info *sta,
1447 struct station_parameters *params)
1448 {
1449 int ret = 0;
1450 struct ieee80211_supported_band *sband;
1451 struct ieee80211_sub_if_data *sdata = sta->sdata;
> 1452 u32 mask, set, tid, ac, old_weight;
1453 struct txq_info *txqi;
1454
1455 sband = ieee80211_get_sband(sdata);
1456 if (!sband)
1457 return -EINVAL;
1458
1459 mask = params->sta_flags_mask;
1460 set = params->sta_flags_set;
1461
1462 if (ieee80211_vif_is_mesh(&sdata->vif)) {
1463 /*
1464 * In mesh mode, ASSOCIATED isn't part of the nl80211
1465 * API but must follow AUTHENTICATED for driver state.
1466 */
1467 if (mask & BIT(NL80211_STA_FLAG_AUTHENTICATED))
1468 mask |= BIT(NL80211_STA_FLAG_ASSOCIATED);
1469 if (set & BIT(NL80211_STA_FLAG_AUTHENTICATED))
1470 set |= BIT(NL80211_STA_FLAG_ASSOCIATED);
1471 } else if (test_sta_flag(sta, WLAN_STA_TDLS_PEER)) {
1472 /*
1473 * TDLS -- everything follows authorized, but
1474 * only becoming authorized is possible, not
1475 * going back
1476 */
1477 if (set & BIT(NL80211_STA_FLAG_AUTHORIZED)) {
1478 set |= BIT(NL80211_STA_FLAG_AUTHENTICATED) |
1479 BIT(NL80211_STA_FLAG_ASSOCIATED);
1480 mask |= BIT(NL80211_STA_FLAG_AUTHENTICATED) |
1481 BIT(NL80211_STA_FLAG_ASSOCIATED);
1482 }
1483 }
1484
1485 if (mask & BIT(NL80211_STA_FLAG_WME) &&
1486 local->hw.queues >= IEEE80211_NUM_ACS)
1487 sta->sta.wme = set & BIT(NL80211_STA_FLAG_WME);
1488
1489 /* auth flags will be set later for TDLS,
1490 * and for unassociated stations that move to assocaited */
1491 if (!test_sta_flag(sta, WLAN_STA_TDLS_PEER) &&
1492 !((mask & BIT(NL80211_STA_FLAG_ASSOCIATED)) &&
1493 (set & BIT(NL80211_STA_FLAG_ASSOCIATED)))) {
1494 ret = sta_apply_auth_flags(local, sta, mask, set);
1495 if (ret)
1496 return ret;
1497 }
1498
1499 if (mask & BIT(NL80211_STA_FLAG_SHORT_PREAMBLE)) {
1500 if (set & BIT(NL80211_STA_FLAG_SHORT_PREAMBLE))
1501 set_sta_flag(sta, WLAN_STA_SHORT_PREAMBLE);
1502 else
1503 clear_sta_flag(sta, WLAN_STA_SHORT_PREAMBLE);
1504 }
1505
1506 if (mask & BIT(NL80211_STA_FLAG_MFP)) {
1507 sta->sta.mfp = !!(set & BIT(NL80211_STA_FLAG_MFP));
1508 if (set & BIT(NL80211_STA_FLAG_MFP))
1509 set_sta_flag(sta, WLAN_STA_MFP);
1510 else
1511 clear_sta_flag(sta, WLAN_STA_MFP);
1512 }
1513
1514 if (mask & BIT(NL80211_STA_FLAG_TDLS_PEER)) {
1515 if (set & BIT(NL80211_STA_FLAG_TDLS_PEER))
1516 set_sta_flag(sta, WLAN_STA_TDLS_PEER);
1517 else
1518 clear_sta_flag(sta, WLAN_STA_TDLS_PEER);
1519 }
1520
1521 /* mark TDLS channel switch support, if the AP allows it */
1522 if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) &&
1523 !sdata->u.mgd.tdls_chan_switch_prohibited &&
1524 params->ext_capab_len >= 4 &&
1525 params->ext_capab[3] & WLAN_EXT_CAPA4_TDLS_CHAN_SWITCH)
1526 set_sta_flag(sta, WLAN_STA_TDLS_CHAN_SWITCH);
1527
1528 if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) &&
1529 !sdata->u.mgd.tdls_wider_bw_prohibited &&
1530 ieee80211_hw_check(&local->hw, TDLS_WIDER_BW) &&
1531 params->ext_capab_len >= 8 &&
1532 params->ext_capab[7] & WLAN_EXT_CAPA8_TDLS_WIDE_BW_ENABLED)
1533 set_sta_flag(sta, WLAN_STA_TDLS_WIDER_BW);
1534
1535 if (params->sta_modify_mask & STATION_PARAM_APPLY_UAPSD) {
1536 sta->sta.uapsd_queues = params->uapsd_queues;
1537 sta->sta.max_sp = params->max_sp;
1538 }
1539
1540 /* The sender might not have sent the last bit, consider it to be 0 */
1541 if (params->ext_capab_len >= 8) {
1542 u8 val = (params->ext_capab[7] &
1543 WLAN_EXT_CAPA8_MAX_MSDU_IN_AMSDU_LSB) >> 7;
1544
1545 /* we did get all the bits, take the MSB as well */
1546 if (params->ext_capab_len >= 9) {
1547 u8 val_msb = params->ext_capab[8] &
1548 WLAN_EXT_CAPA9_MAX_MSDU_IN_AMSDU_MSB;
1549 val_msb <<= 1;
1550 val |= val_msb;
1551 }
1552
1553 switch (val) {
1554 case 1:
1555 sta->sta.max_amsdu_subframes = 32;
1556 break;
1557 case 2:
1558 sta->sta.max_amsdu_subframes = 16;
1559 break;
1560 case 3:
1561 sta->sta.max_amsdu_subframes = 8;
1562 break;
1563 default:
1564 sta->sta.max_amsdu_subframes = 0;
1565 }
1566 }
1567
1568 /*
1569 * cfg80211 validates this (1-2007) and allows setting the AID
1570 * only when creating a new station entry
1571 */
1572 if (params->aid)
1573 sta->sta.aid = params->aid;
1574
1575 /*
1576 * Some of the following updates would be racy if called on an
1577 * existing station, via ieee80211_change_station(). However,
1578 * all such changes are rejected by cfg80211 except for updates
1579 * changing the supported rates on an existing but not yet used
1580 * TDLS peer.
1581 */
1582
1583 if (params->listen_interval >= 0)
1584 sta->listen_interval = params->listen_interval;
1585
1586 if (params->sta_modify_mask & STATION_PARAM_APPLY_STA_TXPOWER) {
1587 sta->sta.txpwr.type = params->txpwr.type;
1588 if (params->txpwr.type == NL80211_TX_POWER_LIMITED)
1589 sta->sta.txpwr.power = params->txpwr.power;
1590 ret = drv_sta_set_txpwr(local, sdata, sta);
1591 if (ret)
1592 return ret;
1593 }
1594
1595 if (params->supported_rates && params->supported_rates_len) {
1596 ieee80211_parse_bitrates(&sdata->vif.bss_conf.chandef,
1597 sband, params->supported_rates,
1598 params->supported_rates_len,
1599 &sta->sta.supp_rates[sband->band]);
1600 }
1601
1602 if (params->ht_capa)
1603 ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
1604 params->ht_capa, sta);
1605
1606 /* VHT can override some HT caps such as the A-MSDU max length */
1607 if (params->vht_capa)
1608 ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband,
1609 params->vht_capa, sta);
1610
1611 if (params->he_capa)
1612 ieee80211_he_cap_ie_to_sta_he_cap(sdata, sband,
1613 (void *)params->he_capa,
1614 params->he_capa_len,
1615 (void *)params->he_6ghz_capa,
1616 sta);
1617
1618 if (params->opmode_notif_used) {
1619 /* returned value is only needed for rc update, but the
1620 * rc isn't initialized here yet, so ignore it
1621 */
1622 __ieee80211_vht_handle_opmode(sdata, sta, params->opmode_notif,
1623 sband->band);
1624 }
1625
1626 if (params->support_p2p_ps >= 0)
1627 sta->sta.support_p2p_ps = params->support_p2p_ps;
1628
1629 if (ieee80211_vif_is_mesh(&sdata->vif))
1630 sta_apply_mesh_params(local, sta, params);
1631
1632 if (params->airtime_weight) {
1633 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
1634 struct airtime_sched_info *air_sched = &local->airtime[ac];
1635 struct airtime_info *air_info = &sta->airtime[ac];
1636
1637 spin_lock_bh(&air_sched->lock);
1638 for (tid = 0; tid < IEEE80211_NUM_TIDS + 1; tid++) {
1639 if (air_info->weight == params->airtime_weight ||
1640 !sta->sta.txq[tid] ||
1641 ac != ieee80211_ac_from_tid(tid))
1642 continue;
1643
1644 old_weight = air_info->weight;
1645 airtime_weight_set(air_info, params->airtime_weight);
1646
1647 txqi = to_txq_info(sta->sta.txq[tid]);
1648 if (RB_EMPTY_NODE(&txqi->schedule_order))
1649 continue;
1650
1651 ieee80211_update_airtime_weight(local, air_sched, 0, true);
1652 }
1653 spin_unlock_bh(&air_sched->lock);
1654 }
1655 }
1656
1657 /* set the STA state after all sta info from usermode has been set */
1658 if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) ||
1659 set & BIT(NL80211_STA_FLAG_ASSOCIATED)) {
1660 ret = sta_apply_auth_flags(local, sta, mask, set);
1661 if (ret)
1662 return ret;
1663 }
1664
1665 return 0;
1666 }
1667
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v2] gpio: pl061: Support implementations without GPIOINTR line
by kernel test robot
Hi Alexander,
I love your patch! Perhaps something to improve:
[auto build test WARNING on gpio/for-next]
[also build test WARNING on v5.12-rc3 next-20210318]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Alexander-A-Sverdlin/gpio-pl061-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/bbac642db33d1e12c5a11a9630822bf16...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexander-A-Sverdlin/gpio-pl061-Support-implementations-without-GPIOINTR-line/20210319-031352
git checkout bbac642db33d1e12c5a11a9630822bf16706c988
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpio/gpio-pl061.c:305:6: warning: no previous prototype for 'pl061_populate_parent_fwspec' [-Wmissing-prototypes]
305 | void pl061_populate_parent_fwspec(struct gpio_chip *gc,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-pl061.c: In function 'pl061_probe':
drivers/gpio/gpio-pl061.c:416:9: error: 'struct gpio_irq_chip' has no member named 'populate_parent_fwspec'; did you mean 'populate_parent_alloc_arg'?
416 | girq->populate_parent_fwspec = pl061_populate_parent_fwspec;
| ^~~~~~~~~~~~~~~~~~~~~~
| populate_parent_alloc_arg
vim +/pl061_populate_parent_fwspec +305 drivers/gpio/gpio-pl061.c
303
304 #ifdef CONFIG_OF
> 305 void pl061_populate_parent_fwspec(struct gpio_chip *gc,
306 struct irq_fwspec *fwspec,
307 unsigned int parent_hwirq,
308 unsigned int parent_type)
309 {
310 struct device_node *dn = to_of_node(gc->irq.fwnode);
311 struct of_phandle_args pha;
312 int i;
313
314 fwspec->param_count = 0;
315
316 if (WARN_ON(!dn))
317 return;
318
319 /*
320 * This brute-force here is because of the fact PL061 is often paired
321 * with GIC-v3, which has 3-cell IRQ specifier (SPI/PPI selection), and
322 * unexpected range shifts in hwirq mapping (SPI IRQs are shifted by
323 * 32). So this is about reversing of gic_irq_domain_translate().
324 */
325 for (i = 0; i < PL061_GPIO_NR; i++) {
326 unsigned int p, pt;
327
328 if (pl061_child_to_parent_hwirq(gc, i, parent_type, &p, &pt))
329 continue;
330 if (p == parent_hwirq)
331 break;
332 }
333 if (WARN_ON(i == PL061_GPIO_NR))
334 return;
335
336 if (WARN_ON(of_irq_parse_one(dn, i, &pha)))
337 return;
338
339 fwspec->param_count = pha.args_count;
340 for (i = 0; i < pha.args_count; i++)
341 fwspec->param[i] = pha.args[i];
342 }
343 #endif
344
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v2] gpio: pl061: Support implementations without GPIOINTR line
by kernel test robot
Hi Alexander,
I love your patch! Yet something to improve:
[auto build test ERROR on gpio/for-next]
[also build test ERROR on v5.12-rc3 next-20210318]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Alexander-A-Sverdlin/gpio-pl061-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: arm-randconfig-r006-20210318 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/bbac642db33d1e12c5a11a9630822bf16...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexander-A-Sverdlin/gpio-pl061-Support-implementations-without-GPIOINTR-line/20210319-031352
git checkout bbac642db33d1e12c5a11a9630822bf16706c988
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/gpio/gpio-pl061.c:305:6: warning: no previous prototype for 'pl061_populate_parent_fwspec' [-Wmissing-prototypes]
305 | void pl061_populate_parent_fwspec(struct gpio_chip *gc,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-pl061.c: In function 'pl061_probe':
>> drivers/gpio/gpio-pl061.c:416:9: error: 'struct gpio_irq_chip' has no member named 'populate_parent_fwspec'; did you mean 'populate_parent_alloc_arg'?
416 | girq->populate_parent_fwspec = pl061_populate_parent_fwspec;
| ^~~~~~~~~~~~~~~~~~~~~~
| populate_parent_alloc_arg
vim +416 drivers/gpio/gpio-pl061.c
303
304 #ifdef CONFIG_OF
> 305 void pl061_populate_parent_fwspec(struct gpio_chip *gc,
306 struct irq_fwspec *fwspec,
307 unsigned int parent_hwirq,
308 unsigned int parent_type)
309 {
310 struct device_node *dn = to_of_node(gc->irq.fwnode);
311 struct of_phandle_args pha;
312 int i;
313
314 fwspec->param_count = 0;
315
316 if (WARN_ON(!dn))
317 return;
318
319 /*
320 * This brute-force here is because of the fact PL061 is often paired
321 * with GIC-v3, which has 3-cell IRQ specifier (SPI/PPI selection), and
322 * unexpected range shifts in hwirq mapping (SPI IRQs are shifted by
323 * 32). So this is about reversing of gic_irq_domain_translate().
324 */
325 for (i = 0; i < PL061_GPIO_NR; i++) {
326 unsigned int p, pt;
327
328 if (pl061_child_to_parent_hwirq(gc, i, parent_type, &p, &pt))
329 continue;
330 if (p == parent_hwirq)
331 break;
332 }
333 if (WARN_ON(i == PL061_GPIO_NR))
334 return;
335
336 if (WARN_ON(of_irq_parse_one(dn, i, &pha)))
337 return;
338
339 fwspec->param_count = pha.args_count;
340 for (i = 0; i < pha.args_count; i++)
341 fwspec->param[i] = pha.args[i];
342 }
343 #endif
344
345 static int pl061_probe(struct amba_device *adev, const struct amba_id *id)
346 {
347 struct device *dev = &adev->dev;
348 struct pl061 *pl061;
349 struct gpio_irq_chip *girq;
350 int ret, irq;
351
352 pl061 = devm_kzalloc(dev, sizeof(*pl061), GFP_KERNEL);
353 if (pl061 == NULL)
354 return -ENOMEM;
355
356 pl061->base = devm_ioremap_resource(dev, &adev->res);
357 if (IS_ERR(pl061->base))
358 return PTR_ERR(pl061->base);
359
360 raw_spin_lock_init(&pl061->lock);
361 pl061->gc.request = gpiochip_generic_request;
362 pl061->gc.free = gpiochip_generic_free;
363 pl061->gc.base = -1;
364 pl061->gc.get_direction = pl061_get_direction;
365 pl061->gc.direction_input = pl061_direction_input;
366 pl061->gc.direction_output = pl061_direction_output;
367 pl061->gc.get = pl061_get_value;
368 pl061->gc.set = pl061_set_value;
369 pl061->gc.ngpio = PL061_GPIO_NR;
370 pl061->gc.label = dev_name(dev);
371 pl061->gc.parent = dev;
372 pl061->gc.owner = THIS_MODULE;
373
374 /*
375 * irq_chip support
376 */
377 pl061->irq_chip.name = dev_name(dev);
378 pl061->irq_chip.irq_ack = pl061_irq_ack;
379 pl061->irq_chip.irq_mask = pl061_irq_mask;
380 pl061->irq_chip.irq_unmask = pl061_irq_unmask;
381 pl061->irq_chip.irq_set_type = pl061_irq_type;
382 pl061->irq_chip.irq_set_wake = pl061_irq_set_wake;
383
384 writeb(0, pl061->base + GPIOIE); /* disable irqs */
385 irq = adev->irq[0];
386 if (!irq)
387 dev_warn(&adev->dev, "IRQ support disabled\n");
388 pl061->parent_irq = irq;
389
390 girq = &pl061->gc.irq;
391 girq->chip = &pl061->irq_chip;
392 girq->default_type = IRQ_TYPE_NONE;
393 girq->handler = handle_bad_irq;
394
395 /*
396 * There are some PL061 implementations which lack GPIOINTR in hardware
397 * and only have individual GPIOMIS[7:0] signals. We distinguish them by
398 * the number of IRQs assigned to the AMBA device.
399 */
400 if (!adev->irq[PL061_GPIO_NR - 1]) {
401 WARN_ON(adev->irq[1]);
402
403 girq->parent_handler = pl061_irq_handler;
404 girq->num_parents = 1;
405 girq->parents = devm_kcalloc(dev, 1, sizeof(*girq->parents),
406 GFP_KERNEL);
407 if (!girq->parents)
408 return -ENOMEM;
409 girq->parents[0] = irq;
410 } else {
411 girq->fwnode = dev->fwnode;
412 girq->parent_domain =
413 irq_get_irq_data(adev->irq[PL061_GPIO_NR - 1])->domain;
414 girq->child_to_parent_hwirq = pl061_child_to_parent_hwirq;
415 #ifdef CONFIG_OF
> 416 girq->populate_parent_fwspec = pl061_populate_parent_fwspec;
417 #endif
418 }
419
420 ret = devm_gpiochip_add_data(dev, &pl061->gc, pl061);
421 if (ret)
422 return ret;
423
424 amba_set_drvdata(adev, pl061);
425 dev_info(dev, "PL061 GPIO chip registered\n");
426
427 return 0;
428 }
429
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[tip:x86/sgx 2/2] arch/x86/kernel/cpu/sgx/main.c:496:7: warning: variable 'nid' is used uninitialized whenever 'if' condition is false
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/sgx
head: 5b8719504e3adf47646273781591ad439b3c3c7a
commit: 5b8719504e3adf47646273781591ad439b3c3c7a [2/2] x86/sgx: Add a basic NUMA allocation scheme to sgx_alloc_epc_page()
config: x86_64-randconfig-r004-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6db3ab2903f42712f44000afb5aa467efbd25f35)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=5b...
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip x86/sgx
git checkout 5b8719504e3adf47646273781591ad439b3c3c7a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/x86/kernel/cpu/sgx/main.c:496:7: warning: variable 'nid' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (page)
^~~~
arch/x86/kernel/cpu/sgx/main.c:502:22: note: uninitialized use occurs here
nid = next_node_in(nid, sgx_numa_mask);
^~~
include/linux/nodemask.h:278:46: note: expanded from macro 'next_node_in'
#define next_node_in(n, src) __next_node_in((n), &(src))
^
arch/x86/kernel/cpu/sgx/main.c:496:3: note: remove the 'if' if its condition is always true
if (page)
^~~~~~~~~
arch/x86/kernel/cpu/sgx/main.c:494:6: warning: variable 'nid' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (node_isset(nid_of_current, sgx_numa_mask)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/nodemask.h:152:36: note: expanded from macro 'node_isset'
#define node_isset(node, nodemask) test_bit((node), (nodemask).bits)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/cpu/sgx/main.c:502:22: note: uninitialized use occurs here
nid = next_node_in(nid, sgx_numa_mask);
^~~
include/linux/nodemask.h:278:46: note: expanded from macro 'next_node_in'
#define next_node_in(n, src) __next_node_in((n), &(src))
^
arch/x86/kernel/cpu/sgx/main.c:494:2: note: remove the 'if' if its condition is always true
if (node_isset(nid_of_current, sgx_numa_mask)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/cpu/sgx/main.c:492:9: note: initialize the variable 'nid' to silence this warning
int nid;
^
= 0
2 warnings generated.
vim +496 arch/x86/kernel/cpu/sgx/main.c
d2285493bef310 Jarkko Sakkinen 2020-11-13 477
d2285493bef310 Jarkko Sakkinen 2020-11-13 478 /**
d2285493bef310 Jarkko Sakkinen 2020-11-13 479 * __sgx_alloc_epc_page() - Allocate an EPC page
d2285493bef310 Jarkko Sakkinen 2020-11-13 480 *
5b8719504e3adf Jarkko Sakkinen 2021-03-18 481 * Iterate through NUMA nodes and reserve ia free EPC page to the caller. Start
5b8719504e3adf Jarkko Sakkinen 2021-03-18 482 * from the NUMA node, where the caller is executing.
d2285493bef310 Jarkko Sakkinen 2020-11-13 483 *
d2285493bef310 Jarkko Sakkinen 2020-11-13 484 * Return:
5b8719504e3adf Jarkko Sakkinen 2021-03-18 485 * - an EPC page: A borrowed EPC pages were available.
5b8719504e3adf Jarkko Sakkinen 2021-03-18 486 * - NULL: Out of EPC pages.
d2285493bef310 Jarkko Sakkinen 2020-11-13 487 */
d2285493bef310 Jarkko Sakkinen 2020-11-13 488 struct sgx_epc_page *__sgx_alloc_epc_page(void)
d2285493bef310 Jarkko Sakkinen 2020-11-13 489 {
d2285493bef310 Jarkko Sakkinen 2020-11-13 490 struct sgx_epc_page *page;
5b8719504e3adf Jarkko Sakkinen 2021-03-18 491 int nid_of_current = numa_node_id();
5b8719504e3adf Jarkko Sakkinen 2021-03-18 492 int nid;
d2285493bef310 Jarkko Sakkinen 2020-11-13 493
5b8719504e3adf Jarkko Sakkinen 2021-03-18 494 if (node_isset(nid_of_current, sgx_numa_mask)) {
5b8719504e3adf Jarkko Sakkinen 2021-03-18 495 page = __sgx_alloc_epc_page_from_node(nid_of_current);
d2285493bef310 Jarkko Sakkinen 2020-11-13 @496 if (page)
d2285493bef310 Jarkko Sakkinen 2020-11-13 497 return page;
d2285493bef310 Jarkko Sakkinen 2020-11-13 498 }
d2285493bef310 Jarkko Sakkinen 2020-11-13 499
5b8719504e3adf Jarkko Sakkinen 2021-03-18 500 /* Fall back to the non-local NUMA nodes: */
5b8719504e3adf Jarkko Sakkinen 2021-03-18 501 while (true) {
5b8719504e3adf Jarkko Sakkinen 2021-03-18 502 nid = next_node_in(nid, sgx_numa_mask);
5b8719504e3adf Jarkko Sakkinen 2021-03-18 503 if (nid == nid_of_current)
5b8719504e3adf Jarkko Sakkinen 2021-03-18 504 break;
5b8719504e3adf Jarkko Sakkinen 2021-03-18 505
5b8719504e3adf Jarkko Sakkinen 2021-03-18 506 page = __sgx_alloc_epc_page_from_node(nid);
5b8719504e3adf Jarkko Sakkinen 2021-03-18 507 if (page)
5b8719504e3adf Jarkko Sakkinen 2021-03-18 508 break;
5b8719504e3adf Jarkko Sakkinen 2021-03-18 509 }
5b8719504e3adf Jarkko Sakkinen 2021-03-18 510
5b8719504e3adf Jarkko Sakkinen 2021-03-18 511 return page;
d2285493bef310 Jarkko Sakkinen 2020-11-13 512 }
d2285493bef310 Jarkko Sakkinen 2020-11-13 513
:::::: The code at line 496 was first introduced by commit
:::::: d2285493bef310b66b56dfe4eb75c1e2f431ea5c x86/sgx: Add SGX page allocator functions
:::::: TO: Jarkko Sakkinen <jarkko(a)kernel.org>
:::::: CC: Borislav Petkov <bp(a)suse.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months