Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp441869rwb; Thu, 12 Jan 2023 08:02:45 -0800 (PST) X-Google-Smtp-Source: AMrXdXuv2v2ok9QSd16etw+pdKf7ZNdZNYxb4GjdcZmwasnnT7E1SMpnlPYLsEmXXZPmvyGsWIhs X-Received: by 2002:a17:902:caca:b0:194:5c63:3630 with SMTP id y10-20020a170902caca00b001945c633630mr2302859pld.66.1673539364960; Thu, 12 Jan 2023 08:02:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673539364; cv=none; d=google.com; s=arc-20160816; b=iekCxJSH1NQfj0lCXc6gD+RQjPpqmzEbvxhIdUr7rrjCQFpiGcIJNWJMLpqnBtxfmi ls9nf9jh6hFU8jK3HvsQsVgWSNgfPBe3As8DgxCsoZ1Z48FNlzupV7iXYK5L7a82QnVR uzvY8eGPpuh2a5/ifWkb44BCFARTW7G/eaX+k61XfhSqaH1NKaF/zKHt8dY4b7QTkDzQ AEbIufrwBldN2xYN4lbMZs2nbqw3XTEaRcg1k2hNk2nb5mkg3lwPmrcgqqSykbcA2YFg kgMCftQ28H6nUcNAZ1dVT5e3v568djFbye5eAsM1t5zeOPC2mAyDLsms/+msd5LuhYR6 Gu0Q== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=lGaCHlOeK+4Xeu53RFKDmMgqs3djpjqDBc2Iko3AJSA=; b=C94CJfHfNI8ZdOOOgQUqhLsGEHqTxpzehO3rIhKij2uRqR1Wo7fuObo0aeSO2a/hfs 3RwU2+23x3v6ydMf7eAqm7+U8iWvqnBiVxzhtfbz05ahUnKRdZ/s4zpqRukV15eysdzT LcD3IWghC9M0QbIepZ8EjWanhilAO8DpA9pqxtdk5j5vbkYihNuagnuzjVaPRzLL+BGX JNB7s6XPrKy3DQJaTuUGHIB+vtEsM/9W/z9Ft2ssN9a3ORqV0sFS53uLFP3hsR+7iup6 8/Crt79REEhvvrXJja+XUiTjAL+1ShpMAIChK0IWLGfrcxOJr/fRz1SLLbpyrB58lXSn 3KpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=gOyKE6Be; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m2-20020a170902db0200b001894d872b14si18995863plx.66.2023.01.12.08.02.38; Thu, 12 Jan 2023 08:02:44 -0800 (PST) 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=@linuxfoundation.org header.s=google header.b=gOyKE6Be; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230135AbjALPVt (ORCPT + 50 others); Thu, 12 Jan 2023 10:21:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232384AbjALPVP (ORCPT ); Thu, 12 Jan 2023 10:21:15 -0500 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20DB0CD9 for ; Thu, 12 Jan 2023 07:13:55 -0800 (PST) Received: by mail-il1-x12d.google.com with SMTP id i17so4648706ila.9 for ; Thu, 12 Jan 2023 07:13:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lGaCHlOeK+4Xeu53RFKDmMgqs3djpjqDBc2Iko3AJSA=; b=gOyKE6Beuz98CkiYz+AOKP/wt4GwJaVJb5DYlxOAqgTlFjdHyNRhCp8XAzKxRetqa7 nWPV/dJxL8n++6pEnI0mi/LVul2YqNlg82HjKqank6/SA/Sx9cJRaKGhUnWTpq+fV+dZ 9b7QeuGldoYmGFw33Imdg1LnscE1V3ezAOi/s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lGaCHlOeK+4Xeu53RFKDmMgqs3djpjqDBc2Iko3AJSA=; b=fmQHPPvu9P12pekfnzE0tadn7jLWlEnNJqsxct+7n+el3bE6A+TmTSyEulU2Xun3eX eSUJDpJ60zjRGxWPTbxpoSuJD6K5D3Q7VK/SJOanNopGKEieZp0Sb5O5StI3bYrJTyug n8C8xGut7wYT4yx6KI2SLUYNF/6nbbWJLmgm+OCFwxqiZJIluFabgAT8HbP+IzsCaRfj HSYgUHdchp9OhLKLPVStGqA61FUPYA2N4SWP6i3r5uiwPj7CFGq83AM89WhjjCY1SJsq hoqSu9VBGcjhUqK1zYH2ETsH4ogWsFMy7eKr6P05WqGpJiBUKfw25LknnKR0+onGo1dP ILSg== X-Gm-Message-State: AFqh2kqS99FQhfe0PWOjkjuZbqclb0TbYkR8JrpXKdTz5em8lRr+kGIC tOtnxFgas1rKomNCEl0ATqrgtg== X-Received: by 2002:a92:ce03:0:b0:30d:bf1a:b174 with SMTP id b3-20020a92ce03000000b0030dbf1ab174mr1109422ilo.1.1673536434448; Thu, 12 Jan 2023 07:13:54 -0800 (PST) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id a14-20020a027a0e000000b0038a5370658bsm5384767jac.6.2023.01.12.07.13.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Jan 2023 07:13:53 -0800 (PST) Message-ID: <4c9a5640-9ebf-db87-fcb0-b076b615e4e4@linuxfoundation.org> Date: Thu, 12 Jan 2023 08:13:52 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: =?UTF-8?Q?Re=3a_kernel_BUG=c2=a0at_mm/usercopy=2ec_when_using_usbip?= Content-Language: en-US To: =?UTF-8?B?U29zdGjDqG5lIEd1w6lkb24=?= , Valentina Manea , Shuah Khan , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Robin Krahl , Shuah Khan References: From: Shuah Khan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 1/12/23 01:40, Sosthène Guédon wrote: > Hi! > > I have stumbled upon a bug that is triggered reliably by using usbip. > > We are using usbip to test our firmware. usbip attach works, but once `opgpcard-tools` interacts with the firmware through pcscd, a kernel bug happens. > Then usbip stops working, and `lsusb` as well as other tools interacting with usb devices hang. > The symptoms are similar to https://bugzilla.kernel.org/show_bug.cgi?id=215487 but the kernel bug is not the same (see attached dmesg logs). > > The bug can be reproduced on arch (Linux archlinux 6.1.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 07 Jan 2023 15:10:07 +0000 x86_64 GNU/Linux > ) and debian (Linux nitropc 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux), though the reproduction is not minimal. > > To reproduce the bug on Arch Linux, with the packages rust, pcsclite, and openpgp-card-tools installed: > > - Compile and run the usbip runner from this PR: https://github.com/Nitrokey/nitrokey-3-firmware/pull/149 (`cd nitrokey-3-firmware/runners/usbip && cargo run --features alpha`) > - Run `usbip attach -r localhost -b 1-1` > - Run `pcscd` > - Run `opgpcard status` > > The bug should happen. > Thank you for reporting the problem. I will take a look and get back to you with possible fix. Will you be able to test fixes? thanks, -- Shuah