Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp187182lqp; Tue, 11 Jun 2024 00:58:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUm/5zdp03ONC9PxK1JFsX0J3+I48JPBJ4Gd2r+IeUbHUrgqT6q0Pb5R0EsvvXRPKLcYutPspI5GdE9RdBbVwVxnbQDWmkZlCIjOVjd7w== X-Google-Smtp-Source: AGHT+IELpuPBlv3kbrCdJJBScumZ8pkIPQymA8VqCVIvb9rzHiTA05JoeqyvhRYcSWsOPOxw7AIn X-Received: by 2002:a05:6402:510b:b0:57c:9471:d108 with SMTP id 4fb4d7f45d1cf-57c9471d20dmr765309a12.0.1718092702074; Tue, 11 Jun 2024 00:58:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718092702; cv=pass; d=google.com; s=arc-20160816; b=PKwFh0OjBPCeLWUs9ZSsrJtr51WaUf2HNx29dYhe5N74ICffhJsnoaF1xyLryXtaCS Z1qmReq6eyT5HbDsc4GwJRQNpRDc88b6OLp5vJZC4fkmLcriCIqk9M2Or6ShQYksDBna 1J5rJUuqwuey+Z8D6DCj9sECceuAoctvqNGMh1+wBUpagvZ0C/qGGB/yUyu2kV344Sb2 1RjFflr9UDcaVc7F2V2skbu5U3QNIhN5lYXjxJPR0ASejNqa9jqdMk3p5FxSMRyo3nZj lxI0PwBe6l/7jnxaYFeqGTCdcuievXWwY2iTZpbdIXlO5h2ykg0dXJ/UmT3/Advjq6Ok TfYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=KJ1zyFICdy5qqRC7FAeNtn1bVJ8F8bJSOBOHZzBToA4=; fh=Eq8lo/UxbLMtk9YPTujoXRMBxIr6oAnawmlbqnf3lHM=; b=JFm0I3Dc1vHN+/bmctI8G5ayeCSPOe+crLyKrJ6O4YrP5HDU/h2WF/IOOTBEhf1xEX EPK3IvrK/y/ay1Wj7z34T00k+a+Qtr83T1skIH3WGqBA96cQmHhnUoGOCp4eFERRJv04 aaFIQ3YycypTrne7GMz/mHuX4j9xRAWsl1jIo7RdTGLF9rHFd5VF1TW3AcmMX3sOSx0k GL4/wRudR8CQThwfa96l5iisdf7q2DcN5cksW2O9cnQaN7VwhafvcBORol+4dAEGS8Vb j+PWEl3MG6rx5EefJk4JkSIFfwlDVX9hIX5Xj5D/5QrefgD3Jqd8exmG81O/oVtOKGP5 v0ww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=gjLfzdl5; arc=pass (i=1 spf=pass spfdomain=flex--dvyukov.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-209421-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209421-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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-57c60ec8029si3945722a12.229.2024.06.11.00.58.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 00:58:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209421-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=@google.com header.s=20230601 header.b=gjLfzdl5; arc=pass (i=1 spf=pass spfdomain=flex--dvyukov.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-209421-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209421-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 am.mirrors.kernel.org (Postfix) with ESMTPS id BE35E1F2A30A for ; Tue, 11 Jun 2024 07:51:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B98917554E; Tue, 11 Jun 2024 07:50:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="gjLfzdl5" Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) (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 C4F71175543 for ; Tue, 11 Jun 2024 07:50:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718092258; cv=none; b=mdXtCKQMcwQTscGaEKk5skiovFzMN84nQdKGmaVJi996HyW8mIGHXnnXiJhxKNw/itoRPGcevMhnF77ngXpDUsss1tj+5PZHRYhOrQBpnGKMze68LtBjGNHNydp0qxvmrf+xUyfd8Ee9yw6aBetumSUoqfdSDuhfM4J8tszj6Vs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718092258; c=relaxed/simple; bh=XA6TxpJwG4PvZtHmcUtWg9j+X9JctRACICEBTlJHGpw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=EfXDSCzPnVhnn8usWJAUL1TZ+yjefMtHHhk3XaAEOW4HGioFkaozSZfsT2RrtNuamGbDHpSOZIM0EbJlegHbv5o26L12z7lU5zMB6srtHkRPGamh1NKAOpoc2P+qbSGoOIA72XXrxSYCqYjVQLemz70Y4+4wS3sWGI7smz0fOro= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--dvyukov.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=gjLfzdl5; arc=none smtp.client-ip=209.85.208.73 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=flex--dvyukov.bounces.google.com Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-57c80b0d1c7so387159a12.0 for ; Tue, 11 Jun 2024 00:50:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718092255; x=1718697055; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=KJ1zyFICdy5qqRC7FAeNtn1bVJ8F8bJSOBOHZzBToA4=; b=gjLfzdl5+LUCC1ZZB4Ha7DmD6fx52l5i4e+f5EcxjOq9IjipOCL0ApKUck1y4w7CjO /JAnnC+aWQoeRGxMOdDkJw8GINO09S+z9YBz58fqZW0B1jetQ3dgbDY83VwrijuhNsXC hFESLe2o587cEGg+eomXArmB68kR7o4gBOzcVB8FiF178oNrfurrDv1px1xSmACN+qte tN4Vq6Jvu2ZNYjn3Sqa1GNGYKE12mPTmwbBhTqBdo/7uWnVsxSD4p/osWn6QFBY8fpGm lcrQXj/2hGQWVeLELwXdJ2Osc3OYQccyTOZQ1nGQnuBzFrPFdMk3f5uZ1+W2/UtDw72U Tp8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718092255; x=1718697055; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KJ1zyFICdy5qqRC7FAeNtn1bVJ8F8bJSOBOHZzBToA4=; b=nRkSDh/32sJss4Z03YkE6SJ7wvfVDmhpRE8WJZKzFc7sQHtCgdVSur/FELcftAl4ke ADV+rqvN+aXQltTmyx3LDcjUCYQr+eolVG5Tery9tmi4kp6vW4C1fbyKeRoqTGqCsgnc VbG1TmLynhpHPdk/v5nO9z6YMMHXEnq9TSQh0BV/cEL2lemGfskbCvnJm7iw8mjSi99Q 5+1bjmer8ail3WLO3FbTu3h0nxrY1VgsnBEDIhuiwl/MYZEIdzlj0nbUXqKfB9sAI/iy +qHOe4Hus0JMDXoRUO3aL6hsyuwO9sl9UL0hWbK9M/xAvqk8N7YwW0UfQpEPlD5bWGCC k2Rw== X-Gm-Message-State: AOJu0Yw7FIVodoxybMAykdVePROFh/H1sTCfjkmjr6gxVrQfgP78/Oys /xr3coKaw2auIndRGQQC/kpSnG8KCRmXrZhAa+OHodnoC38LlHS15DjBC3EKuLMrTBrBmq1WO4x ddJK5IA== X-Received: from dvyukov-desk.muc.corp.google.com ([2a00:79e0:9c:201:ecf:76a8:5d44:6e8b]) (user=dvyukov job=sendgmr) by 2002:a05:6402:5418:b0:57c:7f32:312c with SMTP id 4fb4d7f45d1cf-57c7f32333bmr7090a12.2.1718092255002; Tue, 11 Jun 2024 00:50:55 -0700 (PDT) Date: Tue, 11 Jun 2024 09:50:33 +0200 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.45.2.505.gda0bf45e8d-goog Message-ID: Subject: [PATCH v2 4/4] x86: Ignore stack unwinding in KCOV From: Dmitry Vyukov To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org Cc: linux-kernel@vger.kernel.org, syzkaller@googlegroups.com, elver@google.com, glider@google.com, nogikh@google.com, tarasmadan@google.com, Dmitry Vyukov Content-Type: text/plain; charset="UTF-8" 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 := n # first second. KCOV_INSTRUMENT_head$(BITS).o := n KCOV_INSTRUMENT_sev.o := n +# These are called from save_stack_trace() on debug paths, +# and produce large amounts of uninteresting coverage. +KCOV_INSTRUMENT_stacktrace.o := n +KCOV_INSTRUMENT_dumpstack.o := n +KCOV_INSTRUMENT_dumpstack_$(BITS).o := n +KCOV_INSTRUMENT_unwind_orc.o := n +KCOV_INSTRUMENT_unwind_frame.o := n +KCOV_INSTRUMENT_unwind_guess.o := n CFLAGS_irq.o := -I $(src)/../include/asm/trace -- 2.45.2.505.gda0bf45e8d-goog