Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2403751rdb; Tue, 3 Oct 2023 23:04:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEw5zO7eCC9XK5pRjyyi8OInHnZ7NIZeIndP5PeDpj+l1j/iWKcP0QLQmDVDrqA5vwaE3FM X-Received: by 2002:a67:b34a:0:b0:454:6faf:204d with SMTP id b10-20020a67b34a000000b004546faf204dmr1385088vsm.2.1696399464326; Tue, 03 Oct 2023 23:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696399464; cv=none; d=google.com; s=arc-20160816; b=rNSzOyQuNPYZHQz8JP1Blh8gqwl9BHX9MJBFrtIS52mdyyKD02ysR0qC+n80oXlrld adiCJFB/NGNyaoe/9OhwYGEvBiWbo3Xr/6dcJwBqFL4smsl5ji4WQLJMktiaFaOHn803 fIgqOsp6XJOqdpt1dncAmxDWfQCYVz2cznBe4l3nJN36u6KbEKeJYe2S1suY+dQv1vpc GIi2frpBUlgDdroNoNMgHKJJz368UuZ9yduIA37+qvMW6o4CqnKXHr1EdoM+YXQQUF6L p76dm/mJq6K4OQHHQHVWzk+lG4LWh1ik8JZCq0veX0nMz4N++BlHD9oTFsDbHmlHyred Fc1A== 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=AghOzW+aUu2EYJ2jLs6+phViI10EcJnIEsKk4wQRTVY=; fh=JRoLHFGeB+1PYsNAI0nUFU4cXm9/UKbLfQUY0Mco/J4=; b=08ZeAJVx3EwbXGn9sIuOOCrkgKe+yMep2qxMavXqOk+07Ta8k1xdODVrdOmS7mogf9 r95BLFR28r5IEphatsXQDr30abC0vKzx3DfaoPko+qbOWB7FUnLU987U+NOteLhfo983 BFnSNj+fYRewCp81fKWc8T6UUeQjt9MG75Qyn58HZ7JnFuXJxaeE0Wi2xSjKhIkKtZxl GCK2bqXpZgMNmNNhOIjrNx1CX0cpViNBKsxF6MoVCNt9s3Fb0287mRsiyDYvhQC+Py/U TJQSftIhSsbvJDuN2JhRziTj/BgezfiGztV1e4kLapCyidGYnnMZcVLSYTGkrYJxXS2t XQQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hnQ1AlpJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id m9-20020a654389000000b005859c255ce8si3120483pgp.819.2023.10.03.23.04.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 23:04:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hnQ1AlpJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 3889981C7AB9; Tue, 3 Oct 2023 23:04:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232688AbjJDGEW (ORCPT + 99 others); Wed, 4 Oct 2023 02:04:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232537AbjJDGEV (ORCPT ); Wed, 4 Oct 2023 02:04:21 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AFEBA7; Tue, 3 Oct 2023 23:04:18 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82613C433C7; Wed, 4 Oct 2023 06:04:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696399458; bh=cmdZvOlO4F4bJwZoOGl7Twox6gny/N+bJ3dvgzPEc7M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hnQ1AlpJ2UqLGSX5y5GOKhS6FixzEUuZB0J+oZhmKO80OSclGiKC5dUYBfXGuhtON q5dkDMhjI7wDD7c6S3WGE2FYLJSskf3DYz+EfjxNaeFJCz39WNY5bFK757Qwn21FeL 2gFyEzRwvzRyFUHgTpJ+1+TYZVY4VSaPda39pu+g= Date: Wed, 4 Oct 2023 08:04:15 +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: <2023100457-entail-freefall-06fd@gregkh> References: <20231003170020.830242-1-lee@kernel.org> <2023100320-immorally-outboard-573a@gregkh> <20231003185500.GD8453@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231003185500.GD8453@google.com> 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, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 03 Oct 2023 23:04:23 -0700 (PDT) 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. > > 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 :) thanks, greg k-h