Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2490991rdb; Wed, 4 Oct 2023 02:56:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFeLT//FhagKPChdl8lZ+bV1kx5KmXlTvFgYLf8cfSu5IcYV3J4zEcWYUW7xcHlIPTgJ1IQ X-Received: by 2002:a05:6358:9998:b0:133:595:1c with SMTP id j24-20020a056358999800b001330595001cmr1976420rwb.31.1696413380011; Wed, 04 Oct 2023 02:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696413379; cv=none; d=google.com; s=arc-20160816; b=lwCCSrc8eFFjAtVDRi7OAgvX5/rRPpqgr8cnv1kbt4Yy/Jh/XT4fdWIztSrkcpnbh8 LIgmEa8lRO8xsAhAXZh37vX8iyOsOiDVyoWu4158Wzprf3NPeuS2rPo9AHsF566IJu/V TAHifX/AbvUobS38YsQNgvUCFUE29dKoneRhpe/kqsP005cG44jTyqj9/6NnlGN8EiH6 cvFVmsleG5TZ3LmT9RyPsAAjbyCUh1j+4p7zFKvmxZqNq3ZDjcfIYyLpHjJj839L2XHR oVsTn7rJiGHgxGnSP+VKgzn7Vf61wBvZjA71q+LvlugosjZBp4PhGRtB8d6TykeAQH75 AesA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ADPuscN8jQMJ19X758JMFpc7r3/oADtzVWxvJ6DCUlQ=; fh=JRoLHFGeB+1PYsNAI0nUFU4cXm9/UKbLfQUY0Mco/J4=; b=e1bHugVvhnYZ2x8uT+2sNyqseNXiwO5hbq8nFjMHaB3gfcIXf+OmyCZ2QWtTjI6gZv rCwpedTZa0rG8H3J+pX6D1HU3LPJ7DwpVpSDiA2QRODcbsVmdX56uUy324IZWKvLQlYs k/PCzbsGITv6Xx9qDJQ/tPACunqtBfQS8XGXvvJNbMJu172T6EV7wWA9jZVBWxTf1wz7 fWdn+H+pXcu40vTl/pk9DwKKx6rCLEA+2y0s76HDxvtFnrSVIDJNyBMo24BusWwQ1Aqi yiHODUmKcK+flkcYnpZH20SMtlhTGF0vMWoGAflW9CaBpu06cMvKeVl7NU8dWY9rNlC+ eTDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hHNwB6he; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id j11-20020a17090ae60b00b00278f5c1d46esi1099793pjy.190.2023.10.04.02.56.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 02:56:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hHNwB6he; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 907C180CFD30; Wed, 4 Oct 2023 02:56:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232931AbjJDJ4D (ORCPT + 99 others); Wed, 4 Oct 2023 05:56:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232849AbjJDJ4C (ORCPT ); Wed, 4 Oct 2023 05:56:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B64F3A7; Wed, 4 Oct 2023 02:55:58 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0F78C433C8; Wed, 4 Oct 2023 09:55:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696413358; bh=ouUMXO7K1wCqXRZ4GutaFLqIvGJCCMRwD43JyOd/pUs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hHNwB6heXhBIXTcj/wknBS8iI2hgNkeLuFi+todd4aCu6FvNDv5FZsXjVPF1c8gl8 3Z5gllC+4xZwJ4gzSFiXWcVk8k5NleE6j2/R164aUKLmantGBPUFHiau6iMvqQ0GIC Pe4ItUiglC2/z6lllp4oxa1wCSgSRPLl76LdScKk= Date: Wed, 4 Oct 2023 11:55:55 +0200 From: Greg Kroah-Hartman To: Lee Jones Cc: linux-kernel@vger.kernel.org, Daniel Starke , Fedor Pchelkin , Jiri Slaby , linux-serial@vger.kernel.org, syzbot+5f47a8cea6a12b77a876@syzkaller.appspotmail.com Subject: Re: [PATCH 1/1] tty: n_gsm: Avoid sleeping during .write() whilst atomic Message-ID: <2023100424-liquefy-collapse-140e@gregkh> References: <20231003170020.830242-1-lee@kernel.org> <2023100320-immorally-outboard-573a@gregkh> <20231003185500.GD8453@google.com> <2023100457-entail-freefall-06fd@gregkh> <20231004090918.GB9374@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231004090918.GB9374@google.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 04 Oct 2023 02:56:17 -0700 (PDT) On Wed, Oct 04, 2023 at 10:09:18AM +0100, Lee Jones wrote: > On Wed, 04 Oct 2023, Greg Kroah-Hartman wrote: > > > On Tue, Oct 03, 2023 at 07:55:00PM +0100, Lee Jones wrote: > > > On Tue, 03 Oct 2023, Greg Kroah-Hartman wrote: > > > > > > > On Tue, Oct 03, 2023 at 06:00:20PM +0100, Lee Jones wrote: > > > > > The important part of the call stack being: > > > > > > > > > > gsmld_write() # Takes a lock and disables IRQs > > > > > con_write() > > > > > console_lock() > > > > > > > > Wait, why is the n_gsm line discipline being used for a console? > > > > > > > > What hardware/protocol wants this to happen? > > > > > > > > gsm I thought was for a very specific type of device, not a console. > > > > > > > > As per: > > > > https://www.kernel.org/doc/html/v5.9/driver-api/serial/n_gsm.html > > > > this is a specific modem protocol, why is con_write() being called? > > > > > > What it's meant for and what random users can make it do are likely to > > > be quite separate questions. This scenario is user driven and can be > > > replicated simply by issuing a few syscalls (open, ioctl, write). > > > > I would recommend that any distro/system that does not want to support > > this specific hardware protocol, just disable it for now (it's marked as > > experimental too), if they don't want to deal with the potential > > sleep-while-atomic issue. > > n_gsm is available on all the systems I have available. Then file a bug with your distro to disable it? No real general purpose distro should enable it from what I can tell. > The mention of > 'EXPERIMENTAL' in the module description appears to have zero effect on > whether distros choose to make it available or not. If you're saying > that we know this module is BROKEN however, then perhaps we should mark > it as such. Or we just prevent it from being bound to a console as that's not something that should be happening. And again, the "worst" that can happen is the calling process locks up, due to a lock inversion, right? > > > > And Lee, you really don't have this hardware, right? So why are you > > > > dealing with bug reports for it? :) > > > > > > 'cos Syzkaller. > > > > Ah, yeah, fake report, no real issue here then :) > > Ouch! The way I see it, the present issue with Syzkaller is that we do > not have the resources to remedy all of the issues it flags. Passing > off all reports as 'not real issues' is going to make engineers who > decide to work on them feel undervalued and is likely have a detrimental > effect overall. As an ambassador for young and new people trying to get > into Kernel Engineering in general, is that really the outcome you're > after? That's not what I'm saying here at all, what I'm saying is "pick issues that are real". syzbot does not always make it obvious what is, and is not, a real issue. There have been long threads and discussions about this and some developers are now just ignoring all syzbot reports (see the filesystem thread on the ksummit discuss list for more details.) For this specific issue, it's been much-reported, and is not trivial, and I would argue, not a "real" problem in the grand scheme of things for normal users to worry about. thanks, greg k-h