Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp320033rdb; Thu, 18 Jan 2024 04:47:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IET/TQsgzNmzuAAmEPAjb9tqOTTtcVGtto+PGfMQytELGlB4iiohDIztGcOdxiN19PKa0PE X-Received: by 2002:a17:902:e852:b0:1d7:d44:b7a7 with SMTP id t18-20020a170902e85200b001d70d44b7a7mr445931plg.129.1705582036621; Thu, 18 Jan 2024 04:47:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705582036; cv=pass; d=google.com; s=arc-20160816; b=cr+bX0VkBi/wFwwz+E7D3jf6tT9rlsVj9gttiHuvrf2VLuY6dpxzsMsTYLawEbg07p GbDnDqrnNFNt6jh5vLWl8ZM+/OE9+5KRwq5lDfAuTzdRfXnha/lWVkYurQK4F180irLx D/isRc1vlgKlLqei8LRPHeqZwAZKAaxXwUBgpitMswWxU6tchUgT57N/9n7+vZlCY/OI a+CFrTppb3GGMIhQuV5mAXSjSB0zNTdx6Skxfj3ni392J9C6Soq0e0r34xvWE4uu5OZr +tlylgg5wnEcMwzF/0u4g/Kifn3Wd5YU5cZq42FM5/GsMcVIeRpyMlMatbzz3kR0N1dt 0Ung== 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=7hzv9Q2RyFYsBMK7cp2sHJQU4W1HVKR0nok44qQw548=; fh=GzlALEyF9NLgSpM9tzsGNgDMvY8hPgccqiIbi0fjo98=; b=bN49t6+nfrMS0iNU54KtbrhQ1kzmK8Jdp/SrK1wzdgeArLoZseWvrmsqwoeGIYh7aN rncF40iRuIl8vjtjEj/EF3VDqPXJZHLWG3XKs9t/q7ZyZVaGj3eyEf4ak4ztxpzpEqAs y2jNhnDni2FOHtBiLe9sSR0IraQMxtzUq3EZb+zCGyqbT8fjVbUotl+OhFw8Urj4sgqC 0uOr7FHqiwCj6HaxhptLHIVMOdGJSiekjmmVwB3ZxMyVGgNHTnM+KbapdgicSW7SlAUn C/EZVAc3S+idOlfOqMELrY+y0rZHmicrtRxu7TBPaueA/nHCMtexINdxgTHMrY/Yp3XK nz1A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Bok4Q69+; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-30114-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30114-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a19-20020a1709027d9300b001d5610ab3adsi1371817plm.258.2024.01.18.04.47.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 04:47:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30114-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Bok4Q69+; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-30114-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30114-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2A5BC28642E for ; Thu, 18 Jan 2024 12:47:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EDD424B4F; Thu, 18 Jan 2024 12:47:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Bok4Q69+" Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 525D124B3A for ; Thu, 18 Jan 2024 12:47:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705582029; cv=none; b=PThlp9u7/168XBNtzYO9fkirrJkMPRDHlId6Uvvu33l5g1IbTDqcQFWyL3JYG2wUqBxOOs6j/i984TPNrsLdsJv2f/xmT24jmXHX4+80vcIxeX4WhTtKKZJXBI5wdbsNnugLvUT6wE8HpvKvMiIIPlQ+RLa8Lo/s31A7tY3jMA8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705582029; c=relaxed/simple; bh=7hzv9Q2RyFYsBMK7cp2sHJQU4W1HVKR0nok44qQw548=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version: References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc: Content-Type:Content-Transfer-Encoding; b=b4oOYu9JG/g0Ac6/XJjhjlTKmoYte5VOCFRjY9M4uf3ZgDESBqHGXfioCZa4MzRpfxkeNSSenl3J0MTCdK8wAriQuAmvaPez7f2gitWWmqKBy+OzEe5kt2QPMQKGSpZ0YNQBVK8t4jjcdbdrKqdJtavdOxkQlUrIS16H8S7RLiM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Bok4Q69+; arc=none smtp.client-ip=209.85.222.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-7831ed13d39so968075185a.0 for ; Thu, 18 Jan 2024 04:47:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705582027; x=1706186827; 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=7hzv9Q2RyFYsBMK7cp2sHJQU4W1HVKR0nok44qQw548=; b=Bok4Q69+HhXa8aXkt8tCjve0evBtlKS5Avm+SDiXbV2MZcwMoGEXAAYvW95sTJ6wra lQYYs4Mubuj9GLrfK+q1m87TB7IngUmlWs0PikpLblo8md+0B4c1n5j0bFa38nL/gKUk U0o4cMMLrN0dBlxzgUuZE59Wu5D73Hntp6XVMYwK5t0wJ5qFvn1JaGdpLDHt5I2iktJ0 o5yhRbfi0ML7X70uoCdxMxQ3obaUBr+Lm+H/zZgVZj/0HzFE6Abd5s0hUlQE1k6ppF/v 2OtYzpH9qNvhqL3XGjZMm2uUmpbwOVg++/4Z9Gk+aQN90NDnwbLEK/iZGFQ+/OtMReG5 RtqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705582027; x=1706186827; 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=7hzv9Q2RyFYsBMK7cp2sHJQU4W1HVKR0nok44qQw548=; b=iL42uAyqgpUb1TwE9Q/67GyTQrgT9s2DeULVycC8FzxwR2aNQdjpGCgV9hQpycRXM5 ja61PRh+96U1me4s8BBROAEsxWfdhcoGZzlJeoMdo82Ltg1v3u/LXfMMsLedOlzkr+Hi vWFc6d9L1j4TMOTk3DynGwt6wrWW+9F0oWl6dgUngt+5QPKlRlv/JW/4b4bKCluWINek GCE0+SpcK3IlW3rBFNMaF13wOvmqVMdQmNyq6LfxIqpFEs+jub02ZpBtz8P03CZ47iYn ZQxQ3QB5cAKTrAFUv10AOXRScYe+ZnFFyH6GqPiCT7M+bAyAMoUGHWetpP91GR/AQXbn i0hw== X-Gm-Message-State: AOJu0Yxgnjla/kyAho1VWVp6B8NHKPLh5xF2Gexb5UsQPbLo5pPRPbNz vPNPU7+EDIaPfj3P8rgNOTt5NZQ+Azpxn6YA0TWtaMHEqxPkv75/9juICvVJXWP8JQRPzj8fdGv nCmgquc6t+Los1IrKhw+4AZAHiUYcyf/wweyT X-Received: by 2002:a0c:f2cf:0:b0:681:7867:fbb9 with SMTP id c15-20020a0cf2cf000000b006817867fbb9mr747219qvm.88.1705582027089; Thu, 18 Jan 2024 04:47:07 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240118110022.2538350-1-elver@google.com> In-Reply-To: From: Alexander Potapenko Date: Thu, 18 Jan 2024 13:46:26 +0100 Message-ID: Subject: Re: [PATCH] mm, kmsan: fix infinite recursion due to RCU critical section To: Charan Teja Kalla Cc: Marco Elver , Andrew Morton , Dmitry Vyukov , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzbot+93a9e8a3dea8d6085e12@syzkaller.appspotmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jan 18, 2024 at 12:28=E2=80=AFPM Charan Teja Kalla wrote: > > May I ask if KMSAN also instruments the access to the memory managed as > ZONE_DEVICE. You know this is not the RAM and also these pages will > never be onlined thus also not be available in buddy. Is there a way to tell whether a memory chunk belongs to ZONE_DEVICE by its address? Won't such check involve calling pfn_valid() or a similar function that would also require synchronization? In general, if e.g. one can call memset() on ZONE_DEVICE memory, it is already going to be instrumented by KMSAN.