Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27773117rwd; Tue, 4 Jul 2023 07:40:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlHBHx7SZkWBKHYM3M0fXSishB4Lqrj0Quo9bA8a6n0Kdi5cJ4Z43z/tNANpjbw+HSxa9Wy8 X-Received: by 2002:a05:6359:d0f:b0:132:f294:77fe with SMTP id gp15-20020a0563590d0f00b00132f29477femr9201665rwb.2.1688481604693; Tue, 04 Jul 2023 07:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688481604; cv=none; d=google.com; s=arc-20160816; b=OZDCqQ7TSDqpH9K9LEJq0IvFhX3PysDCtEcoG8Q3ksouu2cGdfQN4qymYlQ26A1khI Q8mWp3pFG4WsgWFwR0785T2laczYIC+UPOLrkD41qf4XBNl8E1WnDUqSaVPo05TACTlI KRsBMlCSbOC31aTIchVINIz0t/op2olp/FB3/TwwYuV67o/QA8tt4l9Shd21mpEzSFmq QIfxFXnHcT6ExZc3rmzPOnTSO5T/s9Bmjb0Pdg7EfoqG/P8eCjNk3CqoGLTHUjzDadI7 b/6VYssecEdBDrW59T24E4OCT/EiQHzshToECbHO9euXLgwqfg2KkyAS0jjjwxh9y9zM ZPSQ== 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=3So2gYeZeNuR/2q5MlAFdt4BonOt1PCCLvQw80QmelA=; fh=4HZgnObmANFtS5usX3zWFvMCFNBt7BCZ6yUs4A91e7I=; b=HTeOX/E1eBCJGCk0heyyTQNPkAqnFv2qmb9HTTdU2/6nnvO33oH63MGhFXgKSqrpcW LgSZq9Rp40qR4TBWbKBVbgmxL/Y48nkMJu4n42tYKtLn2VH0rFuqISWiFMx5+923oFZQ 0edYR5GZLX4pkwAvn0VEDUjHFqtc6KUbxyO+8WvuJA/4fAXeAPCHgXgPqHuo3kByzhKR bXQTsFCBayL2MremDMDKXLFiAriA7vS90d3tQTl2dYfk/GGCZ5ZEH0lJ00oF/huOkC3w o5En4DQR7TkI6PBQsN2v9GWYYIhQS+RbYod4FxMFzEBzyO3T/OTslDk2cU+sh05onXva iuBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="VMYVeQ/3"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m123-20020a632681000000b0055392732f62si21926098pgm.495.2023.07.04.07.39.51; Tue, 04 Jul 2023 07:40:04 -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=@linux-foundation.org header.s=google header.b="VMYVeQ/3"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231585AbjGDONG (ORCPT + 99 others); Tue, 4 Jul 2023 10:13:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231664AbjGDOM7 (ORCPT ); Tue, 4 Jul 2023 10:12:59 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 604B510F9 for ; Tue, 4 Jul 2023 07:12:44 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4fbc0314a7bso243310e87.2 for ; Tue, 04 Jul 2023 07:12:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1688479962; x=1691071962; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3So2gYeZeNuR/2q5MlAFdt4BonOt1PCCLvQw80QmelA=; b=VMYVeQ/3aOo2t7q5I2qhzWvMI1BoQTPHN1dTxFMKqSuI+BTcu/l9Rp4m2ZZwGpXclf suVev63/PkXCAXBzad/rOT+DokjOk76HpR3M8An9Z8331TIOHDz0nAfHZyJ+cOreIj9F NLPX+0s4cwWM3S/No8zcIOzWq7bzSxwXVhCSQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688479962; x=1691071962; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3So2gYeZeNuR/2q5MlAFdt4BonOt1PCCLvQw80QmelA=; b=C7PjuJ7rTMBfBakMe1sEbRUTyODATdHU4+N00TxNYLrL8k2RHYxj6q7IjnajK4EiMO VbXj52BlofJVlWaydBJRkCJbvgQX2lxhvW4jPQorhcYwPkTUVb32rU3n2tV8p2VTJEO7 4sI4SSEwVzhSbpa2aV1w29jsXDv17jkcfFeOdva0bjtgdZIbtPXnkHYkEgwcbBZ7Im55 UMz97hdEv/Krm9LxjHO/0ax1i53BY4on/tfIk137iCyc1RinDek2pceljD3Siyr+wEhl 2iD9H23K2qNyLnGzma2tK7i8lQlbKrbXgWzLXAoAfuag075EVhAhO/bsYfzbuG9fbu/C 0bhw== X-Gm-Message-State: ABy/qLYNCeCZcn0y409ODGCyivYmDphWERJrIRVqIO54fp8dsL7pSasS M8MAXyJZE5KnSu6WxuuxbxY01VuPFEL296Yv1/PJOTT3 X-Received: by 2002:a05:6512:3994:b0:4f6:47a2:7bb4 with SMTP id j20-20020a056512399400b004f647a27bb4mr11577205lfu.60.1688479962204; Tue, 04 Jul 2023 07:12:42 -0700 (PDT) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com. [209.85.167.53]) by smtp.gmail.com with ESMTPSA id v2-20020ac25582000000b004fba077e654sm2823452lfg.194.2023.07.04.07.12.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jul 2023 07:12:41 -0700 (PDT) Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-4fb7769f15aso8982255e87.0 for ; Tue, 04 Jul 2023 07:12:41 -0700 (PDT) X-Received: by 2002:a05:6512:2386:b0:4fb:763c:af54 with SMTP id c6-20020a056512238600b004fb763caf54mr11708321lfv.62.1688479961179; Tue, 04 Jul 2023 07:12:41 -0700 (PDT) MIME-Version: 1.0 References: <202307041023.bcdbbfc0-oliver.sang@intel.com> In-Reply-To: <202307041023.bcdbbfc0-oliver.sang@intel.com> From: Linus Torvalds Date: Tue, 4 Jul 2023 07:12:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linus:master] [gup] a425ac5365: WARNING:at_mm/gup.c:#__get_user_pages To: kernel test robot Cc: oe-lkp@lists.linux.dev, lkp@intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: multipart/mixed; boundary="0000000000004cc04805ffa9e054" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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 --0000000000004cc04805ffa9e054 Content-Type: text/plain; charset="UTF-8" On Tue, 4 Jul 2023 at 00:03, kernel test robot wrote: > > we noticed this commit 'add a (temporary) warning' for the case that > 'anybody actually does anything quite this strange'. > and in our this test, the warning hits. just FYI. Yeah, so it looks like this is trinity doing system calls with random arguments, and that will obviously hit the whole "GUP will no longer expand the stack, warn if somebody seems to want to do GUP under the stack" test. So then it will warn if somebody passes in bogus addresses that *used* to maybe work. But with a random argument tester like trinity, passing in random bogus addresses is obviously expected, so the warning will trigger even if it's not something that we would not want to keep working. I do not have a good idea for how to not warn for things like syzbot and trinity that do random system calls, and only warn for any potential real applications that do crazy things and expect them to work. And I *do* want the backtrace from the warning (in this case, it shows that it's the "process_vm_readv/writev()" path, which actually might be worth adding stack expansion to, the same way __access_remote_vm() does). I guess I can do the limiting manually, and just avoid WARN_ON_ONCE(). If I do just "dump_stack()", will the kernel test robot react to that too? IOW, would a patch like the attached make the kernel test robot not react? Linus --0000000000004cc04805ffa9e054 Content-Type: text/x-patch; charset="US-ASCII"; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_ljodbtsf0 IG1tL2d1cC5jIHwgMTggKysrKysrKysrKysrKysrKystCiAxIGZpbGUgY2hhbmdlZCwgMTcgaW5z ZXJ0aW9ucygrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL21tL2d1cC5jIGIvbW0vZ3Vw LmMKaW5kZXggZWYyOTY0MTY3MWM3Li5jOWQ3OTlkMjhkZTcgMTAwNjQ0Ci0tLSBhL21tL2d1cC5j CisrKyBiL21tL2d1cC5jCkBAIC0xMDkxLDYgKzEwOTEsMjEgQEAgc3RhdGljIGludCBjaGVja192 bWFfZmxhZ3Moc3RydWN0IHZtX2FyZWFfc3RydWN0ICp2bWEsIHVuc2lnbmVkIGxvbmcgZ3VwX2Zs YWdzKQogCXJldHVybiAwOwogfQogCitzdGF0aWMgdm9pZCBndXBfc3RhY2tfZXhwYW5zaW9uX3dh cm5pbmcoY29uc3Qgc3RydWN0IHZtX2FyZWFfc3RydWN0ICp2bWEsCisJdW5zaWduZWQgbG9uZyBh ZGRyKQoreworCXN0YXR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