From patchwork Tue Feb 14 23:35:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glenn Washburn X-Patchwork-Id: 1742627 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) 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=B0AuxFwZ; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=efficientek-com.20210112.gappssmtp.com header.i=@efficientek-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=dABLLz3U; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PGd0z1rHRz23h0 for ; Wed, 15 Feb 2023 10:37:39 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yxkxjRKZPR+3zx8OjRiC4jxPhAXGhSfl+fghWn6xOv0=; b=B0AuxFwZxtzxtL wPoFIqv3/AqcAcoDmtbowp9/UXuaBglLUQ+3ksnjkqgfEuRFg2qjrze1Il3kmItxY9Tv64R5Ayp5t IF0P2OlIAPJwfP3QmHETLQ//cAzXD+BsyQCYNJv4/DjZz7jU3W4Ulnf2gv3/LpvXEF0xz93KnlpDl Y/D6Ddg0lzOeKIyl32DrWp+PsAqiHAoN5FXA+itZMpcoUwgipDjafQX8o2wBLaYGHVeht3zPQlkcJ 3U1p7OrjYl2vQqYEByRLexhFi2UwFw3saTRgpSpWzTkHU3HbsPhEKZO35Os3tf+0vXO/DM8bOosQ1 MpUKS45Pjo4kknGilOzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pS4rc-003vIx-2u; Tue, 14 Feb 2023 23:37:32 +0000 Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pS4rZ-003vHO-Qk for linux-um@lists.infradead.org; Tue, 14 Feb 2023 23:37:31 +0000 Received: by mail-qv1-xf2a.google.com with SMTP id o42so9411191qvo.13 for ; Tue, 14 Feb 2023 15:37:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PExgdktPFDnbwiC2ZhAAKO+c3GHZZ7T8KuLCa5+nyeo=; b=dABLLz3UJUAfyAA2Fu6yj0FHcI5KQy/Vq+NPZJ/jD03WMG3j4HiuqTuyg+9ZlOXE2e PoXag+VERBF7+DuNNWYcCWpCAme+cg0pnoAIPfQstpZU9j2mOFnbOcSyTRh7wvhO84+7 KPQLZusQavLBXsBI2sH+QfG/cm+x3+h5CfXi1i+FhoWeksjEAD+q6Ri1WqTNNEFnrcER GinGTVdNCNZ7Qqdb3EaiSvEsnZZGO2BVSzlPZYDIAuRzszbqkCE390ZPC3dVjNSjQpFJ XBIjRqXyuPln2L/9TR7IGcTVmBJDNMkCwse8/vNsUW6XCTFpozJPjVsvIQOqNodNvSQL xxCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PExgdktPFDnbwiC2ZhAAKO+c3GHZZ7T8KuLCa5+nyeo=; b=yVtX6eY1JDOuadeggYxEeXSc1PvLL04T5G2hemjGrJxNGkKNKkSaaOo3mlBV51wCAS xy/4F0OqHNkTSy0+Cp3fjBYicangAvl2VW4FEoii9CvjCxuRpjrVqsIY2Ub5pdTe8jwP txD+YJhKD/xT8ME/B/gnyzR0XEn28w1ca+zcrR+IPy4l28YmRiDNPje255MjMCpzbYVC 0D9V1G+Uq4onUaaZDu8E6vVNdHvRGEBAIksDpUaPWv4zbQFLXUlPYn1sPCXDp61+Nvn9 GPBYJbA5zv5Zw589TcNtO78pfhAOtfL00AtaYCWXvK8eKaMBP9RwXPiUbPGA2/c0XHLl vynQ== X-Gm-Message-State: AO0yUKVNxcogQW467VIBBHf/xHjw8hg1Q7aqksF8Y55xbeZg1wbTNrwO 1bUxy6pjfyH7tfVJBKup72an4w== X-Google-Smtp-Source: AK7set+BJQ0eq2BsihN0upchp47DbKCwAmDbfzwH8BBZq6OsT9aaXBS/hNVuOyB0pV8EDFEs19Vupw== X-Received: by 2002:a05:6214:b63:b0:56e:bb46:fc79 with SMTP id ey3-20020a0562140b6300b0056ebb46fc79mr679637qvb.35.1676417847560; Tue, 14 Feb 2023 15:37:27 -0800 (PST) Received: from localhost.localdomain ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id d7-20020a05622a15c700b003b7e8c04d2esm12310262qty.64.2023.02.14.15.37.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 15:37:26 -0800 (PST) From: Glenn Washburn To: Jan Kiszka , Kieran Bingham Cc: Glenn Washburn , linux-um , Richard Weinberger , Johannes Berg , Anton Ivanov Subject: [PATCH 1/2] scripts/gdb: Correct indentation in get_current_task Date: Tue, 14 Feb 2023 17:35:39 -0600 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230214_153729_891806_00514673 X-CRM114-Status: UNSURE ( 9.84 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) 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: There is an extra space in a couple blocks in get_current_task. Though python does not care, let's make the spacing consistent. Signed-off-by: Glenn Washburn --- scripts/gdb/linux/cpus.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:f2a 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 Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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 There is an extra space in a couple blocks in get_current_task. Though python does not care, let's make the spacing consistent. Signed-off-by: Glenn Washburn --- scripts/gdb/linux/cpus.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/gdb/linux/cpus.py b/scripts/gdb/linux/cpus.py index 15fc4626d236..289f0bf4d2a1 100644 --- a/scripts/gdb/linux/cpus.py +++ b/scripts/gdb/linux/cpus.py @@ -163,16 +163,16 @@ def get_current_task(cpu): task_ptr_type = task_type.get_type().pointer() if utils.is_target_arch("x86"): - var_ptr = gdb.parse_and_eval("¤t_task") - return per_cpu(var_ptr, cpu).dereference() + var_ptr = gdb.parse_and_eval("¤t_task") + return per_cpu(var_ptr, cpu).dereference() elif utils.is_target_arch("aarch64"): - current_task_addr = gdb.parse_and_eval("$SP_EL0") - if((current_task_addr >> 63) != 0): - current_task = current_task_addr.cast(task_ptr_type) - return current_task.dereference() - else: - raise gdb.GdbError("Sorry, obtaining the current task is not allowed " - "while running in userspace(EL0)") + current_task_addr = gdb.parse_and_eval("$SP_EL0") + if((current_task_addr >> 63) != 0): + current_task = current_task_addr.cast(task_ptr_type) + return current_task.dereference() + else: + raise gdb.GdbError("Sorry, obtaining the current task is not allowed " + "while running in userspace(EL0)") else: raise gdb.GdbError("Sorry, obtaining the current task is not yet " "supported with this arch")