Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1353563iof; Tue, 7 Jun 2022 04:03:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyG2b1YCvhGf6G4KpC1tdoNexOT/PXHL/y5FKn2rC8rQBCIL2rxa6cvsUdrGKY6r2P4b5xl X-Received: by 2002:a17:90a:de15:b0:1df:63dd:9cfc with SMTP id m21-20020a17090ade1500b001df63dd9cfcmr31973183pjv.200.1654599752846; Tue, 07 Jun 2022 04:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654599752; cv=none; d=google.com; s=arc-20160816; b=o/LYCyhtGwgIjUgrBm6W1+Piv32J0Z1/fy/DZTmnMzwt8FzCEKlODN6187AfJxkM88 UpJ6RMldFk/G/3JVnjRErjt4R6esHFmH7gOO9EC5JUsyIsmeAuci2677lbC4rf9l3NqJ OeDihnsi/dW3gvvyJG3saA+o5XDR4ZUwM5WYoB5KgcO4erDgYRfVn7upPMMxfCOZ7DG0 ftnnQtvVnhHrVDVSHlB1wbSOQkuHpFn+dEzHNDouhAVfduOdgRm47G8MqmWtcb14MDvA QlFQO2pyWfTOTZySmXDr0Nkhc9xih7qk5ZeP9cTFCUE7eZAQFn9nMwP4MfhOItztdjP7 AtQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=YtcjALjI2RZjsiofJNrRsd8EXD975AiTacZTv5laD3A=; b=M/Wh9PlLeOuMDbNFu9NNFJWgBgVp5Ok2aCFwM3+YaggyRpnJ7ZXn4Vs2VHxCoUuEsz dnFd0aOruJzYc9SWuKjhio5aaTSBd0ZlNzebxR141FWIJBX7IVDlBjiSr2fJfYDICwQ2 sJzJLrE+K/D2R2uUOM2+jmcTQ7NywHTBl9v8stK9Nj03MWDWd5Ymu+iOlNwZBdBdDAGg L4wI2mWIu5GdI5uzHNIZzBPyU78372syEMFEN+NDT4HBLCofFfMfQEUuTtLJMeQGfgEp Aq1fhOl0t3oqkTrwEZIq57L2mKwpn6E9Ftx/iQ7tIoAxCKhI8q4c0I9toQ7nBK4xpiID Oo+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=f19PMMaV; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j6-20020a654306000000b003fa5e1daaa7si22646204pgq.197.2022.06.07.04.02.19; Tue, 07 Jun 2022 04:02:32 -0700 (PDT) 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=@google.com header.s=20210112 header.b=f19PMMaV; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231504AbiFGHP1 (ORCPT + 99 others); Tue, 7 Jun 2022 03:15:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237382AbiFGHPZ (ORCPT ); Tue, 7 Jun 2022 03:15:25 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40C722018C for ; Tue, 7 Jun 2022 00:15:24 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id a2so26891975lfc.2 for ; Tue, 07 Jun 2022 00:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YtcjALjI2RZjsiofJNrRsd8EXD975AiTacZTv5laD3A=; b=f19PMMaVtX+BpJFFtU0Q2VO6fMGbOuJgz1c/nFXb3jADKHD6RE8bc/7KA/pI+rkX00 ybDIVaW11W0wAoniwtNsqCLG/50GCtvMU8/n4twyfDCbZ8cjJRj4a7qRSeyqA1vLLLrZ 7GTNTZmnzfob0R++KIEhuymJltw9rPlWjAm7GHHK8n+bICqn7KRgKh1VAvOdmrIH25rL 226hoidniZOStstv09tB6xTZVHpwYC795Ig5R1HrELOOmPC6MFGVJ0m0tnle7VE2/4oG ejvQQGfLuvOGSSUrsZPjtQ6CM3cdp7Gfd6V8Cg29vyhLqnFbV6fEUQ7p+YYNkjXCc0Xw eEUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YtcjALjI2RZjsiofJNrRsd8EXD975AiTacZTv5laD3A=; b=b/G9Pugjucj62syMR/OU502pYMwDW6jNEoAxhcXUfAn7Paic6gOIijwvdhbKWNtyIy 736nrhdsOq2DvgGBxjIW41RYRN1JDNx5lnhOmR4+Y6DXv1gUbh5zz95P8HIkjrqTwcqQ gsYWZd2t3b18TlWzi9vNRHAeg3diVnJnNGI1sTuxwTp5tTneSNuamkSoJLpd8UdULGkk pqGen8T9GjYqPejDo9DaS7qpQ7RfyDofR0bihIU5f/ffkr51S0Lvx8uQ9+Mflugj+qEE lRu+sAFaPegcAKo7W6RIlYwtxoDayGjnCAduwCZh+LKtj5VODI+pKd3zrWamucgCPfxm 9NJw== X-Gm-Message-State: AOAM533hMLY+DokuIe0MVNFm6fsNIC0Q7SRj25j6EfxwMdztR8fX8Ts0 DudAP8liO+iTsoo/Fa+9GLcQu7soqL5VIcy2abeg3g== X-Received: by 2002:a05:6512:1085:b0:479:478b:d2cc with SMTP id j5-20020a056512108500b00479478bd2ccmr5934514lfg.540.1654586122236; Tue, 07 Jun 2022 00:15:22 -0700 (PDT) MIME-Version: 1.0 References: <000000000000bb7f1c05da29b601@google.com> <00000000000010b7d305e08837c8@google.com> <20220606123839.GW2146@kadam> In-Reply-To: <20220606123839.GW2146@kadam> From: Dmitry Vyukov Date: Tue, 7 Jun 2022 09:15:09 +0200 Message-ID: Subject: Re: [syzbot] general protection fault in __device_attach To: Dan Carpenter Cc: Greg KH , Alan Stern , Andy Shevchenko , syzbot , hdanton@sina.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, rafael.j.wysocki@intel.com, rafael@kernel.org, rjw@rjwysocki.net, syzkaller-bugs@googlegroups.com, linux-usb@vger.kernel.org, Linux-MM Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 Mon, 6 Jun 2022 at 14:39, Dan Carpenter wrote: > > On Sat, Jun 04, 2022 at 10:32:46AM +0200, 'Dmitry Vyukov' via syzkaller-bugs wrote: > > On Fri, 3 Jun 2022 at 18:12, Greg KH wrote: > > > > > > But again, is this a "real and able to be triggered from userspace" > > > problem, or just fault-injection-induced? > > > > Then this is something to fix in the fault injection subsystem. > > Testing systems shouldn't be reporting false positives. > > What allocations cannot fail in real life? Is it <=page_size? > > > > Apparently in 2014, anything less than *EIGHT?!!* pages succeeded! > > https://lwn.net/Articles/627419/ > > I have been on the look out since that article and never seen anyone > mention it changing. I think we should ignore that and say that > anything over PAGE_SIZE can fail. Possibly we could go smaller than > PAGE_SIZE... +linux-mm for GFP expertise re what allocations cannot possibly fail and should be excluded from fault injection. Interesting, thanks for the link. PAGE_SIZE looks like a good start. Once we have the predicate in place, we can refine it later when/if we have more inputs. But I wonder about GFP flags. They definitely have some impact on allocations. If GFP_ACCOUNT is set, all allocations can fail, right? If GFP_DMA/DMA32 is set, allocations can fail, right? What about other zones? If GFP_NORETRY is set, allocations can fail? What about GFP_NOMEMALLOC and GFP_ATOMIC? What about GFP_IO/GFP_FS/GFP_DIRECT_RECLAIM/GFP_KSWAPD_RECLAIM? At least some of these need to be set for allocations to not fail? Which ones? Any other flags are required to be set/unset for allocations to not fail? FTR here is quick link to flags list: https://elixir.bootlin.com/linux/v5.19-rc1/source/include/linux/gfp.h#L32