From: "Jorgen S. Hansen" <jhansen@vmware.com>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net] VSOCK: check sk state before receive
Date: Mon, 24 Sep 2018 07:00:44 +0000 [thread overview]
Message-ID: <A2E7B0EC-3309-4FA5-BDAA-28B5EE82B103@vmware.com> (raw)
In-Reply-To: <20180922062744.GC24677@leo.usersys.redhat.com>
On Sep 22, 2018, at 8:27 AM, Hangbin Liu <liuhangbin@gmail.com> wrote:
>
> On Fri, Sep 21, 2018 at 07:48:25AM +0000, Jorgen S. Hansen wrote:
>> Hi Hangbin,
>>
>> I finaly got to the bottom of this - the issue was indeed in the VMCI driver. The patch is posted here:
>>
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.org%2Flkml%2F2018%2F9%2F21%2F326&data=02%7C01%7Cjhansen%40vmware.com%7C280a9c79e99248db3d1108d6205488de%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636731944784367201&sdata=BEExXdB%2BF0SSh83Epa5fAuyoG4qn%2FAeM2J0wG2gM6GQ%3D&reserved=0
>>
>> I used your reproduce.log to test the fix. Thanks for discovering this issue.
>
> Hi Jorgen,
>
> Thanks for your patch. I built a test kernel with your fix, run my
> reproducer and syzkaller socket vnet test for a while. There is no such
> error. So I think your patch fixed this issue.
Great. Thanks a lot for trying out the patch.
> BTW, with FAULT_INJECTION enabled. I got another call trace:
The vhost_* stuff is for Virtio. Stefan would know better what is going on there.
> [ 251.166377] FAULT_INJECTION: forcing a failure.
> [ 251.178736] CPU: 15 PID: 10448 Comm: syz-executor7 Not tainted 4.19.0
> -rc4.syz.vnet+ #3
> [ 251.187577] Hardware name: Dell Inc. PowerEdge R730/0WCJNT, BIOS 2.1.5 04/11/2016
> [ 251.187578] Call Trace:
> [ 251.187586] dump_stack+0x8c/0xce
> [ 251.187594] should_fail+0x5dd/0x6b0
> [ 251.199932] ? fault_create_debugfs_attr+0x1d0/0x1d0
> [ 251.199937] __should_failslab+0xe8/0x120
> [ 251.199945] should_failslab+0xa/0x20
> [ 251.228430] kmem_cache_alloc_trace+0x43/0x1f0
> [ 251.233392] ? vhost_dev_set_owner+0x366/0x790 [vhost]
> [ 251.239129] vhost_dev_set_owner+0x366/0x790 [vhost]
> [ 251.244672] ? vhost_poll_wakeup+0xa0/0xa0 [vhost]
> [ 251.250018] ? kasan_unpoison_shadow+0x30/0x40
> [ 251.254978] ? vhost_worker+0x370/0x370 [vhost]
> [ 251.260035] ? kasan_kmalloc_large+0x71/0xe0
> [ 251.264799] ? kmalloc_order+0x54/0x60
> [ 251.268985] vhost_net_ioctl+0xc2e/0x14c0 [vhost_net]
> [ 251.274635] ? avc_ss_reset+0x150/0x150
> [ 251.278915] ? kstrtouint_from_user+0xe5/0x140
> [ 251.283876] ? handle_tx_kick+0x40/0x40 [vhost_net]
> [ 251.289320] ? save_stack+0x89/0xb0
> [ 251.293213] ? __kasan_slab_free+0x12e/0x180
> [ 251.297979] ? kmem_cache_free+0x7a/0x210
> [ 251.302452] ? putname+0xe2/0x120
> [ 251.306151] ? get_pid_task+0x6e/0x90
> [ 251.310238] ? proc_fail_nth_write+0x91/0x1c0
> [ 251.315100] ? map_files_get_link+0x3c0/0x3c0
> [ 251.319963] ? exit_robust_list+0x1c0/0x1c0
> [ 251.324633] ? __vfs_write+0xf7/0x6a0
> [ 251.328711] ? handle_tx_kick+0x40/0x40 [vhost_net]
> [ 251.334154] do_vfs_ioctl+0x1a5/0xfb0
> [ 251.338241] ? ioctl_preallocate+0x1c0/0x1c0
> [ 251.343009] ? selinux_file_ioctl+0x382/0x560
> [ 251.347872] ? selinux_capable+0x40/0x40
> [ 251.352250] ? __fget+0x211/0x2e0
> [ 251.355949] ? iterate_fd+0x1c0/0x1c0
> [ 251.360038] ? syscall_trace_enter+0x285/0xaa0
> [ 251.365011] ? security_file_ioctl+0x5d/0xb0
> [ 251.369776] ? selinux_capable+0x40/0x40
> [ 251.374153] ksys_ioctl+0x89/0xa0
> [ 251.377853] __x64_sys_ioctl+0x74/0xb0
> [ 251.382036] do_syscall_64+0xc3/0x390
> [ 251.386123] ? syscall_return_slowpath+0x14c/0x230
> [ 251.391473] entry_SYSCALL_64_after_hwframe+0x44/0xa9
> [ 251.397111] RIP: 0033:0x451b89
> [ 251.400519] Code: fc ff 48 81 c4 80 00 00 00 e9 f1 fe ff ff 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 0b 67 fc ff c3 66 2e 0f 1f 84 00 00 00 00
> [ 251.421476] RSP: 002b:00007fc0d9673c48 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
> [ 251.429927] RAX: ffffffffffffffda RBX: 00007fc0d96746b4 RCX: 0000000000451b89
> [ 251.437889] RDX: 0000000000000000 RSI: 000000000000af01 RDI: 0000000000000003
> [ 251.445852] RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
> [ 251.453815] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
> [ 251.461778] R13: 0000000000006450 R14: 00000000004d3090 R15: 00007fc0d9674700
>
> Thanks
> Hangbin
Thanks,
Jorgen
prev parent reply other threads:[~2018-09-24 13:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-27 1:02 [PATCH net] VSOCK: check sk state before receive Hangbin Liu
2018-05-27 15:29 ` Hangbin Liu
2018-05-30 9:17 ` Stefan Hajnoczi
2018-06-04 16:02 ` Jorgen S. Hansen
2018-06-13 1:44 ` Hangbin Liu
2018-09-21 7:48 ` Jorgen S. Hansen
2018-09-22 6:27 ` Hangbin Liu
2018-09-24 7:00 ` Jorgen S. Hansen [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=A2E7B0EC-3309-4FA5-BDAA-28B5EE82B103@vmware.com \
--to=jhansen@vmware.com \
--cc=davem@davemloft.net \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stefanha@redhat.com \
/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).