[tip:,sched/core] selftests/rseq: parametrized test: Report/abort on negative concurrency ID
Message ID | 167214322927.4906.10221180100625310863.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1361115wrt; Tue, 27 Dec 2022 04:16:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXtixJc3TAuOL7ZQIsVoaA4WekTiIy0MfpOY9OPFK4wx13p3NrTrMa9p6jq9G3l8GRcr1L4e X-Received: by 2002:a17:902:ccd0:b0:189:6ab3:9e57 with SMTP id z16-20020a170902ccd000b001896ab39e57mr24633878ple.22.1672143387139; Tue, 27 Dec 2022 04:16:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672143387; cv=none; d=google.com; s=arc-20160816; b=RbCxtr/bqj+U6TsAVRnERozcWfoWmX512ZB7rhaRk/WSPbk8zqDqw4j2BbJnUfsvmk a/jEm1hIaTYGQZQOrunbeNNHinOn8RCO8LgeQnAE0qtQ9ptPCDU8sPoxANSiLeT7yzSg kZQWGMTSTjQk1Vvid2JnulRGwV0BUhM1JsITq3j02S+l/pgYHdlSSL77zTjpctiOC9zE +NQCyTj2bO3LzOcez4C8CtD1VYfftY/neTcSbYWuMQ94XVlNS82qiDBUhzi8+JGU/IvD vWm4WZAwudI6XkIr9g4JvrWygOalFB8WwDvTIpTq2E3t3SFlka9PB8zHNoyaMIIM5GhK BxPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=c2LwpMAxz7fIjAUYU/1ZDDqNt6zkBjyLjIDrEjC1mBo=; b=q+2Mu7X/2pTPELidMhJNQ2cKZyZIqPJQWnJTErF1c1qYzWeYdfXQ/IzFmtCfxqsHDa AemzfMcieHtBfvX8ECOjJQ3eSaBbM5vbDN5k7jIEPjj+mmnVdLD4/v/wUUxqlRxPwTOK hF6yCrne4siFRIbyxz4TYBbqYV3TLVg1/5/ebLyaDlr6MWgFDjhVBeiNDngIhZZ2LEHn MdjC5H5yHOh0LTLlgYQEJRonCUYQpQR0jzMmUyYIRb2IOYDQLnfwwoT3zoPlt7yr4Mb2 WXAexBcv7TtE5DRbDjMNgf0D+u4AbFXy2AWtKEIjmpXqxpOmOAAZZ5J+OYYJK0IRITtX tJAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UGRVrp7M; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o14-20020a170902d4ce00b001889ad48288si14508229plg.384.2022.12.27.04.16.15; Tue, 27 Dec 2022 04:16:27 -0800 (PST) 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=@linutronix.de header.s=2020 header.b=UGRVrp7M; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232088AbiL0MPa (ORCPT <rfc822;eddaouddi.ayoub@gmail.com> + 99 others); Tue, 27 Dec 2022 07:15:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231493AbiL0MOj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 27 Dec 2022 07:14:39 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D57FDDF; Tue, 27 Dec 2022 04:13:52 -0800 (PST) Date: Tue, 27 Dec 2022 12:13:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1672143229; h=from:from:sender:sender:reply-to: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; bh=c2LwpMAxz7fIjAUYU/1ZDDqNt6zkBjyLjIDrEjC1mBo=; b=UGRVrp7M8EbopmqnwNVd2k0x0chl5PTKVLQrgMEVo6mCWsSjE5NB2OIjwW3dVJJUtj5L5W 2qX4BRBvJfBaeGKC2h8BLahsKzR+AkyZ0kWgeuEyB/JNLkQ5uc0xc1HHD3pFoXF9RNvaUu BoUAL3MODC7L+JkkAbUkEp9WiL84f9mtTahMPas4D1hW5gZCZiAcaJVUkuQHxAUWNQ3RmE ene+bqjyyvUXMgSE6cYJPHCKaJxP3uUmvE5SClTOyO5m6w0H6HeMioAQr2ZK5w0WYwoDjg Tk22eSjFfLlPBuy4A+LhgP4zrLswxs+etxsTPUmaPYYHXkTXziDq/I5M0KJjMQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1672143229; h=from:from:sender:sender:reply-to: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; bh=c2LwpMAxz7fIjAUYU/1ZDDqNt6zkBjyLjIDrEjC1mBo=; b=kUi8Zlb3Ljk5W63MvIZguAhaQjmPOfVprNtnbN6xgPIrf+KuOaxrSrvh1mef2Qt6Ri4Yj9 xDZ9KzP9EyWDBVBA== From: "tip-bot2 for Mathieu Desnoyers" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] selftests/rseq: parametrized test: Report/abort on negative concurrency ID Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, "Peter Zijlstra (Intel)" <peterz@infradead.org>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221122203932.231377-21-mathieu.desnoyers@efficios.com> References: <20221122203932.231377-21-mathieu.desnoyers@efficios.com> MIME-Version: 1.0 Message-ID: <167214322927.4906.10221180100625310863.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1750230394561183521?= X-GMAIL-MSGID: =?utf-8?q?1753369423884588970?= |
Series |
[tip:,sched/core] selftests/rseq: parametrized test: Report/abort on negative concurrency ID
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Dec. 27, 2022, 12:13 p.m. UTC
The following commit has been merged into the sched/core branch of tip: Commit-ID: a3798e6ffb37481c47773dd1d785c395c0785af8 Gitweb: https://git.kernel.org/tip/a3798e6ffb37481c47773dd1d785c395c0785af8 Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> AuthorDate: Tue, 22 Nov 2022 15:39:22 -05:00 Committer: Peter Zijlstra <peterz@infradead.org> CommitterDate: Tue, 27 Dec 2022 12:52:15 +01:00 selftests/rseq: parametrized test: Report/abort on negative concurrency ID Report and abort when a negative concurrency ID value is observed by the spinlock test. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20221122203932.231377-21-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 cadb9d8..bf951a4 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: cid: %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);