Message ID | 20221103200359.328736-24-mathieu.desnoyers@efficios.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp753689wru; Thu, 3 Nov 2022 13:30:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5/eBDgiPH6JDLlBGfS06EAGF+beUGxMK8EqhLoiTWAcc87kjVlEoxXY/I4iqo2PDaPc6HG X-Received: by 2002:aa7:9e85:0:b0:56c:683b:d31f with SMTP id p5-20020aa79e85000000b0056c683bd31fmr32243040pfq.48.1667507443752; Thu, 03 Nov 2022 13:30:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667507443; cv=none; d=google.com; s=arc-20160816; b=R7BZBhFnsDSyRtCuVYZ+G0dEHVnI76H7CeX5Kn3/M+GCEA/tewGRdoBYe3yZuO5HXI j+QWmoHgy3tBo37yLQzobFdGB+BzRl4PMKd30O6OmfKNC0PWwPzlqOfr5zv9elXhvhDa muJQ88rGJADRJ1RLaltR7iTfWRhGk38NHwRLcMuaTX4wZQjmeJPlkUGkOhvfp1H3N7Kl ENhj3ymez8gGnzZ17mpO6w8pDMLhLXm6K6VubW4j1/428qRPjYulxaXrz56I8gIVA6IH eF6tcpyvh4D/wgdCiVRclZzl9xbgf+HsfWLI5E4mxZuaOTt45iT2IoZY+CqDz8P6gfl5 CO+w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dkT8RPBe8dG6o12giDl5DqFYR4Opn//NSLkzS6Qvrcs=; b=Wj9KTs3z4gcpz6PqJd79gcDEH0Jao7wj0nfX4xuCNYE/uTCqSAEoQzqqLLkmRyWg16 70vRniyFP1gm8k+vFeQs7GiPF3l9DwQmLinT2pHuqGegnUOlRYpZDy9NYcNcdFbOhQWc HlnNmj6TTAdY9jjJIg6I/P4qQExxv/tH0VIyJGcCkYXrX7nazm9BkMnKbrDqAUelpE5B S6VBh+uI6ItIigwLxbr3lxg5NtdrgdJUHIW4X4H3RaViUSwcuxX5x+M4sqcfDZ14/qii b/7tP75FjXXu0+pSsUp+q6XazyKiVHew1pX4GPYdSHfrCCe7gtPylNAp69yb2Y3Ra4+4 MKpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=gUfZiiUu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s142-20020a632c94000000b0046afed15623si1915608pgs.372.2022.11.03.13.30.25; Thu, 03 Nov 2022 13:30:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=gUfZiiUu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231789AbiKCUGq (ORCPT <rfc822;yves.mi.zy@gmail.com> + 99 others); Thu, 3 Nov 2022 16:06:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231404AbiKCUFQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 3 Nov 2022 16:05:16 -0400 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53188205F2; Thu, 3 Nov 2022 13:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1667505904; bh=ghI6w5m/fBuPawbc/R5A+f4FNxklkEyjIEUh4Xg9S2w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gUfZiiUuutcK6KdatvmWhn8NGtZU2VkDD1lmteu03H71N+hiQ14a19T1sM2+NRdQl vsxPW2pf5z+7LfNYbI+42XEl58Sokm0z8oeAq+CEAqx41xeCYSBPVwRM8mL6bi3Xxn kNBiSe+Dd2A0fOl+mKepMVMjhE2alx5vYAHAXsY19WCTf1qAtBkVeKAmg0yY1szCth OiS091Bbw+YlZR02oFvKNRf9IgU0qmIbETFXs+DTyTjWRStLTqKz6cA2TiHzec+awQ tj9knfGeYfmgjNB5qxMCDvEyyyZ6A8DY1y4LkoONY+wKi3bi7609pHurYtwl8USGpY SwETJy9PhRz3g== Received: from localhost.localdomain (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4N3F9D0p0Tzg0D; Thu, 3 Nov 2022 16:05:04 -0400 (EDT) From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> To: Peter Zijlstra <peterz@infradead.org> Cc: linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>, "Paul E . McKenney" <paulmck@kernel.org>, Boqun Feng <boqun.feng@gmail.com>, "H . Peter Anvin" <hpa@zytor.com>, Paul Turner <pjt@google.com>, linux-api@vger.kernel.org, Christian Brauner <brauner@kernel.org>, Florian Weimer <fw@deneb.enyo.de>, David.Laight@ACULAB.COM, carlos@redhat.com, Peter Oskolkov <posk@posk.io>, Alexander Mikhalitsyn <alexander@mihalicyn.com>, Chris Kennelly <ckennelly@google.com>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Subject: [PATCH v5 23/24] selftests/rseq: parametrized test: Report/abort on negative cpu id Date: Thu, 3 Nov 2022 16:03:58 -0400 Message-Id: <20221103200359.328736-24-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221103200359.328736-1-mathieu.desnoyers@efficios.com> References: <20221103200359.328736-1-mathieu.desnoyers@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748508285606649896?= X-GMAIL-MSGID: =?utf-8?q?1748508285606649896?= |
Series |
RSEQ node id and virtual cpu id extensions
|
|
Commit Message
Mathieu Desnoyers
Nov. 3, 2022, 8:03 p.m. UTC
Report and abort when a negative cpu id value is observed by the
spinlock test.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
tools/testing/selftests/rseq/param_test.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/testing/selftests/rseq/param_test.c b/tools/testing/selftests/rseq/param_test.c index f3687a90ec0c..1c86b45bd579 100644 --- a/tools/testing/selftests/rseq/param_test.c +++ b/tools/testing/selftests/rseq/param_test.c @@ -410,6 +410,11 @@ static int rseq_this_cpu_lock(struct percpu_lock *lock) int ret; cpu = get_current_cpu_id(); + if (cpu < 0) { + fprintf(stderr, "pid: %d: tid: %d, cpu: %d: Observing vcpu id %d\n", + getpid(), (int) rseq_gettid(), rseq_current_cpu_raw(), cpu); + abort(); + } ret = rseq_cmpeqv_storev(RSEQ_MO_RELAXED, RSEQ_PERCPU, &lock->c[cpu].v, 0, 1, cpu);