Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1131759rdb; Fri, 19 Jan 2024 09:05:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0eelnXazUy166K+wRCxvzVwPjqdKM4Cy7r3i/lY7HzHIIWm3FYff2mnpcAVeSHda2jWKm X-Received: by 2002:a05:6a20:3b2a:b0:19a:4b93:250c with SMTP id c42-20020a056a203b2a00b0019a4b93250cmr119653pzh.51.1705683906582; Fri, 19 Jan 2024 09:05:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705683906; cv=pass; d=google.com; s=arc-20160816; b=nWc19HVxJCojC4B6Ckee36nMMxUqmSqiwNuQAhH38P0NPnfgtiXLZUqiG2NsczO+nX sIfTBWpVYtCu7lvMFu6OscBHw9UfNhPORgnrDMHivhLLTOd1nHlYAfe5vrMM4+8noH6u Tki/imcrsB4P2RtqA6Jefnf+n9oeCFDQJmy+x+2ZQ1wv5STBBRUtu+0Z3uNR7rlXemhK exRjzNalFOWqJuqKZFLu/g8UIG/vujPhV5Af+TDFT10BH3Mr5cd9OAprIDufPPbcOTPY jBkutO4fSxgu3CNPtP8acY2BpGHSex9GTzPRywq8+MPBRHOArAaQhrXfHsz75PKeIteh sWtQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Qy1pMhP/rRJ1IzNoHsuqbIjw26g6hcRy+ObDQ8oRG60=; fh=hPe+RQtg0fG3w3ohrGiJ8hqH+ngnJHcVHhogV7C9wtU=; b=XKwIauYu2ahfmanem6QLYpFXrsRJXVQJWJYA3Cg3tS6Us7BU9yKbTkaGP1UcFTBMW8 K3GAoKD/3j9R9XBt1EB4fNbgVr/s5iHhtlLkCiL2fZahxZJcSZb7YJH0UyAx/tZ8pE27 6A4jH7x1w3OWZXOAwe12eC1EHDPnSehlfgulEypvW7nJ8nW56dRqxf2zoG695mik9PlI p5zxBi9Rl1cTwYO0H3o2QlQSFgno9WKHunAp67Een0K8cLlxSt+aOBn/QLCxf65rJTMr mpTVZno3r7HjAh5sKidE/4RCujTyM4c3lfs+E84chIVaXzcmnUNy4wash8ZP9W8vB53e AYug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=M1OURMWY; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-31388-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31388-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b2-20020a056a000a8200b006dbbe97dfc7si1158074pfl.399.2024.01.19.09.05.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 09:05:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31388-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=M1OURMWY; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-31388-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31388-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6302AB24629 for ; Fri, 19 Jan 2024 17:01:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C86F5579A; Fri, 19 Jan 2024 17:01:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="M1OURMWY" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 258D91F60B for ; Fri, 19 Jan 2024 17:01:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705683665; cv=none; b=IgIUkto6riasS5hP3+eQas8EyAdkacNicwITS7iBBhMnnzmdDi+yKvVS7Q3+Lmk8JSbK1hlS9pLINTURAeZa3B35tIvSmJpIM3O2JNQvZio7q1F1974vh7RfJXVe7aY8mugUvPjZAXWSHHPyMfDw+QbYroxjZWV/M6M6VfXqxwY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705683665; c=relaxed/simple; bh=W5sCI0PITHZFDeHBgbs+W7Bc9g68oVsuBMQjrIfHdF8=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=tneegqq4U4D/CyC76gxoDCQ9RiZfeubj+2UTNX8p4v8VMaED7EaFCkNEPre6vB5uuwntJcE/DhDtSbbP/5qF1H56q05UoIK58ka/o3EQOuRw2Cn3o6hYRAdW3vBdWANGzOd+5V8XGYsBWnJ2XOh/VOSp+1xYYhd/iickSg0EE/0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=M1OURMWY; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40JCbQb8010388; Fri, 19 Jan 2024 17:00:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=Qy1pMhP/rRJ1IzNoHsuqbIjw26g6hcRy+ObDQ8oRG60=; b=M1 OURMWYeZjNu87Msk/DWWDq3WAcNenMOtUDr/I17mqxbp0nz5TAx7AK0pZtFDqddz PD3J3/LJnwaSLii5oK3gbwbWs2qAxLsinqg4SqChxiwgO+X2OnDyqiHlTSOTjtkg aDghS70ki9OActoy+puA49g7RNDzbo4avdQDCzrEno7NzjzBXz+W/1gyHlrUAlaY qmzqKveYgFpkjbwRHA1Awbz6CIMD8YYT8i+NFlQXoIv+YYwMN9zRv062d4/p4Heg Hkms5+W8ALH/KGuyphpsrd5hLIyDMkMZD0ohoQQgb1TVuc//LRCcit/ZeKkMj79n EN4vGK+6QsCRi7UQa5Rw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vqpkvguj8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Jan 2024 17:00:32 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40JH0UMe027236 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Jan 2024 17:00:30 GMT Received: from [10.216.49.108] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 19 Jan 2024 09:00:26 -0800 Message-ID: Date: Fri, 19 Jan 2024 22:30:22 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] mm, kmsan: fix infinite recursion due to RCU critical section To: Marco Elver CC: Andrew Morton , Alexander Potapenko , Dmitry Vyukov , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , "H. Peter Anvin" , , , , References: <20240118110022.2538350-1-elver@google.com> Content-Language: en-US From: Charan Teja Kalla In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: vwcSK_orfgT8C__2D3CJHzd-MY-j7Ask X-Proofpoint-ORIG-GUID: vwcSK_orfgT8C__2D3CJHzd-MY-j7Ask X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-19_10,2024-01-19_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=739 phishscore=0 bulkscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 adultscore=0 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401190097 On 1/18/2024 5:52 PM, Marco Elver wrote: > It would be nice to avoid duplicating functions - both options have downsides: > 1. Shared pfn_valid(): it might break for KMSAN again in future if new > recursion is introduced. > 2. KMSAN-version of pfn_valid(): it might break if pfn_valid() changes > in future. > > I suspect #1 is less likely. > > What is your main concern by switching to rcu_read_lock_sched()? No concerns from my side. Just wanted to know the thought behind changing the pfn_valid instead of kmsan version, like for some functions. Thanks for the clarification.