Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp143484rwl; Thu, 30 Mar 2023 13:30:54 -0700 (PDT) X-Google-Smtp-Source: AKy350ZqJAt4qRf/DhYaauS+1CTJM7E3gvBnx0HVOj6Jc+jpDyu8f0sO2rWPNSChaAkmb7xWhdSO X-Received: by 2002:a05:6402:524e:b0:500:3fd0:25a8 with SMTP id t14-20020a056402524e00b005003fd025a8mr3364707edd.0.1680208254089; Thu, 30 Mar 2023 13:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680208254; cv=none; d=google.com; s=arc-20160816; b=e8glJpGuxOM+589gQaouLsxdYJsp3NwdoRP/Fm0UZXEGQGxm8+TucJfg4PYHviS9+x dpe6SVJZtnl7m70eirFhCsNk2u7h3Z+yc8XBw7FlO1+UYe1oxFNDN1ymQ7wBc3BYE6rn NngBagcyQa3ocsGTD4+HC7SvcAPUAdbw64WsQmk9yRpepc5sCVGFoAejrWTIb6KTb044 IsTf0omlGfHPMDjwMyoFBk1dwjk9uoGGb0FrBCj7G5K7jy61rXMfcpzWcj3F5nFkwoRO d/+PGS6vlqG0V2UMyUPmo069GM8IDzE35MRDzdcZ2V5dMlI4bV2yX2Q4DlRgt9Lr8Xwq Flqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:from:cc:to :content-language:user-agent:mime-version:date:message-id :dkim-signature; bh=kteYFs2gFd2ElhxNSsN+P08C+Bd5yjlb/Rq5C2cCpvQ=; b=IE+USaPe0ATmz6uNBH6FeETAFRlYHNWa3gj6DPqA0hVRVgBqdlanaWdvFxAlWfWd+K 0Maax1XgoeAV3BGrARlntJttt7eaFKgMcjvyRmxDAUGwLwaL2ed5GsEUqQA0S69Hb5hj NHD6Ry52yi+Y2egowiD2nhobVbRoCGd4BRV6vKsoRQx+nxuNuF1cnLsR5HDpx0mUH5Rs x6YTSp5wDWPTiOVGw+24q6+loF8XaGsoLYB/SxSH8LxuXa8W0sExyMRWxHH2PZc7X/oh EB3x6wEMdAd1i+JrSxPi93D0vLYZaLIZiR6r35KS4vl8dndUFRTHnlF+o+2CxTZrAwfc I4zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=TVFOXeEm; 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 ay26-20020a056402203a00b004fa7b56b9d5si478191edb.508.2023.03.30.13.30.26; Thu, 30 Mar 2023 13:30:54 -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=TVFOXeEm; 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 S229674AbjC3UO5 (ORCPT + 99 others); Thu, 30 Mar 2023 16:14:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbjC3UO4 (ORCPT ); Thu, 30 Mar 2023 16:14:56 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49C72D53B; Thu, 30 Mar 2023 13:14:53 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 30C905FD0B; Thu, 30 Mar 2023 23:14:50 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1680207290; bh=kteYFs2gFd2ElhxNSsN+P08C+Bd5yjlb/Rq5C2cCpvQ=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type; b=TVFOXeEm83hBqrpgbPF9w7bROxZ0HsuWN0lSTaVZq/BMBkWIEe4xpNvqQ8BVcULbO XerplWnl2IiZTrSois+iISe5SQqMVd6iRmNN04yhAswIe2lAyFPRkAvFNrlDviFpQC MnidgJ+SLibOX7DgQRz1tQ+LaRc5JozBMiBLt4wtJEVU94craekKatps/m0pRRGL0q JWQlf9IXnT7AA6THGpXQCAjHZXtE54eDD0duSGWrYeFrqz9tSkTNonuQfVs3eLvz8Q Tv9WbzP9blzGfyZVoREcIA7cS/f+KtP/CjkqdYt+l0PsZKGBKQMQSOaZbymdQed3cC t3dW7Tp7peC+A== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Thu, 30 Mar 2023 23:14:44 +0300 (MSK) Message-ID: Date: Thu, 30 Mar 2023 23:11:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Content-Language: en-US To: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Bobby Eshleman , Bryan Tan , Vishnu Dasa CC: , , , , , , , From: Arseniy Krasnov Subject: [RFC PATCH v3 0/4] vsock: return errors other than -ENOMEM to socket Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) 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/03/30 18:07:00 #21069213 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Hello, this patchset removes behaviour, where error code returned from any transport was always switched to ENOMEM. This works in the same way as patch from Bobby Eshleman: commit c43170b7e157 ("vsock: return errors other than -ENOMEM to socket"), but for receive calls. VMCI transport is also updated (both tx and rx SOCK_STREAM callbacks), because it returns VMCI specific error code to af_vsock.c (like VMCI_ERROR_*). At the same time, virtio and Hyper-V transports are using general error codes, so there is no need to update them. vsock_test suite is also updated. Link to v1: https://lore.kernel.org/netdev/97f19214-ba04-c47e-7486-72e8aa16c690@sberdevices.ru/ Link to v2: https://lore.kernel.org/netdev/60abc0da-0412-6e25-eeb0-8e32e3ec21e7@sberdevices.ru/ Changelog: v1 -> v2: - Add patch for VMCI as Vishnu Dasa suggested. v2 -> v3: - Change type of 'err' var in VMCI patches from 'int' to 'ssize_t'. - Split VMCI patch to two patches: for send and for receive cases. - Reorder patches: move VMCI before af_vsock.c. Arseniy Krasnov (4): vsock/vmci: convert VMCI error code to -ENOMEM on send vsock/vmci: convert VMCI error code to -ENOMEM on receive vsock: return errors other than -ENOMEM to socket vsock/test: update expected return values net/vmw_vsock/af_vsock.c | 4 ++-- net/vmw_vsock/vmci_transport.c | 19 ++++++++++++++++--- tools/testing/vsock/vsock_test.c | 4 ++-- 3 files changed, 20 insertions(+), 7 deletions(-) -- 2.25.1