Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp215132rdh; Thu, 23 Nov 2023 01:44:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IEmrF6V1C7Lp1hWHzjlV9p84Px4Da4nrCy+ohCK5UQGsb2H9iGT8b81X4Y3f2JDZG/wiOHY X-Received: by 2002:a17:903:41cb:b0:1cf:7bf7:e655 with SMTP id u11-20020a17090341cb00b001cf7bf7e655mr4800171ple.8.1700732663851; Thu, 23 Nov 2023 01:44:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700732663; cv=none; d=google.com; s=arc-20160816; b=V06BkvZilcohXeEIMs41pqVYJCcHxovg4UjOOkPoTIkUwP8W1D+BP100K4gvfmRgxX NIMum0eUeBn2uiFtxrZ8i45VGRdT5u3RGQxBzDbVCkwNE7pS3983K31QbceOKj5NcN9L +E0BNfVaTlPxA1cP548YNepgGv1Fbt4fJNqT6wewl37xMouMRNKn+H0BqRf4xPJVY4/0 VCB+jzOVxsmCMztkJQTqxx9+9nDl6p/FY7WPqYmHjyTnyx/M/u+tKVlupJAbtTYLEAz/ 0M/ZqaUPx6Fya+b36YbDr/YFjZfTiDeN2mlE3CKERYuBmjfh602uKRZaTdl79ldoEUcY xh0Q== 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=YpQ1Q5/uRPMgk4cC/KlOblhjF+QjsF6qRfD5wZagpec=; fh=N64OnzsZt8i9cLKoux/C+SI24fRNUuPmGbQgyAQwfrY=; b=ClUjyCLuCbi2OluboucisNg657vBUvYARgT/SG11KmEJdXF6JnXp4EDGoiVvqffHYX W74dHsXymTlnCTnx8iJerQBFPjFlOmkh7wMRch8w09NVOIF9BOg+A0ikB+aLWBfVZjV1 u/WTRbaqC+nOx6nq9rJ7/J4JQMoz0ZhHYHhnorZDm1EbffSCQi9b8OB6c/gQ+hEfBMrR 1lAoVkjlmfbbjJwwUvvKGui0w0opdDpTlcn42r1S7biN4yotTBHzftGfc5Il29j3d8dR u6NnKdYND+pLmHL0E/o6rcnpMt3Bf+5MNObgJ6NJcUtIFtULo6+iFt3PbqiedwfVpHS/ Ve9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bIl4xvQN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id u13-20020a17090341cd00b001cf6a75337dsi832719ple.378.2023.11.23.01.44.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 01:44:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bIl4xvQN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 39FF18241970; Thu, 23 Nov 2023 01:44:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234105AbjKWJnx (ORCPT + 99 others); Thu, 23 Nov 2023 04:43:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234566AbjKWJnd (ORCPT ); Thu, 23 Nov 2023 04:43:33 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1DFC2107 for ; Thu, 23 Nov 2023 01:41:54 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A0F2C433C7; Thu, 23 Nov 2023 09:41:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700732513; bh=L1HU47elgDtXBHr6aW6J+6GyoSBIGTHAwEytneSgsx4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bIl4xvQN+8xZnm3sHyWuYtjeO5nCx8uM1ub3wg70cVOGJVP1CGBUJSfg1gnvjONj1 9WN+0sTeXcG/s4qPNSqbumcS2xHPuoskC/UzjA/CpMK3qma0L7bcbtAvkUkVSDN8VP m1HF4OB4zJpI2sF95dj7+XIGrCkXKDB2ZHAEf3Do= Date: Thu, 23 Nov 2023 09:41:49 +0000 From: "gregkh@linuxfoundation.org" To: Aleksandr Nogikh Cc: xingwei lee , "syzbot+786b124fe4ce4dc99357@syzkaller.appspotmail.com" , "linux-kernel@vger.kernel.org" , "rafael@kernel.org" , "syzkaller-bugs@googlegroups.com" , Dmitry Vyukov Subject: Re: [syzbot] [kernel?] general protection fault in joydev_connect Message-ID: <2023112306-diner-jawline-c7dc@gregkh> References: <2023112332-award-fanciness-2bcf@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 23 Nov 2023 01:44:09 -0800 (PST) On Thu, Nov 23, 2023 at 10:32:26AM +0100, Aleksandr Nogikh wrote: > On Thu, Nov 23, 2023 at 9:55 AM gregkh@linuxfoundation.org > wrote: > > > > On Wed, Nov 22, 2023 at 07:55:50PM +0800, xingwei lee wrote: > > > Hi. I have reproduced this bug with repro.txt and repro.c below: > > > > > > repro.txt > > > r0 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000500), 0x802, 0x0) > > > ioctl$UI_DEV_SETUP(r0, 0x405c5503, &(0x7f0000000080)={{0x0, 0xffff, > > > 0x3}, 'syz0\x00'}) > > > ioctl$UI_DEV_CREATE(r0, 0x5501) (fail_nth: 51) > > > > You are using fault injection, which, by it's very name, causes faults :) > > But those injected failures (that do not break the kernel, but just > emulate an error returned from a function that should be expected to > sometimes return an error) still should not lead to general protection > fault panics, shouldn't they? It all depends on what exactly the fault is happening for. Some allocations in the kernel just "will not fail ever" so when you add fault injection testing, you are doing things that really can not ever happen. So the proof is first on the reporter, prove that this type of fault _can_ actually happen, and then, make a fix to properly handle it. Don't expect us to make a fix for something that can not actually occur, as that would be pointless (hint, we have been down this path before, it doesn't work...) thanks, greg k-h