From patchwork Fri Nov 3 16:41:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Beichler X-Patchwork-Id: 1858995 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=noaKt+ic; dkim=fail reason="signature verification failed" header.d=uni-rostock.de header.i=@uni-rostock.de header.a=ed25519-sha256 header.s=itmze header.b=J4805Dx/; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=uni-rostock.de header.i=@uni-rostock.de header.a=rsa-sha256 header.s=itmz header.b=psCf5uOo; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SMRP1450qz1yR0 for ; Sat, 4 Nov 2023 03:42:28 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References:Message-ID :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9Gp7GpCdjhT7yJ32totTLE8q/enhiUqRyPoolax2FmA=; b=noaKt+icL1akus SdAbn+n+XV4GfeJvi3PnCSVXQH/FDYndynlWxLd7iSghBovhcgfXOQWnVKVKgfdLlKULxSCzsz3ao CIVLIABcSGu3B0MouXe6bdMe0SpQymfxFzGCPTjMhBN7nVAGBcqQH+TsNV/B68ATqLsMCca14pUwX 7plVDRd/Mq+vtCmaOa6TxmFhxYio8TjseSuyHj03aZ6TzYVOS2L/AoeevDL5hzorLmP8LVHhWyjlS 7wmrTEbVe9EfUkMq3c/UwK281QbE8oZlpm3Xe++nPIxHwgpSTTtEsgpHQn4OsluA6TPqcclWzAPl2 RswRlbVeKmjoc8WVrD9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qyxFV-00Bno5-1H; Fri, 03 Nov 2023 16:42:21 +0000 Received: from mx1.uni-rostock.de ([139.30.22.71]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qyxFS-00BnjS-0l for linux-um@lists.infradead.org; Fri, 03 Nov 2023 16:42:20 +0000 Received: from 139.30.22.84 by mx1.uni-rostock.de (Tls12, Aes256, Sha384, DiffieHellmanEllipticKey384); Fri, 03 Nov 2023 16:42:02 GMT DKIM-Signature: v=1; c=relaxed/relaxed; d=uni-rostock.de; s=itmze; t=1699029722; bh=5oUNntIsz42ye+cbkNuzUBfKHPkK2L8T7r9lTsxpiH4=; h= Subject:Subject:From:From:Date:Date:ReplyTo:ReplyTo:Cc:Cc:Message-Id:Message-Id; a=ed25519-sha256; b= J4805Dx/OmDjq8S8yaRkS8K4CfzUmeugydWNmdSvxcRxXyEzoozMfvwVg5jIMEzDAiuqsE8ANEn+QiEhTCp4DQ== DKIM-Signature: v=1; c=relaxed/relaxed; d=uni-rostock.de; s=itmz; t=1699029722; bh=5oUNntIsz42ye+cbkNuzUBfKHPkK2L8T7r9lTsxpiH4=; h= Subject:Subject:From:From:Date:Date:ReplyTo:ReplyTo:Cc:Cc:Message-Id:Message-Id; a=rsa-sha256; b= psCf5uOoNRj5o6KDnf1hJG9teYGBD8MoGgxXDgorteiY8qK/fvx8l/Y0YPY2GKY/g4z30Zup40W+kqGalRxAUuiLuFgrO05ahpUW5zb2k8TBDRWOX3/74eTrToSA26yga0TLP1ZurdnOOszeBN2JYcO7axcbD5YgcxGNlJOXlvs= Received: from mininet-experimente.amd.e-technik.uni-rostock.de (139.30.201.3) by mail1.uni-rostock.de (139.30.22.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Fri, 3 Nov 2023 17:41:57 +0100 From: Benjamin Beichler Date: Fri, 3 Nov 2023 16:41:43 +0000 Subject: [PATCH RFC 05/11] um: Add final request time to TT wait message MIME-Version: 1.0 Message-ID: <20231103-bb-timetravel-patches-v1-5-e2c68efcf664@uni-rostock.de> References: <20231103-bb-timetravel-patches-v1-0-e2c68efcf664@uni-rostock.de> In-Reply-To: <20231103-bb-timetravel-patches-v1-0-e2c68efcf664@uni-rostock.de> To: Richard Weinberger , Anton Ivanov , Johannes Berg CC: , Benjamin Beichler X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1699029716; l=2438; i=benjamin.beichler@uni-rostock.de; s=20231103; h=from:subject:message-id; bh=cUx3FbldG98/2P5aQhm9/XrZgucPSi9rnu0lQ6fNFvM=; b=oD8qOm9vbsrzTMgmOLcFfxroUtYq8mUOYMPzJ+c4UMhlb3p0FBsHX9sTzfMnUd0GWfkHP6PWi pob4Mhxo+QgBomq2hTia2OlPmT4I52mPl0qRJvXvfJDG4Nx+GtLcw8Q X-Developer-Key: i=benjamin.beichler@uni-rostock.de; a=ed25519; pk=fla2/IRwqFWH5W+fACqQyDu/mTc6mEcSPQtqb/SoX8o= X-Originating-IP: [139.30.201.3] X-ClientProxiedBy: email3.uni-rostock.de (139.30.22.83) To mail1.uni-rostock.de (139.30.22.84) X-TM-SNTS-SMTP: 424959179161C38A1EFDF6737992251ABF54ABD2DA2DB807F91E2EFD2AB82AA32000:8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231103_094218_570957_D6E08582 X-CRM114-Status: GOOD ( 13.65 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Although the information for the next requested time was already sent in a prior message, this change introduces the otherwise unused time variable in the TT message. This addition enables an extra co [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [139.30.22.71 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Although the information for the next requested time was already sent in a prior message, this change introduces the otherwise unused time variable in the TT message. This addition enables an extra consistency check and can otherwise be ignored. Signed-off-by: Benjamin Beichler --- arch/um/kernel/time.c | 6 +++--- include/uapi/linux/um_timetravel.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index ff5ef75bbb94..abd5fd0f62ee 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c @@ -220,7 +220,7 @@ static bool time_travel_ext_request(unsigned long long time) return true; } -static void time_travel_ext_wait(bool idle) +static void time_travel_ext_wait(bool idle, unsigned long long ns) { struct um_timetravel_msg msg = { .op = UM_TIMETRAVEL_ACK, @@ -230,7 +230,7 @@ static void time_travel_ext_wait(bool idle) time_travel_ext_free_until_valid = false; time_travel_ext_waiting++; - time_travel_ext_req(UM_TIMETRAVEL_WAIT, -1); + time_travel_ext_req(UM_TIMETRAVEL_WAIT, ns); /* * Here we are deep in the idle loop, so we have to break out of the @@ -256,7 +256,7 @@ static void time_travel_ext_get_time(void) static void __time_travel_update_time(unsigned long long ns, bool idle) { if (time_travel_mode == TT_MODE_EXTERNAL && time_travel_ext_request(ns)) - time_travel_ext_wait(idle); + time_travel_ext_wait(idle, ns); else time_travel_set_time(ns); } diff --git a/include/uapi/linux/um_timetravel.h b/include/uapi/linux/um_timetravel.h index ca3238222b6d..3127f069d9dc 100644 --- a/include/uapi/linux/um_timetravel.h +++ b/include/uapi/linux/um_timetravel.h @@ -77,9 +77,9 @@ enum um_timetravel_ops { /** * @UM_TIMETRAVEL_WAIT: Indicate waiting for the previously requested * runtime, new requests may be made while waiting (e.g. due to - * interrupts); the time field is ignored. The calendar must process - * this message and later send a %UM_TIMETRAVEL_RUN message when - * the host can run again. + * interrupts); the time field contains the next requested runtime + * for consistency checks. The calendar must process this message and + * later send a %UM_TIMETRAVEL_RUN message when the host can run again. * (host -> calendar) */ UM_TIMETRAVEL_WAIT = 3,