Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp460560rdg; Thu, 12 Oct 2023 10:24:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIyfJI99q5InGYIH/8xna+EaPOQ8ZXVM8HV2NnwxwBQRVTBKU39MEvvjd8+bT/E9CnBA00 X-Received: by 2002:a17:902:da8b:b0:1c7:8446:d65c with SMTP id j11-20020a170902da8b00b001c78446d65cmr24347045plx.43.1697131465295; Thu, 12 Oct 2023 10:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697131465; cv=none; d=google.com; s=arc-20160816; b=xxlr1SaLUnh2aTp3gK6/lwCYSHsPAeu+YBoP3A23GGznWa3NSW2H0OTpuiCbzAx5Gb lMJ5AMbnhRJ853POTXNC4JCMOrCUQ9G5N7bymJ7PGa8xQf2qdZ/J6q+MmrgNNARcDSly xMdKcgW4BbCleZ7eG1TCW3m+gxrf8d8fk4tmfTDynWODb8P3AtKpdlfaMfo9hhaQozYk 25AVokGIjOtn2g5NZv6MnxIjsRRuHcnbZH/4VVt5yMXezHyvDo07HxAPbi7CrNgvoFno /prCER0cm4EHgZnhHLXHrCLgVZAW3or0LCdRjQYc9leKO/qkyRoK7FcUF3xQCEu5llAK TxxA== 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=jwbGLv7+qIU1qCKTfLfixrysNO4bjXZnfSqF5055b/A=; fh=iMt9mR7tPHpILUTScbdc/cv5Bu8Y4MLmy8xlWClXVSw=; b=w9DdvzvTnvnkLN3V/Ye4DIOHKdlYefg2TDBB4U9Yqk0+O8CDfzq4fqLBCWb3gvSJiF a1HiY1NHX+lrQHvi/n98zKQalqnHYxydmPYaPxwlDiWZ8YQOPmsyhjjp3O6rBA2fg4US pDBG7hGLK7Lc3e8BvnSgvlP8zrHRFoT2wUPNlTYnl2WB85mer1zlV6wBrCeEMJw1tofQ EYDM8yrNeokZkwOMk9mAAi+tNfqMTZJr4I3vOetnlab+aREG2DsxaoWP8T6j6DrPEMfi NYh8TiKo6l7SG5ue4MZ2JvKMI5Oh2KZ8AbYSLt1+EY+8buyKK61oAf2UhkapSuE5VNYX rVFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GoNpSbci; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p6-20020a170902a40600b001c62cfff795si2482922plq.429.2023.10.12.10.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 10:24:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GoNpSbci; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 388BC819E176; Thu, 12 Oct 2023 10:24:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379640AbjJLRYE (ORCPT + 99 others); Thu, 12 Oct 2023 13:24:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379633AbjJLRWn (ORCPT ); Thu, 12 Oct 2023 13:22:43 -0400 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F9BDD5D; Thu, 12 Oct 2023 10:22:11 -0700 (PDT) Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-79fce245bf6so47189639f.1; Thu, 12 Oct 2023 10:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697131331; x=1697736131; darn=vger.kernel.org; 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=jwbGLv7+qIU1qCKTfLfixrysNO4bjXZnfSqF5055b/A=; b=GoNpSbciHRpT0Sq97TjI+r9MCuR4IZr82iCqZSbbreH9olOy9r6R7iE+4US7yrcxQr EdkSypA8Mgf9MGq6q1gU5Q7zxGEFmJbZ8H2y1sWIWrE7hr12E7mfo3HEYWPCrHqr0oQU ifPCBpPd2yMJs4+NMAZB/Ugc5ynwp9st1x/9Ab3RHS30QlnxC7LI924CqgFwjM5x46Yj Aa2kDsJKCX5PD46JAyS31DPzQOAEJqUfWlg09pbxH9MwJ1S/Voc05Yw35IXC+rdw+yUr PUZKMqGRDvYef36ogcTXr+j9zkcMW0u3CQNv0XgU3faab8ZLPxE6Q1I2VEdGyn6SMbD5 ApCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697131331; x=1697736131; 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=jwbGLv7+qIU1qCKTfLfixrysNO4bjXZnfSqF5055b/A=; b=HNYZBIiIzK+yXXco3BCwktUCS97m1aSZ0pM64oC54OTd1rvs4jVqICu7N4O73xBEa/ Xdqi5jBExlxhaepOs0/vgU0NJDx3+pLZBLA2HSLD70fEGMoP5uAoqAQG77R7DCNSo6+g bKcAvQo7Z3eh/r8ZNc2UHRmWfdCggFYdW6L1rauxiHOHL++oFVDiMvSGuN0jjwRTGC9j RyZYHaVigO2wmNMfzxNMkkliZ7fj8w4h94pGu6F50YDdT5n7BIKrDtbDyfktaZju58mJ OXu8hzfh/RmZesSSoyflscG5DLlDo9ghDX36WxYN2fBCHo96CQhPkl6+hJkBt6lYf653 8jNA== X-Gm-Message-State: AOJu0YyaHAJGSGJsTLt1kCsCS1Ra6OIGNqend/6WWZU9VeG4fws2kC/P jTQmZXhEIQDEiO9u+upaLhTvqh94yALd3Q== X-Received: by 2002:a5d:9743:0:b0:79f:96db:f33d with SMTP id c3-20020a5d9743000000b0079f96dbf33dmr27485863ioo.9.1697131330992; Thu, 12 Oct 2023 10:22:10 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id r25-20020a028819000000b0043cef0711c1sm3992211jai.158.2023.10.12.10.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 10:22:10 -0700 (PDT) From: Jim Cromie To: linux-kernel@vger.kernel.org, jbaron@akamai.com, gregkh@linuxfoundation.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: daniel.vetter@ffwll.ch, jani.nikula@intel.com, ville.syrjala@linux.intel.com, seanpaul@chromium.org, robdclark@gmail.com, groeck@google.com, yanivt@google.com, bleung@google.com, linux-doc@vger.kernel.org, Jim Cromie Subject: [PATCH v7 22/25] dyndbg: improve err report in attach_user_module_classes Date: Thu, 12 Oct 2023 11:21:33 -0600 Message-ID: <20231012172137.3286566-23-jim.cromie@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231012172137.3286566-1-jim.cromie@gmail.com> References: <20231012172137.3286566-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 12 Oct 2023 10:24:20 -0700 (PDT) convert a WARN on 3 conditions, into BUG_ON 2 of them (which don't happen), and an early return on (!cli->user_mod_name), which *was* happening, so should be seen going forward. Maybe this should be a WARN. NB: The underlying problem was a missing __align(8) in the DYNDBG_CLASSMAP_USE, which manifested as a corrupt record with a map pointer which segv'd. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 974395bf8a83..3dc512fb1d66 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -1284,9 +1284,11 @@ static void ddebug_attach_user_module_classes(struct ddebug_table *dt, */ for_each_boxed_vector(di, class_users, num_class_users, i, cli) { - if (WARN_ON(!cli || !cli->map || !cli->user_mod_name)) - continue; - + BUG_ON(!cli || !cli->map); + if (!cli->user_mod_name) { + pr_warn("class_ref[%d] !user-mod-name looking for %s\n", i, dt->mod_name); + return; + } if (!strcmp(cli->user_mod_name, dt->mod_name)) { vpr_cm_info(cli->map, "class_ref[%d] %s -> %s", i, -- 2.41.0