Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3781668pxb; Mon, 30 Aug 2021 10:28:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7jgwblXpZlGU8WFmOA7szRh0OqZjJuD6SSVqIhr9fOAuRutWPIIstG/AnANyQZY7l0ext X-Received: by 2002:a05:6402:b65:: with SMTP id cb5mr9610810edb.343.1630344500904; Mon, 30 Aug 2021 10:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630344500; cv=none; d=google.com; s=arc-20160816; b=zhS6Z4Oel/CL4ghfoqeRlf/oBFblz1/4B6JAqYtCwrxAFRFoLQAXvX2JerAm15Imk/ ttJ5OqAMMrUn+Tq5PbQKp4LBLt4x8+KsQ+dpbxiMXx3UNtzFVk9zeNfyQFgLuUkZNyA/ 068rZhuQZNjSW5ac9dQRC1LUFA0HzuAfrVTZXZh1vcQdEzi41EA8uqC2HAzope+M0BCg IzIbtoPHULibwY1+QAX5Rc6UdbUUaous4eJvOjJ+slwn4ie3go+JioUwAWXMW6AFy+9q 9RydZqAdOQ8N1JZrUDft9Ia0a5Hv9giSz+eCLPg6i819V9GZyLC50R/0zzwSXTq0eYX6 44Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:dkim-signature:dkim-signature:from; bh=/TlNdEaYuWrznUySCkzWevBs6NrmuDYVGSJKO0VUco0=; b=Iuy6yIo3uFT5bbpPxbvzfV57pjpRggAWMECOICMjmYJrTao5b7Vphn59W9mZ4VpatB XymKzMayrwiRIk47xAiIEUdMHs+py/LQBnMRDhbyZXvtywU9D2XKXhXUTnZammMJGP8s arkhUbPkk5PDEnQZScmW310vEkt875D906WtlrB7CvekowL2UrtfAncfvLoTPyjhCn1l hFLetCgE3D98H9d1/vfDvC6PpkAau6icdMe+1Tq3zzweOcflj3/87x0fzrkKlhQEfzus l4dG93agH0rR5jZe9BbTwlngc/7deEownTQnkLRUqP9ssqO8j8JmzEFim9vjkk5h+f3z /Tww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fqscOD+W; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=PO7kQ71Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 21si8257667eji.148.2021.08.30.10.27.57; Mon, 30 Aug 2021 10:28:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fqscOD+W; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=PO7kQ71Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238000AbhH3R1c (ORCPT + 99 others); Mon, 30 Aug 2021 13:27:32 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:53416 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbhH3R1b (ORCPT ); Mon, 30 Aug 2021 13:27:31 -0400 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1630344396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/TlNdEaYuWrznUySCkzWevBs6NrmuDYVGSJKO0VUco0=; b=fqscOD+WHbR7GCHhSec60PogqfANKTcXImMKUqJiVF/6F3wYTxVdN7ir3S3CQUdjfvWyIe Ep5WRUlBcj3t8T2kjfdo0OveFom8LlsDQEsWm5wc0RwYfOoDIOJ3owQ0pIgKS+vpwfq6C4 OpIDqoMlUuZczIxWTjTxFWSL9QP84qEXjQ6GPLkyhe+riADERrl3cBfH0dlsOSHU6dkBty J50mfhQoGYwEzfsNFtLtZbVlXBuwpluU7gKD/dpkmHMiV3a+XeFuSQqU0oFvtWeqXYiXXs U1FvBwdbqWUepVpR/RzTdlqzO9Nx6zJt53wJPeyFUxbS4Un5eWL2/9V9vntiwA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1630344396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/TlNdEaYuWrznUySCkzWevBs6NrmuDYVGSJKO0VUco0=; b=PO7kQ71ZVRFEBEkDPHS2xA+0eDDYxkV1bzTzoCFR1x1WeOa0BojQ885vsreNh4xcoG7Ymq 0gzuUuSmAaQawTCg== To: kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org Cc: Dmitry Vyukov , Andrey Konovalov , Thomas Gleixner , Steven Rostedt , Marco Elver , Clark Williams Subject: [PATCH 0/5] kcov: PREEMPT_RT fixup + misc Date: Mon, 30 Aug 2021 19:26:22 +0200 Message-Id: <20210830172627.267989-1-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The last patch in series is follow-up to address the PREEMPT_RT issue within in kcov reported by Clark [0]. Patches 1-3 are smaller things that I noticed while staring at it. Patch 4 is small change which makes replacement in #5 simpler / more obvious. I tested this with the three examples in the documentation folder and I didn't notice higher latency with kcov enabled. Debug or not, I don't see a reason to make the lock a raw_spin_lock_t annd it would complicate memory allocation as mentioned in #5. One thing I noticed and have no idea if this is right or not: The code seems to mix long and uint64_t for the reported instruction pointer / position in the buffer. For instance __sanitizer_cov_trace_pc() refers to a 64bit pointer (in the comment) while the area pointer itself is (long *). The problematic part is that a 32bit application on a 64bit pointer will expect a four byte pointer while kernel uses an eight byte pointer. [0] https://lkml.kernel.org/r/20210809155909.333073de@theseus.lan Sebastian