Message ID | 20250114-kcov-v1-3-004294b931a2@quicinc.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65D3CC02183 for <linux-mm@archiver.kernel.org>; Tue, 14 Jan 2025 05:36:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EC4666B0089; Tue, 14 Jan 2025 00:36:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E264E6B008C; Tue, 14 Jan 2025 00:36:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C2A946B0092; Tue, 14 Jan 2025 00:36:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 963C26B0089 for <linux-mm@kvack.org>; Tue, 14 Jan 2025 00:36:10 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 5800F1C724E for <linux-mm@kvack.org>; Tue, 14 Jan 2025 05:36:10 +0000 (UTC) X-FDA: 83004946500.30.E65C07D Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by imf26.hostedemail.com (Postfix) with ESMTP id 2822614000E for <linux-mm@kvack.org>; Tue, 14 Jan 2025 05:36:07 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=aXbBkGUg; spf=pass (imf26.hostedemail.com: domain of quic_jiangenj@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_jiangenj@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736832968; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=CFVY0tjOmtO4qAqPnzy1tUQpQ6ETWmPtYq/HPU3qSi0=; b=zG1mi4cBCVEkWVzPMB3NU1KIyojBlcUluYtOW0e2fwc7EXKk4ofNJxN3LsNZ1ssjher+ol Ko+MpVhKLJHf3KveSFI5/HhWcNuS4D1B126nKyPb/w4bYleYTzpboxDZfwSZWDZpiHfiUJ XmjRz9xJMQ3SZyH7e1CZGRx6n6pC7A0= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=aXbBkGUg; spf=pass (imf26.hostedemail.com: domain of quic_jiangenj@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_jiangenj@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736832968; a=rsa-sha256; cv=none; b=CDAJE1ic9HLITOBEfFADdDKtSI46GQZEia6bBNM/qs9TEwoDfcJgEm27Tg6FlPSzTzNENr 9GGHsqP7scKKpudpuX23O+IJyllq5sJ0SnbhYnoPa3te4mVM6WB24jKvb+qQDApZQsUmRc mKUObg6KR1JsPgJe5M7lE1Gx894g94E= Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50E2fc3u019144; Tue, 14 Jan 2025 05:35:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= CFVY0tjOmtO4qAqPnzy1tUQpQ6ETWmPtYq/HPU3qSi0=; b=aXbBkGUgRenYY+kr GhmhQxZFugwhs7ZerU+nCDz07oNXy4dB4IsS2Dn6ffnsRAFAHFmCulqCfnvn0VZR bIytfkOm3h0P5hnNhe8KtDRHc8NH8eI9DlQNPjFbr8uU61jzSSWI8lo63KxdwObG g+W8U0oLtB92OF40g3tTxMK1mz7UYvFQ8oMYPZrIgS+gcyD4nqoVAm9Gz6kFruCF s4DxNhbl1OReEc6X2stwMw0UD7kOwcqAU55wLJ0gHbGVK0i5TF/P7V49jaVzrFOQ HtJqJkcvB2YAuVoH74/8hjKc+QzkWFrpur5WdJVKmG7EukAMBxVk0586B5vLzQkx lXQJPQ== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 445fc68apd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Jan 2025 05:35:59 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50E5Zwtu020376 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Jan 2025 05:35:58 GMT Received: from la-sh002-lnx.ap.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 13 Jan 2025 21:35:52 -0800 From: "Jiao, Joey" <quic_jiangenj@quicinc.com> Date: Tue, 14 Jan 2025 13:34:33 +0800 Subject: [PATCH 3/7] kcov: allow using KCOV_TRACE_UNIQ_[PC|EDGE] modes together MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20250114-kcov-v1-3-004294b931a2@quicinc.com> References: <20250114-kcov-v1-0-004294b931a2@quicinc.com> In-Reply-To: <20250114-kcov-v1-0-004294b931a2@quicinc.com> To: Dmitry Vyukov <dvyukov@google.com>, Andrey Konovalov <andreyknvl@gmail.com>, Jonathan Corbet <corbet@lwn.net>, Andrew Morton <akpm@linux-foundation.org>, Dennis Zhou <dennis@kernel.org>, Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@linux.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> CC: <kasan-dev@googlegroups.com>, <linux-kernel@vger.kernel.org>, <workflows@vger.kernel.org>, <linux-doc@vger.kernel.org>, <linux-mm@kvack.org>, <linux-arm-kernel@lists.infradead.org>, <kernel@quicinc.com> X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1736832942; l=1250; i=quic_jiangenj@quicinc.com; s=20250114; h=from:subject:message-id; bh=cUrFJ9xlku6iOVJmqRm3AKSPyxlxbIELfrHlRVSE678=; b=PN4imkwKcD7/nAryYV3lJaq77IA4e+9rhwFDEIua2TPoylFR2tEVvYzX1A0kElet197HOJhRv KnL6OAxKhzVAAeMfHluhR5AD/KnczeQvktL1Pe8Wg8BhWFmOtiquMjy X-Developer-Key: i=quic_jiangenj@quicinc.com; a=ed25519; pk=JPzmfEvx11SW1Q1qtMhFcAx46KP1Ui36jcetDgbev28= X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 2ybqo6M8sHxWZsrwE_g4pZ5-4RN20TNw X-Proofpoint-GUID: 2ybqo6M8sHxWZsrwE_g4pZ5-4RN20TNw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=891 adultscore=0 suspectscore=0 malwarescore=0 phishscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140043 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 2822614000E X-Rspam-User: X-Stat-Signature: hfk8x5w4znjmf9u5yarzh1cps6gu1h4o X-HE-Tag: 1736832967-16218 X-HE-Meta: U2FsdGVkX1/3vUA6HXj2jvsXtiC2tdJEI4vLwaxNuKgqyAdxm4x47kGIdZMjjcX7moNP3DcmfpD4O4a/OpYYhs5M2+WTkj9Yqz6tj4MmT6fh9R86Zf+5YiOySY/VjeXoKCvwCn7WX6z8oVbxosvGK23DcGcrEE4iLe4YEHUHnbLEUaRtmHRQbWSBADdvagn8x8trinNFur8ODv7xwqjhVXDnCZYNM72DDI5Nr3eIAYmegUTU2HGzY+Xw4X4iN4MAV23HHqvVfgxjpJmA3TuNrni24lVOUxIyhzlqORBMBtOrMJ2PwZ8ld46oEnsx3W15e0umX0XIPgIe64GiJYB37YeFvYwJZBtFPqoqSOmUHynWjt8gXA/U7BpGR8mtE8MUs9kLF7e/OS+/K8R5HFOFYHBh2Cgpdf79NUL2/NKGjoW+Fw7NfwccN/kLGt/a2BUsJ7cnttpMLaEotqNlyCW0mO4LHJ2cNxA6tGd+e/PWETIdC1FcCQZAYVDa/FXgnkR+YUd/bw031726o1hbRojM0uPagfOgSGJ7yV1hbhLlrK/QQI2HUFPrMosVEUlL+24cnRZ/TYijv9T6i4ejYLtfyjSgVjsE/TK0lEPqEbLtq9HRxEouZO7T+VOfq5FTcqVB29RJM/0e/Fne1zBLLklDrdkB1DHeWK2xPjsSh5mGQjzhQLRR/DEIgQmCLcQXnm08XCkWCJpd4qnwjIiqlyfHOBuHUIpymSU8BwF9vEhMEyJn+XrSxwEpPgF5NPudv/lBWsqrMd88iOw+fsgbi5dBEQddK+zJbau0cX76LdrlbbFyh99314a+UouYz2NhchrY55FpRyFTxBSt+bDiKz8gqMsFGUp/yJkv2RgKo37AVRRzpHPiJxSGIcprL3r7bJpnuzeYK3Vz1WUZDglpjiWHjeMSrG6GeW+rX6c6Jc+3evFn6k/sMMM5IPyfzIvD7d891Zjb3mYffZtlXQ5hK7f iwpwnQeZ elIQs8xEZkzzY7GC42oS3RI3DUgbx9XUBN0UR+hm/DQaPlAiX/smDdMtxmoPYXIq38Ajcvz+MqC8oI5BefxXovC9EYZjGzvzZcM7OJeGT6MRTUrkkbXahPC4Tyjds6oORgIi6HUsx7Jar2A3nAzGMVt14LKXhhzxZb1sJYo2SrseNDkPHKGO7ZxcMVyNori77rej7No3aYNkoN2uMXjL7RQI0Ccru/IL2ftDNdTAUsOA6cTJSVgpQzVm6BFKgKqtzK6cNwKu5e9QSSIQtbtPy8JdKBP1a4iH/CKXLkZgDdGyxhPjdEiBe8nCPc5+9cBq1VlKSzVSS+wrYv0KlvP7fzjtE3sH1MGUcqyjQQhDFZd5v635TW68Wovl8vw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
kcov: Introduce New Unique PC|EDGE|CMP Modes
|
expand
|
diff --git a/kernel/kcov.c b/kernel/kcov.c index 5a0ead92729294d99db80bb4e0f5b04c8b025dba..c04bbec9ac3186a5145240de8ac609ad8a7ca733 100644 --- a/kernel/kcov.c +++ b/kernel/kcov.c @@ -716,6 +716,8 @@ static int kcov_close(struct inode *inode, struct file *filep) static int kcov_get_mode(unsigned long arg) { + int mode = 0; + if (arg == KCOV_TRACE_PC) return KCOV_MODE_TRACE_PC; else if (arg == KCOV_TRACE_CMP) @@ -724,12 +726,14 @@ static int kcov_get_mode(unsigned long arg) #else return -ENOTSUPP; #endif - else if (arg == KCOV_TRACE_UNIQ_PC) - return KCOV_MODE_TRACE_UNIQ_PC; - else if (arg == KCOV_TRACE_UNIQ_EDGE) - return KCOV_MODE_TRACE_UNIQ_EDGE; - else + if (arg & KCOV_TRACE_UNIQ_PC) + mode |= KCOV_MODE_TRACE_UNIQ_PC; + if (arg & KCOV_TRACE_UNIQ_EDGE) + mode |= KCOV_MODE_TRACE_UNIQ_EDGE; + if (!mode) return -EINVAL; + + return mode; } /*
KCOV_TRACE_UNIQ_PC and KCOV_TRACE_UNIQ_EDGE modes can be used separately, and now they can be used together to simulate current KCOV_TRACE_PC mode without sequence info. Signed-off-by: Jiao, Joey <quic_jiangenj@quicinc.com> --- kernel/kcov.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)