Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp813348rdb; Fri, 26 Jan 2024 11:24:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFLnPSSpa8PafdUshq4/ciOenYZq9s6Nnu9CRnWiFL/JvnHUDCZqyQIdplM6YWA7Xry2mXa X-Received: by 2002:a05:6402:3c7:b0:55d:20df:fc30 with SMTP id t7-20020a05640203c700b0055d20dffc30mr122938edw.4.1706297044480; Fri, 26 Jan 2024 11:24:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706297044; cv=pass; d=google.com; s=arc-20160816; b=BRfH2VooexwHy81J+RC5XpCpWyl9RAlkYyajuuwGr0295p7Guu/4DNcS490vcCnnwE QZHlA9DmSqGi0AmQQA9UYO7BQZNWGaPQQ0coMxmR3bf0Xyle5Lj9FYQ2Kg94nHX2ZF2N +CstXWcbl2Nz9xoxx/ksquxPeZFy5uxHgaTnpH4hHkMYEp9kd+Nb6aSlOpbBiwgm3WJv zPcXnKBB7kZCTeKdtCZqmQ+H262bKbWmplg8g8WOUuCCX1ZZhkEvrl2id2CqrzL+J/H7 SeAxjVomth3nDtdj+Rrwd+dcokX3b787ChdyaMWZw/ZEXhe4A+76IBysq0dISYjBe7s8 yZBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=g2W0Zl7xzd2wxRa6YlVpFynbgqiu+nXpKSSPE3EaefE=; fh=VQV5236iCI/TsN5Y57G+24R3iqZJTXaCd3LPoGTbRug=; b=P/T17OqfRQSbaho6HTwbsiUoGyc1qRCkl4AkuLPkitAeALmflP+A+KxXZhFU4XVVkO IdQOKtSFGVP3tZLzPzubMaZy6U2y0rxW8pTSa8MTeDe1bBHniW8os4b3/q4YHkEOHhHD pRvPVHDPhOJ7+N9EmYFcgGNvk6FMciHgNmRkXZLhzNoHEs/t3xSeU73C0QZAJWz5sWLi t41WOxT8TRb6KDUuyDhXGPhgY7dBMtylNTpFIKYtmYlC7gtpENYOL8E0+hvxxYVukJfo YFcq6oyqZtLYhGMreEyzDEZmnasgCOpmQj+vkcnHj+ZSkboGdvU/zGJac40/PxQlGnqO bZdg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DCUvL8Pw; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-40559-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40559-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q11-20020a056402248b00b0055c08bd1935si968574eda.497.2024.01.26.11.24.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 11:24:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40559-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DCUvL8Pw; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-40559-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40559-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3D5C11F23CB2 for ; Fri, 26 Jan 2024 19:24:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70842224E7; Fri, 26 Jan 2024 19:24:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DCUvL8Pw" Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BA0D224DB for ; Fri, 26 Jan 2024 19:23:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706297039; cv=none; b=dn1z4Bo0MbvVJcgKIyU+H25iOmfMlO03bQzRhnTFWzqIzWnHhp0jeQtygR86nTvdhxV4gJoVwwJ+1L20I5k3DCpDPHvFFiFd4nojhb7HBB00uqKntNDRDKyWB6YlZfuw5SdKp9R/GINZbXNm5JmHnpurg+Iy1x0MSV1FuObcqw8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706297039; c=relaxed/simple; bh=/prchrmS9v6pk/30tmSIoCVni3gFDegNALlJ0+Z8LdY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=XP/2S48yzkLTisCYIx6jkPd2JuOwfCFb7dXQmXs+KGQTQknocQj9sxqH2IqfnvTmNtB2i2SsI5pxwJy/rDVdBoNvwIb1rNaViTS/L9NW+HzOve1vJRPwtfUBqssIgOFTXZOmLZjtyQG4hoye55yKPUN0GJtY/YwaEYVLqZwbCTA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DCUvL8Pw; arc=none smtp.client-ip=209.85.216.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-29359a09b1bso546458a91.2 for ; Fri, 26 Jan 2024 11:23:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706297037; x=1706901837; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=g2W0Zl7xzd2wxRa6YlVpFynbgqiu+nXpKSSPE3EaefE=; b=DCUvL8PwCKNFtpeV/F5Bzc/ALXFzkUU718Jw+l10aVCgR8SRrK14uNCYQIe5oPAii9 ck0nGczynQ6DeI1W4JEUCizStc7YBCzE6WSHvJ2Yq2GxuvjvDQ8qK61L66+ZhcuyO76n MC679tDwnvFoK2a3oyPh3F8rDGYQzrDMa33ylnNx3Ubf/18wL9Axtm6sG52XgRC1eSma s3VKNFHBRwiozddSs4ZNl2AyKZDqFtT61e7Ws3xOHXvAsIWjubFxO3Hc0qEpVumn5FC8 +lz4cfKKb5HNXycqrlqib85sxY+NAiE5gbHaAUm/HefXBL5BmB/zYdeb3Fm8aGBOsUt8 okrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706297037; x=1706901837; h=content-transfer-encoding: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=g2W0Zl7xzd2wxRa6YlVpFynbgqiu+nXpKSSPE3EaefE=; b=SzzaBwprbrtDLkYQyfUp6iJfIRu8UxyYK0evDiumaGqfIMDn7X2lwXPosOlmFG5KC+ zWkjw90oE3Zu8cOQBAs5gcEWgL5naE46bCt0MFDa0GCqlKsqjBJPBaTwRwn7G6xXfuTw ZjxMC2BGY1ZEfGTDCcp5nSo/t6vpNfw2GUFkEoMPVjHon/ti0nzLKy8IvvD7bfId7H3u tnweQFw4/bUGccOKQa312ER0Sud2CGvzAW+Gn7hLsxBdqwS87bty/SoxPsT69gz8+p/P II1jjiQCpfc6OJqMm6oR2Hfw4haMZhgsYI/ggfNn1p1FLvBhlCaUhopc6vIPh+pORKEn hf0g== X-Gm-Message-State: AOJu0YyzQYHa9gQP1b+9QF+ZFKP6hpWNzhupTa/79gPUAHbmZ5ps0URe 8m8aSZueNQACL8PiVrewY6ZpKNx+v6ZYf/t6leC02paKABEsz8nAK04trK3spFllWQ5niVeENPN xL6z/djvW2GCEZ3VTE7S4Ffu8mQ== X-Received: by 2002:a17:90a:4891:b0:28e:7686:8e25 with SMTP id b17-20020a17090a489100b0028e76868e25mr344648pjh.42.1706297037455; Fri, 26 Jan 2024 11:23:57 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <46490518-0cdb-4d11-be9a-374ed5792da8@nvidia.com> In-Reply-To: <46490518-0cdb-4d11-be9a-374ed5792da8@nvidia.com> From: Chenyuan Yang Date: Fri, 26 Jan 2024 13:23:46 -0600 Message-ID: Subject: Re: [Linux Kernel Bug][mm/gup] 3 Warning Crashes: kmalloc bug in gup_test_ioctl, is_valid_gup_args, pin_user_pages_fast To: John Hubbard Cc: Matthew Wilcox , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, syzkaller@googlegroups.com, Zijie Zhao Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello John and Matthew, Thanks a lot for your further explanation of this issue! It really helps me have a deeper understanding of the testing interface used in the kernel. Best, Chenyuan On Fri, Jan 26, 2024 at 1:09=E2=80=AFPM John Hubbard = wrote: > > On 1/26/24 10:34, Matthew Wilcox wrote: > > On Fri, Jan 26, 2024 at 11:31:26AM -0600, Chenyuan Yang wrote: > >> In this context, I would like to seek your valued opinion. Do you > >> believe it would be more prudent to avoid fuzz testing the > >> `gup_test_ioctl`, or are the warnings in `gup_test_ioctl` an > >> anticipated outcome? > > > > It seems like a waste of time. Debian certainly disables it, so > > unless you can find a distro who enables it, I wouldn't bother. > > +1000! The purpose of gup_test_ioctl is to provide a way to invoke, > from user space, direct testing of some kernel interfaces that are > not actually exposed to user space for production systems. > > Fuzzing this interface is exactly what you should never do. :) > > > > >> It seems that `gup_test_ioctl` can indeed be exposed in the kernel by > >> accessing /sys/kernel/debug/gup_test. > > That's a debug interface. > > > > > If someone wants to fix these things, they can, but it just doesn't > > seem worth doing. Part of the art of fuzz testing is finding things > > that are worth testing. > > I'll go just slightly further, even: some conceivable "fixes" could end > up hurting test coverage. Without providing any real benefit. > > > thanks, > -- > John Hubbard > NVIDIA > >