From: kernel test robot <lkp@intel.com>
To: Liu Jian <liujian56@huawei.com>,
john.fastabend@gmail.com, daniel@iogearbox.net,
jakub@cloudflare.com, lmb@cloudflare.com, davem@davemloft.net,
kuba@kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: kbuild-all@lists.01.org, liujian56@huawei.com
Subject: Re: [PATCH] skmsg: lose offset info in sk_psock_skb_ingress
Date: Thu, 16 Sep 2021 15:14:13 +0800 [thread overview]
Message-ID: <202109161534.AkP0zTMF-lkp@intel.com> (raw)
In-Reply-To: <20210915140629.18558-1-liujian56@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 5356 bytes --]
Hi Liu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.15-rc1 next-20210915]
[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/Liu-Jian/skmsg-lose-offset-info-in-sk_psock_skb_ingress/20210915-220839
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3ca706c189db861b2ca2019a0901b94050ca49d8
config: h8300-randconfig-r031-20210916 (attached as .config)
compiler: h8300-linux-gcc (GCC) 11.2.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/7736d12e30a2ff3579225cc593898ef1a24dc7aa
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Liu-Jian/skmsg-lose-offset-info-in-sk_psock_skb_ingress/20210915-220839
git checkout 7736d12e30a2ff3579225cc593898ef1a24dc7aa
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=h8300 SHELL=/bin/bash net/core/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/workqueue.h:9,
from include/linux/bpf.h:9,
from include/linux/skmsg.h:7,
from net/core/skmsg.c:4:
include/linux/scatterlist.h: In function 'sg_set_buf':
include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra]
89 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:9: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:17: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
net/core/skmsg.c: In function 'sk_psock_verdict_apply':
>> net/core/skmsg.c:972:25: error: 'len' undeclared (first use in this function)
972 | len = skb->len;
| ^~~
net/core/skmsg.c:972:25: note: each undeclared identifier is reported only once for each function it appears in
>> net/core/skmsg.c:973:25: error: 'off' undeclared (first use in this function)
973 | off = 0;
| ^~~
net/core/skmsg.c: At top level:
net/core/skmsg.c:12:13: warning: 'sk_psock_strp_data_ready' declared 'static' but never defined [-Wunused-function]
12 | static void sk_psock_strp_data_ready(struct sock *sk);
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +/len +972 net/core/skmsg.c
953
954 switch (verdict) {
955 case __SK_PASS:
956 err = -EIO;
957 sk_other = psock->sk;
958 if (sock_flag(sk_other, SOCK_DEAD) ||
959 !sk_psock_test_state(psock, SK_PSOCK_TX_ENABLED)) {
960 goto out_free;
961 }
962
963 skb_bpf_set_ingress(skb);
964
965 /* If the queue is empty then we can submit directly
966 * into the msg queue. If its not empty we have to
967 * queue work otherwise we may get OOO data. Otherwise,
968 * if sk_psock_skb_ingress errors will be handled by
969 * retrying later from workqueue.
970 */
971 if (skb_queue_empty(&psock->ingress_skb)) {
> 972 len = skb->len;
> 973 off = 0;
974 #if IS_ENABLED(CONFIG_BPF_STREAM_PARSER)
975 if (psock->sk->sk_data_ready == sk_psock_strp_data_ready) {
976 stm = strp_msg(skb);
977 off = stm->offset;
978 len = stm->full_len;
979 }
980 #endif
981 err = sk_psock_skb_ingress_self(psock, skb, off, len);
982 }
983 if (err < 0) {
984 spin_lock_bh(&psock->ingress_lock);
985 if (sk_psock_test_state(psock, SK_PSOCK_TX_ENABLED)) {
986 skb_queue_tail(&psock->ingress_skb, skb);
987 schedule_work(&psock->work);
988 err = 0;
989 }
990 spin_unlock_bh(&psock->ingress_lock);
991 if (err < 0) {
992 skb_bpf_redirect_clear(skb);
993 goto out_free;
994 }
995 }
996 break;
997 case __SK_REDIRECT:
998 err = sk_psock_skb_redirect(psock, skb);
999 break;
1000 case __SK_DROP:
1001 default:
1002 out_free:
1003 sock_drop(psock->sk, skb);
1004 }
1005
1006 return err;
1007 }
1008
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28128 bytes --]
prev parent reply other threads:[~2021-09-16 7:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 14:06 [PATCH] skmsg: lose offset info in sk_psock_skb_ingress Liu Jian
2021-09-16 7:14 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202109161534.AkP0zTMF-lkp@intel.com \
--to=lkp@intel.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jakub@cloudflare.com \
--cc=john.fastabend@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=liujian56@huawei.com \
--cc=lmb@cloudflare.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).