Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp458921lqs; Thu, 13 Jun 2024 15:51:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXs4rY7iFq/6Rd7W3neGl+tL+QHfFDFIAeQ/HTP/5lmkzo6nQpM9WdqH+93vEsZEUUE8UXdX/OjCSEg2aPlkviFivi9eFUFCvjQtrzOsg== X-Google-Smtp-Source: AGHT+IGef3fypCaQ31arhNLKzeBJiXeXoE8rcIwO2CfPJCI4D97rZ7x6VQ0WLLxOI5vMAx1Z2SaM X-Received: by 2002:a50:931b:0:b0:57c:605c:e23f with SMTP id 4fb4d7f45d1cf-57cbd69e6c7mr717950a12.33.1718319102545; Thu, 13 Jun 2024 15:51:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718319102; cv=pass; d=google.com; s=arc-20160816; b=rABaDD9ILW9b2nwi08LksrrGaLRobXMotwTJd9Q1nYcJ9wrPGzoyoNBd0b2jnhV1BF 4w79rbsLEPPxjt9NWPai+bR0s4zWkz5CKGxQ9Gw+G7P6ReM/G9A4kcLAEP1P8svc8sDH qsRn7zmkEZVr5tX2/bWnmVpQ0Zjrjg1f3JXh6NtLTCc0E3DMB9a8RlWXJ2qb5l1tkik4 pSSLE+j8NDCfOdCpCWbL+XftY6o5Ol5K0IMs93VNFP7HX115rhW0YhlNtxvN4snyw91k +9o26zYm7nuJ/PGAkm1AWcbt0I/LeTiI1uMoh0vI4przy+RKDtaKlCh5Gykndpnadq48 /XgA== 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=HorDNxGasx7enGcHReiWx5w77pQt/y17BoL+anTgpOo=; fh=Gl+Lh7l7eBc8abXJ021tIt/6A7Hzm19PasZWXlQC1rg=; b=hNX38rIqLEZNTG1gu9xEmwc73daHuXo37ovdypI5pVgxnjj4VwRh7flq+bGh8KVD9b nNG+vHQbWVhRMO5x2W51gnlAQKaOTym/H5r5AZiKv7e/6Y1Ntxqpo8Mu1tEw8D9eJ4nD EFTEO+Zbgs7/6pbSZHVtf7dbyveqJqb4cZIdn2HJn2lOv2bD7eVhWR3M7DWdvMQv7Zky gRBRRUFDTlQOD3QEHqhaY7S4hRkuRXleeChAQYFLyjoiIdPfZoreZmxKjkYsTfWBHYtQ m62dFSoGJCOX8CMc6rsEauS2hDke5wrP4XJarT9whPMvklyca5SNdGeNu2Fm8ovvuYqF qhcw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Bw2lHbS4; 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-214074-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214074-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 4fb4d7f45d1cf-57cb72e239fsi1115401a12.149.2024.06.13.15.51.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 15:51:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214074-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=Bw2lHbS4; 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-214074-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214074-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 46C1B1F238F6 for ; Thu, 13 Jun 2024 22:51:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC23B14D294; Thu, 13 Jun 2024 22:51:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Bw2lHbS4" Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 92E4A137923 for ; Thu, 13 Jun 2024 22:51:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718319095; cv=none; b=pcQh/hU6a4vArUjIne7lv6KGsBOU2sCsmTXeae+9JiohxIEpnicokkKGV+059QH6SV34VmcH17SaE+//ZfcqPBMvatGpTf7es2R1viNuopsYd2pkS4vLlae9PX8th+iCAXeLhXKRe8XXg8grItzOi9MgOgcS9SiSekvfzueIUe4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718319095; c=relaxed/simple; bh=cM7R9IPExKeeYUKwbsYPLbKU9uudKno2amAnYVfn58U=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=TsE0J4wTiwk1YkLDzGqeP7BQ2c6FB9ThqCqvsGgdWvfRlwAJ09tNN3prWwvS3Koqwqt8HXeUw+uZ5Czxw9R9vnBhRy1vjWRF3yeLomZ6PWXdz/mAKHQ+AcXflBPV/vt14jrGQLzpCYnImb7QM2njn765/q5Zih20upmpqlxyJHQ= 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=Bw2lHbS4; arc=none smtp.client-ip=209.85.221.42 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-wr1-f42.google.com with SMTP id ffacd0b85a97d-35f275c7286so1475245f8f.2 for ; Thu, 13 Jun 2024 15:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718319090; x=1718923890; 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=HorDNxGasx7enGcHReiWx5w77pQt/y17BoL+anTgpOo=; b=Bw2lHbS4GWEAko2VqzHdn+qybDja1xM/fqPeAiJswSrka/TJPPHPCuNnL/y88H7aum kSqSrTM/FGSo3K11lGaCS3tfOUuG62Ul0myvk+VOJiXFzowKIBPgADiZ7UioYp2UmwSb /H7uMv6FmfCKFxssF0pso+f1h9A9Z3nHrxooWWSHpvSicIh/2dQ9ziG7RAq2d053DzF2 Qoa9z7uXY2SDHhpdLRnfqy7TDPlMA6reGytODDmIh+KkRvMJvhfyOTxnjTleIfJpdz2j WtIXsTEtPW23j3DPhCp9CeCG7iSo0kgZWL/TPpcB+GqbxIeZ6A3hPfFGTwATL1ehmK1y Zg9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718319090; x=1718923890; 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=HorDNxGasx7enGcHReiWx5w77pQt/y17BoL+anTgpOo=; b=g1U8jdBpegxceVvsLMICampQ2curnndM/bvI1bwL5LTJQ3xNDzVXsRfSmDVNqD9awt /ERdWqvyMIS3np7qgI1UsqCvFzRDllzMBIhXV88wt7CRlIn9cEQPPGa8JuT5L6C86IbK +msbvtgoagtwOC5KpUMXVwMKCTAqeThkxJsO232eSxVgcJ8LScfICIEHfHty13ySR0l5 5iRsq3D8tOumcFX47iLWh/ayV5DJnJSCXT+nvkeSg5mHRkk2itudL49jjV8TsLzabMoo eiNUKBK2dXIDl5ldE/zMkYAWcJLsp9rWXkLScy2ahVmxvdvMCI7gqRfc2xfcZPbCpR2P utzw== X-Forwarded-Encrypted: i=1; AJvYcCXx/qc1+Czm78JFDClVHkJeJzAhq3JdfOCL/2rFWaiEr4sOd89VpPwD7bvAl1Y3rmyEoUuqwyOxJZUTMgWfH6PpHX1Xt96W4gz+Lb7z X-Gm-Message-State: AOJu0Yxs9TTeDpfKKbRgXiiAXszBCzMaAtiuxSYRlFYNo3tSrz2G+7t9 hKqP8cpNZx4uvhef96eGIail6uQ16iHpTt/9nXBroTkKAm23lV8Rkx5qYFNF3B4W7y8yMe9HiMG ToGRMefKAVMOtn6YcgqvuJYNCb0M= X-Received: by 2002:a05:6000:10c2:b0:360:82ae:19a6 with SMTP id ffacd0b85a97d-36082ae1ab0mr63554f8f.7.1718319089753; Thu, 13 Jun 2024 15:51:29 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Andrey Konovalov Date: Fri, 14 Jun 2024 00:51:18 +0200 Message-ID: Subject: Re: [PATCH v2 4/4] x86: Ignore stack unwinding in KCOV To: Dmitry Vyukov Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, syzkaller@googlegroups.com, elver@google.com, glider@google.com, nogikh@google.com, tarasmadan@google.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jun 11, 2024 at 9:50=E2=80=AFAM 'Dmitry Vyukov' via syzkaller wrote: > > Stack unwinding produces large amounts of uninteresting coverage. > It's called from KASAN kmalloc/kfree hooks, fault injection, etc. > It's not particularly useful and is not a function of system call args. > Ignore that code. > > Signed-off-by: Dmitry Vyukov > Reviewed-by: Alexander Potapenko > Reviewed-by: Marco Elver > Cc: x86@kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: syzkaller@googlegroups.com > --- > arch/x86/kernel/Makefile | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile > index 20a0dd51700a..cd49ebfae984 100644 > --- a/arch/x86/kernel/Makefile > +++ b/arch/x86/kernel/Makefile > @@ -39,6 +39,14 @@ KMSAN_SANITIZE_sev.o := =3D n > # first second. > KCOV_INSTRUMENT_head$(BITS).o :=3D n > KCOV_INSTRUMENT_sev.o :=3D n > +# These are called from save_stack_trace() on debug paths, > +# and produce large amounts of uninteresting coverage. > +KCOV_INSTRUMENT_stacktrace.o :=3D n > +KCOV_INSTRUMENT_dumpstack.o :=3D n > +KCOV_INSTRUMENT_dumpstack_$(BITS).o :=3D n > +KCOV_INSTRUMENT_unwind_orc.o :=3D n > +KCOV_INSTRUMENT_unwind_frame.o :=3D n > +KCOV_INSTRUMENT_unwind_guess.o :=3D n > > CFLAGS_irq.o :=3D -I $(src)/../include/asm/trace > > -- Reviewed-by: Andrey Konovalov