Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp711589pxv; Fri, 9 Jul 2021 07:22:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWX8lq4tD+vFTrC3DbqbiOjMa+qRlAyQT9J2WP2k3KwVF1pxJffAaIVXMaLZogJVjpMz1b X-Received: by 2002:a05:6402:498:: with SMTP id k24mr48567339edv.25.1625840524592; Fri, 09 Jul 2021 07:22:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625840524; cv=none; d=google.com; s=arc-20160816; b=LeATXS5j4Eg0IqtI5fYdkidIevYn+QyT9Sk+RQGE5dlr7ZzCKRpOJwgXiSAdxjsO2j 2mzwO/PsJDzd7bNeG5XVgHRpAOpCPxI5gx79QvpSeiW7YGpBa2liIWTbdk1cJUahGilt Hvc3Xht6AopaTixZuW2vrw81TXqMpHkqqhO1aiqCC8/8ceM/MJUaEVlXHFvoLw+dnHx9 3PfZQbZlEBCGSuDiqTq7X9Zl29JzD2TON/KABNyKxm5+RfR8WwF57iljS/yn8ENiE8pX KE3fH4GZgFfQdQ7GUXFaeGkG0IxG4fESVsclEW1ng/P+cMtP5ZV1z2vvfuQvqJsui+P3 dKqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JsN9zLJKA+YZlQKnUkwIQkL8usC47FMsI8WZqewJ9zo=; b=R3Mg6aFOurOGTKjL2uWXHLXkR7bpPA+qwp+mVy6Ptj0gn4/byhp8kjGbE5rI/8WwNA cbHMfc3v1I0Ybhbf/8zT9LhXOh3ayTS2NfZu66m5lTZQmN35uBKSSWOr5aZvDjxtwJvH kXEaLZ4QPx/edh/nZSP4F9qKtU0khfhR9jBusEtGWwx6gH52NHI4awU9YTRtSOdifbKc cYKi30OhiSPkT70S5qIuhIWGorsZ7JSqFNdvWzZiU4z0jUS9aStOOMjaajonFoGRTDvg WKFFLarTKBB7JNScacQF7WYbcBnOsr8oxaYNi7LjL8EylZ0gthOV3WZxzJj72uCEpnWA WO/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IvQs1lDe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q9si6396923edd.413.2021.07.09.07.21.40; Fri, 09 Jul 2021 07:22:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IvQs1lDe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231908AbhGIOXR (ORCPT + 99 others); Fri, 9 Jul 2021 10:23:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:38710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231764AbhGIOXQ (ORCPT ); Fri, 9 Jul 2021 10:23:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 60B8A613B7; Fri, 9 Jul 2021 14:20:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1625840431; bh=2EBNLEHxe5/5UlnhGK1H1LyRAqcZYhaT9n2+AEngdoM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IvQs1lDelj81O+LcqB11HMdXNIm7XIf7wu/E5iJZDduea03tJERpgM1vG+4ieES5B 1Fbfw4nAHHn+YHA8e7EAu4Pl7c4Exq/N+5jH3nm67yZs6cVD5XacRu7E5vFN9DKyXJ oyFTZLDqz8J57UVIrNixQ/ebykbFkqIrEXimWD9A= Date: Fri, 9 Jul 2021 16:20:29 +0200 From: Greg Kroah-Hartman To: Zheyu Ma Cc: Jiri Slaby , Andy Shevchenko , "open list:SERIAL DRIVERS" , Linux Kernel Mailing List Subject: Re: [PATCH v4] tty: serial: jsm: allocate queue buffer at probe time Message-ID: References: <1625489588-26079-1-git-send-email-zheyuma97@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 09, 2021 at 10:00:32PM +0800, Zheyu Ma wrote: > On Thu, Jul 8, 2021 at 3:13 AM Jiri Slaby wrote: > > > > On 07. 07. 21, 14:52, Andy Shevchenko wrote: > > > On Wed, Jul 7, 2021 at 10:50 AM Jiri Slaby wrote: > > >> On 05. 07. 21, 14:53, Zheyu Ma wrote: > > > > > >> So how it comes an interrupt came before > > >> neo_param() in jsm_tty_open was called? > > > > > > If IRQ is shared we have a special debug feature to test shared IRQs > > > on freeing IRQ stage (*). > > > But it doesn't matter, the IRQ handler must survive at any stage after > > > the action has been listed. > > > > Yes, but IRQ_NONE is returned from the ISR in that case. > > > > The issue the patch is fixing is for a "malicious" device and I am not > > sure we want to fix this -- if I can put in a malicious device, I can > > use hammer to kill the box too… > > Well, this threat assumption is indeed strong, but this attack may be > real. For example, some programmable USB devices (such as FaceDancer) > may exploit vulnerabilities in the USB device driver to attack. Of > course, there has not been such an attack in the real world for PCI > devices. Or, some devices with DMA functions may also send malicious > data and some previous kernel commits have also fixed such bugs. > > Anyway, thanks for your patient comments. Right now, yes, we treat USB devices as "possibly malicious". We do not do so for PCI devices yet. If we want to do that, then we need to do a lot of work, not just "this one call in this one driver" type of thing as there are much bigger issues involved here. If you wish to take on this work, as you feel PCI devices should be treated this way, please do so! But start in the PCI core at the very least, before worrying about the thousands of individual drivers. good luck! greg k-h