From: Johannes Thumshirn <jthumshirn-l3A5Bk7waGM@public.gmane.org>
To: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Linux NVMe Mailinglist
<linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>,
Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
Subject: Need some pointers to debug a KASAN splat in NVMe over Fabrics with rdma-rxe
Date: Wed, 8 Mar 2017 16:35:50 +0100 [thread overview]
Message-ID: <5b16edcf-c39a-bc4b-0e32-8ccfb5d75efb@suse.de> (raw)
Hi Moni et al.,
I'm getting a KASAN stack-out-of-bounds in rxe_post_send+0xdfe/0x1830
[rdma_rxe] at addr ffff8800187072e8 with v4.11-rc1
rxe_post_send+0xdfe is the following (note: the pr_err was inserted by
me to aid debugging).
(gdb) list *(rxe_post_send+0xdfe)
0x1dc3e is in rxe_post_send (drivers/infiniband/sw/rxe/rxe_verbs.c:765).
760 pr_err("%s: *_wr(ibwr): %p\n",
761 __func__, (void *)(mask & WR_ATOMIC_MASK ?
atomic_wr(ibwr)
762 : rdma_wr(ibwr)));
763
764 wqe->iova = (mask & WR_ATOMIC_MASK) ?
765
atomic_wr(ibwr)->remote_addr :
766 rdma_wr(ibwr)->remote_addr;
767 wqe->mask = mask;
768 wqe->dma.length = length;
769 wqe->dma.resid = length;
Coincidentially ffff8800187072e8 = ibwr + 0x28. ibwr comes from
nvme_rdma_post_send() and has an opcode of IB_WR_SEND (verified . So the
rdma_wr(ibwr) call cannot return a correct/valid parent object (neither
could the atomic_wr(ibr)).
So much for the easy/mechanic part.
I can special case IB_WR_SEND in rxe's init_send_wqe() but I neither
know if it is correct nor how the wqe elements (especially wqe->iova)
should be set up.
So any help would be appreciated here.
Thanks in advance,
Johannes
--
Johannes Thumshirn Storage
jthumshirn-l3A5Bk7waGM@public.gmane.org +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2017-03-08 15:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 15:35 Johannes Thumshirn [this message]
[not found] ` <5b16edcf-c39a-bc4b-0e32-8ccfb5d75efb-l3A5Bk7waGM@public.gmane.org>
2017-03-08 16:11 ` Need some pointers to debug a KASAN splat in NVMe over Fabrics with rdma-rxe Johannes Thumshirn
2017-03-08 16:33 ` Moni Shoua
[not found] ` <CAG9sBKPwEryc7U+hV=XJvRrFFhNvoktDOtwwS6piUw=cQ=bZhA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-09 7:57 ` Johannes Thumshirn
[not found] ` <38a12b22-7bad-c069-4c96-39fc93d20d79-l3A5Bk7waGM@public.gmane.org>
2017-03-09 10:59 ` Moni Shoua
[not found] ` <CAG9sBKNXwHFkmQYsOPPu40822h6Z7J3+63CaZ844juZp5hfHfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-09 11:04 ` Johannes Thumshirn
2017-03-21 13:12 ` Johannes Thumshirn
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=5b16edcf-c39a-bc4b-0e32-8ccfb5d75efb@suse.de \
--to=jthumshirn-l3a5bk7wagm@public.gmane.org \
--cc=hch-jcswGhMUV9g@public.gmane.org \
--cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.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