Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7489241rwd; Tue, 6 Jun 2023 11:25:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ640Tpi58imXsBKz1F43zJ1xAB1MvdRt515bFlKptwVhT8T2z+5DIm2yJcALtgJeVbmnthX X-Received: by 2002:a05:6214:528b:b0:628:34e0:ae64 with SMTP id kj11-20020a056214528b00b0062834e0ae64mr429535qvb.24.1686075942351; Tue, 06 Jun 2023 11:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686075942; cv=none; d=google.com; s=arc-20160816; b=j42rrWXVUzC93VIeQzs8iua0mBR3LdrxFjjbPNE5uYy8n3roSgbH0UImWDOnMnZtJH pKNe0C0ePR0AGXIv2xTBkJ152T22DyMraAzRgLnnqeF6UwQtwM76VezuASUwh++zFLs6 0eBYECgwvQvZg16Pc/En4GWDEZpP22ESByr/FeRHb7L+7doV3j7u3Vt8n14/bG5AXp2o PmXJrxAP65nhAdOIqh+QqMagkB74+GCLdK/jxK5WKlbXraiFJ2NqrnGjpyu4lyVEFkqB /ZHXLWnjNVdSEypQNsgXSdA44xN31vbX8S/aDb8FDT/9LAm1PxiRIFDDhxL9LKXZXWJX 7hsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=B5Qw5duyjB9cR794f+VlBhHzBAd7Vjp1cXPs9T2oIMA=; b=TBMw4yQ1GzPCtjgYyOcxvEnzoo+OVywAOjtoNdvpojqd2K+ov/D4DAv6Q+8A50lWyu 6GxPo3Zz9dOzqTgph2tGF1u+sXtukPFqGVaLzOHkxqcdPBLbYnOHJro9Kn8+/q5ZkFZz Pg0960oFRC1TPIggnpluo4rOTuuUEghagJz9O0Hg6ugQOPCPVeXr+5KmHVB9Ns6qScNL 8dyRVKVH5cIL0FxkxWxBL5n2dxaE2uwrclk7e2scTsoxdv0sVOh4PAWlhNKs/S3QMD35 ZQp+LoKPIE0TP1SG5lNSp9Amq546bjmYhdXyekKBdWfht6sPs8jDMCCZVGh7swLALO/W Y4sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=IgIzcHYh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 13-20020a0562140dcd00b005ef54567825si6630407qvt.601.2023.06.06.11.25.26; Tue, 06 Jun 2023 11:25:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=IgIzcHYh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238038AbjFFSVG (ORCPT + 99 others); Tue, 6 Jun 2023 14:21:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232888AbjFFSVF (ORCPT ); Tue, 6 Jun 2023 14:21:05 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83F46139; Tue, 6 Jun 2023 11:20:59 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 716E05FD54; Tue, 6 Jun 2023 21:20:57 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1686075657; bh=B5Qw5duyjB9cR794f+VlBhHzBAd7Vjp1cXPs9T2oIMA=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; b=IgIzcHYhG1Tzv1L+X3M/QmEQyzGQ0gtieCwr3yaCyMTa8cu0OTxWxlQf1AhGAOnh9 CmhW3+EcitR9CaB1EWqbOvBwlMRL/Vvrn124XlE2XNCKY5M2eRwF9IHnOMD+WAybZ7 3QuGShSd4VD2+cQbHFjUmtzLfkOLUQS5WrD5vXMxrKNmJEsa6nBR69Fe5HmtSpnKlh mIn35Svw7CGxVVfYjpwp3s0FQPKcLiRnuVHBSx407V8eZOeb72e4HOCC2LjTnRk0CR 2h6I/+bv0M5ngvUcW0VCVWJfqyKn2JgFBhJMuRJ1/v81tzkq3xGCGYzsy07V8XZLUU IH9TBKQFV9r0g== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Tue, 6 Jun 2023 21:20:52 +0300 (MSK) Message-ID: <33fae8f8-9dd3-d5ee-2081-dd7c6a61f744@sberdevices.ru> Date: Tue, 6 Jun 2023 21:15:55 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH RFC net-next v3 0/8] virtio/vsock: support datagrams To: Bobby Eshleman CC: Bobby Eshleman , Stefan Hajnoczi , Stefano Garzarella , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Bryan Tan , , , , , , Jiang Wang References: <20230413-b4-vsock-dgram-v3-0-c2414413ef6a@bytedance.com> <2830ac58-fd77-7e5f-5565-eb47dd027d81@sberdevices.ru> Content-Language: en-US From: Arseniy Krasnov In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/06/06 14:43:00 #21444531 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01.06.2023 00:10, Bobby Eshleman wrote: > On Mon, Jun 05, 2023 at 11:42:06PM +0300, Arseniy Krasnov wrote: >> Hello Bobby! >> >> Thanks for this patchset, really interesting! >> >> I applied it on head: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=d20dd0ea14072e8a90ff864b2c1603bd68920b4b >> >> And tried to run ./vsock_test (client in the guest, server in the host), I had the following crash: >> >> Control socket connected to 192.168.1.1:12345. >> 0 - SOCK_STREAM connection reset... >> [ 8.050215] BUG: kernel NULL pointer derefer >> [ 8.050960] #PF: supervisor read access in kernel mode >> [ 8.050960] #PF: error_code(0x0000) - not-present page >> [ 8.050960] PGD 0 P4D 0 >> [ 8.050960] Oops: 0000 [#1] PREEMPT SMP PTI >> [ 8.050960] CPU: 0 PID: 109 Comm: vsock_test Not tainted 6.4.0-rc3-gd707c220a700 >> [ 8.050960] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14 >> [ 8.050960] RIP: 0010:static_key_count+0x0/0x20 >> [ 8.050960] Code: 04 4c 8b 46 08 49 29 c0 4c 01 c8 4c 89 47 08 89 0e 89 56 04 4f >> [ 8.050960] RSP: 0018:ffffa9a1c021bdc0 EFLAGS: 00010202 >> [ 8.050960] RAX: ffffffffac309880 RBX: ffffffffc02fc140 RCX: 0000000000000000 >> [ 8.050960] RDX: ffff9a5eff944600 RSI: 0000000000000000 RDI: 0000000000000000 >> [ 8.050960] RBP: ffff9a5ec2371900 R08: ffffa9a1c021bd30 R09: ffff9a5eff98e0c0 >> [ 8.050960] R10: 0000000000001000 R11: 0000000000000000 R12: ffffa9a1c021be80 >> [ 8.050960] R13: 0000000000000000 R14: 0000000000000002 R15: ffff9a5ec1cfca80 >> [ 8.050960] FS: 00007fa9bf88c5c0(0000) GS:ffff9a5efe400000(0000) knlGS:00000000 >> [ 8.050960] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 >> [ 8.050960] CR2: 0000000000000000 CR3: 00000000023e0000 CR4: 00000000000006f0 >> [ 8.050960] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 >> [ 8.050960] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 >> [ 8.050960] Call Trace: >> [ 8.050960] >> [ 8.050960] once_deferred+0xd/0x30 >> [ 8.050960] vsock_assign_transport+0xa2/0x1b0 [vsock] >> [ 8.050960] vsock_connect+0xb4/0x3a0 [vsock] >> [ 8.050960] ? var_wake_function+0x60/0x60 >> [ 8.050960] __sys_connect+0x9e/0xd0 >> [ 8.050960] ? _raw_spin_unlock_irq+0xe/0x30 >> [ 8.050960] ? do_setitimer+0x128/0x1f0 >> [ 8.050960] ? alarm_setitimer+0x4c/0x90 >> [ 8.050960] ? fpregs_assert_state_consistent+0x1d/0x50 >> [ 8.050960] ? exit_to_user_mode_prepare+0x36/0x130 >> [ 8.050960] __x64_sys_connect+0x11/0x20 >> [ 8.050960] do_syscall_64+0x3b/0xc0 >> [ 8.050960] entry_SYSCALL_64_after_hwframe+0x4b/0xb5 >> [ 8.050960] RIP: 0033:0x7fa9bf7c4d13 >> [ 8.050960] Code: 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 48 >> [ 8.050960] RSP: 002b:00007ffdf2d96cc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000a >> [ 8.050960] RAX: ffffffffffffffda RBX: 0000560c305d0020 RCX: 00007fa9bf7c4d13 >> [ 8.050960] RDX: 0000000000000010 RSI: 00007ffdf2d96ce0 RDI: 0000000000000004 >> [ 8.050960] RBP: 0000000000000004 R08: 0000560c317dc018 R09: 0000000000000000 >> [ 8.050960] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 >> [ 8.050960] R13: 0000560c305ccc2d R14: 00007ffdf2d96ce0 R15: 00007ffdf2d96d70 >> [ 8.050960] >> >> >> I guess crash is somewhere near: >> >> old_info->transport->release(vsk); in vsock_assign_transport(). May be my config is wrong... >> >> Thanks, Arseniy > > Thanks Arseniy! > > I now see I broke the tests, but did't break the stream/dgram socket > utility I was using in development. > > I'll track this down and include a fix in the next rev. Great! Thanks! Thanks, Arseniy > > I should have warned this v3 is pretty under-tested. Being unsure if > some of the design choices would be accepted at all, I didn't want to > waste too much time until things were accepted at a high level. > > Best, > Bobby