Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2704225lqz; Wed, 3 Apr 2024 06:25:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUzwIMIJMoltHmai/RzwSjQVj02HvslLb8eBouSzPPVohc76Vl425U3YJdXEc1ZHQDj29X6i2YVTnT4KFyn02ScxgyphT1uVRLc2UNmPA== X-Google-Smtp-Source: AGHT+IEpo2D902BIyT03c4fSAycnlpoAvK0oiMUjC4c5P2lL60pgrUC8QTQ11sfDy1EO6HDMrwHV X-Received: by 2002:a05:6e02:1a4d:b0:369:95dc:e4da with SMTP id u13-20020a056e021a4d00b0036995dce4damr3715588ilv.17.1712150740792; Wed, 03 Apr 2024 06:25:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712150740; cv=pass; d=google.com; s=arc-20160816; b=v1vjhK+OihPqB9t39ZvJq/AFYnPzd5blMQ8yjMbpn5NU5DH1TNIpQg2xUu6ocB4Nan hUX50zHN/tzavlzp2KRgoRfIvIda6cqwjwZlKtn8VWCd+MaCu8M1cwODly4evPwXAZsn puH8We+3QXFuDWRnIBpLkhhyQ2XISKm5Tr15SiRbklopGV+r5D7PMNHmg/Y57Zz9y79S AoIn0YnkIKc40kh6kALAtbSuizQw6mQ6lJNwf0UL9BZNvjc720YMMfn2dq6B+Pwgc+CJ 61fH+u8r6UcBux0uW8Kfk5UYxasQ4wODsgs0b+hHLP8duht/tmRyN0qtMI/xR+L1lD3W +1IA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:sender:dkim-signature; bh=klYg8xMT6MjrhYgIxkpLnDg0Lyaa6cQfR4UsA0LeN2U=; fh=vCMw4cKYz750lWivWOQnRRBum3thSduVhCkNJBMN2Dk=; b=JSEcC/xquhZ1bLCycnuqavG8B9J2MfFoKcWjPHYSINBwA3y0QhehJSexbWDPsDe5BZ 9ogp133b0RK6HL9fWmawf/I8qIfgLh+L9M1aWDR8xTFU+WTIIsjQFEoWSQay7v+XThfx Lp927uFXGNm8VBQw4kBrjEQqN/bvC3JmZCnN0qShTorxN46eL3g6id0kL0hBr69n252k QLibMj6jPidVfwpEf+9DRqWjFXTe4f9JXfMn8obb19A4EoUARi5kNDnD0Yo6RNv8onBu +8Hpt302qMhyokjZI1WATOhX9Cs5ls7256Y/dZfCA+SI2IS28O/HZosMtn+M5O+Prw3G SmYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=S7C8F9AR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-129813-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129813-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a7-20020a654187000000b005f0565d7c96si13327020pgq.319.2024.04.03.06.25.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 06:25:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129813-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=S7C8F9AR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-129813-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129813-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AA91328A798 for ; Wed, 3 Apr 2024 13:23:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2EE5C14C582; Wed, 3 Apr 2024 13:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S7C8F9AR" Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75A1514B070; Wed, 3 Apr 2024 13:20:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712150404; cv=none; b=BVTLUzPDmuMMdkd+M8SYNIHtT2wz0eBKnHd0xwgqhYetdT2pV6Km3HSMcU/yglgKDsE2Sq2eYxp5TZnlXjWmOY1qaC91X/M8VrTt17J5RYCK037j10/ZPE2ASFJZPww7AX+CxkgR38L0AasO6J1BUpmggDUv47CohcrD84ocFuw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712150404; c=relaxed/simple; bh=sRCoD7CA4VHB2FMUeBuju4gSTZ7VzEchcpaWHda2dww=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ckmX0n19xHAPsPfsbElNzDJUaoTqkF2ySdMXHSPJFLqLBlhhC7l3CHuTOhxGqQ5xRnHtYLagFpXcGBPBCBQaO8HFzPqf9IYciXHKkVQaReOnFPA3vIsbFHeW6Qh/OfRH6TM1ZsGgZixX+XyIKsFLvZtGI5T36iVo689tgSDSzlo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=S7C8F9AR; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1e2232e30f4so48584165ad.2; Wed, 03 Apr 2024 06:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712150401; x=1712755201; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=klYg8xMT6MjrhYgIxkpLnDg0Lyaa6cQfR4UsA0LeN2U=; b=S7C8F9ARAqqkqiRMHkFMWEvmUcQHdnDPy0r9jq/Zs9aT8wV/Fqpa2du/cqwxSq5gUu U5WqCJDXjTs1iksXAyr8jdbdxW2mp3siXOu5+DJ8CGhZw7DV0lOfBUzHgav0dalhDIOt UiHh5/vup2R0waShyCcd44OrqdgyLk3Hv5K74kZE24HMdtOJbFoI03wfFSuMBUxvK58M Wvv9t/bqIe++nLH8nljNKovakHfxuR4q9rW7NqVQV5na5nU5cY7TnNpvSCkvSLmcki+0 +a1hgZj4nMxE9qKT7j/mWPXSfCTcqk79eleRDYNaY7dtWpzWwLv1MKCOvuPhMjQ1qoBD 7Q1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712150401; x=1712755201; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=klYg8xMT6MjrhYgIxkpLnDg0Lyaa6cQfR4UsA0LeN2U=; b=pa7NI++45hSzgryiDx4VsL7YbcztTlEJdxRG/awZFIsY+gmBvpKjxPxJPMVff0DA+o 96ylb5Xm4lTuXwLg/2Dvo/ck8xe+h+yO4/vtKWKnZB6x8aHSZ20/S8NzoKy+komahO14 PoFtQmd7JjXpkGD2cC0nXF79uwJCRoLLpvjj0Mld+VoK05CrLAPaO1nDjnR2azRJp/Dh u5XiOPWOzvfnEKR7z98onWwG9gRR6a1Oh/C4KoX4TtSnwiXbUViVaVEl9iVBKj09tu11 HJGKtr9F78N+nHF1Uub57QGFPj6Fwki2iPAA8E8zyfWXaBDfbUPc6Y2OpHaLqiVltrqi LX+g== X-Forwarded-Encrypted: i=1; AJvYcCUTcKlWUT4NmFo0jtTEF4UgbSlQ0y2Mw3ad25UxQC0RnXkArR9xnHKUtna6hJ9IIFQc1jcV/3El38FFFD2SxsCsPlDchkJ4GDTooJHbarL7OnPLqxJQfFI8thJI4rpsUiONGpONs6VGoVoPX9Yoryqrd+FVDrcViCZ69ZyRmSLmtNAzFDf848VPiM8kgDbtHMbP0rsjnj0/Mk/kSJiXBPRG8uIPzE5WBBQoUtWL3dlua3K0/VxXpkOs/T1AZquZOWOq9TSqyw9SMfnfwp4Rwq0vhkcZ2Jh/jlvtqSf/Aay4nkuB28FzUU9zc7cD4rBKlA== X-Gm-Message-State: AOJu0YyROf0VLnl5C5VS+cbATZdefkieaK/3GdNkJxqpdDGDejEOY6xh vlU9nE9fdTu9KGeLvodqN4BgdzPp2tdx2Afq96wy8Nq+dzRwx6M2RUWU+J4s X-Received: by 2002:a17:902:bb16:b0:1e0:b871:53f1 with SMTP id im22-20020a170902bb1600b001e0b87153f1mr12301982plb.31.1712150401114; Wed, 03 Apr 2024 06:20:01 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id x3-20020a170902a38300b001e2461c52c6sm9309915pla.149.2024.04.03.06.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 06:20:00 -0700 (PDT) Sender: Guenter Roeck From: Guenter Roeck To: linux-kselftest@vger.kernel.org Cc: David Airlie , Arnd Bergmann , =?UTF-8?q?Ma=C3=ADra=20Canal?= , Dan Carpenter , Kees Cook , Daniel Diaz , David Gow , Arthur Grillo , Brendan Higgins , Naresh Kamboju , Maarten Lankhorst , Andrew Morton , Maxime Ripard , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Daniel Vetter , Thomas Zimmermann , dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, loongarch@lists.linux.dev, netdev@vger.kernel.org, x86@kernel.org, Guenter Roeck , Linux Kernel Functional Testing , Heiko Carstens , Vasily Gorbik , Alexander Gordeev Subject: [PATCH v3 11/15] s390: Add support for suppressing warning backtraces Date: Wed, 3 Apr 2024 06:19:32 -0700 Message-Id: <20240403131936.787234-12-linux@roeck-us.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240403131936.787234-1-linux@roeck-us.net> References: <20240403131936.787234-1-linux@roeck-us.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACKTRACE and CONFIG_DEBUG_BUGVERBOSE are enabled. Otherwise, the __func__ assembly parameter is replaced with a (dummy) NULL parameter to avoid an image size increase due to unused __func__ entries (this is necessary because __func__ is not a define but a virtual variable). Tested-by: Linux Kernel Functional Testing Acked-by: Dan Carpenter Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Signed-off-by: Guenter Roeck --- v2: - Rebased to v6.9-rc1 (simplified assembler changes after upstream commit 3938490e78f4 ("s390/bug: remove entry size from __bug_table section") - Added Tested-by:, Acked-by:, and Reviewed-by: tags - Introduced KUNIT_SUPPRESS_BACKTRACE configuration option v3: - Rebased to v6.9-rc2 arch/s390/include/asm/bug.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h index c500d45fb465..44d4e9f24ae0 100644 --- a/arch/s390/include/asm/bug.h +++ b/arch/s390/include/asm/bug.h @@ -8,6 +8,15 @@ #ifdef CONFIG_DEBUG_BUGVERBOSE +#ifdef CONFIG_KUNIT_SUPPRESS_BACKTRACE +# define HAVE_BUG_FUNCTION +# define __BUG_FUNC_PTR " .long %0-.\n" +# define __BUG_FUNC __func__ +#else +# define __BUG_FUNC_PTR +# define __BUG_FUNC NULL +#endif /* CONFIG_KUNIT_SUPPRESS_BACKTRACE */ + #define __EMIT_BUG(x) do { \ asm_inline volatile( \ "0: mc 0,0\n" \ @@ -17,10 +26,12 @@ ".section __bug_table,\"aw\"\n" \ "2: .long 0b-.\n" \ " .long 1b-.\n" \ - " .short %0,%1\n" \ - " .org 2b+%2\n" \ + __BUG_FUNC_PTR \ + " .short %1,%2\n" \ + " .org 2b+%3\n" \ ".previous\n" \ - : : "i" (__LINE__), \ + : : "i" (__BUG_FUNC), \ + "i" (__LINE__), \ "i" (x), \ "i" (sizeof(struct bug_entry))); \ } while (0) -- 2.39.2