Message ID | 20230607221337.2781730-1-florian.fainelli@broadcom.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp516674vqr; Wed, 7 Jun 2023 15:18:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5UU4I8De8muVw0FjkI7BCbDIX6+d+MDIPYxfpuZ6e/NkQL7KbOjJsOD35EEQj89swaXobl X-Received: by 2002:a17:902:d481:b0:1a9:433e:41e7 with SMTP id c1-20020a170902d48100b001a9433e41e7mr5133226plg.43.1686176289666; Wed, 07 Jun 2023 15:18:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686176289; cv=none; d=google.com; s=arc-20160816; b=sdEm0CXLL9BWj9xrzPmLUGqD5NYTX9B3DByXuAy/Wi1DXsYJW/HVt6ZO4EuwdvQc8a 47Lzn68XdUPBrtTEyPm6UlfrSFJV1WjbJ6N7tDua8pHPdMau8hBukNhyuH5wOpweE8gD RcYvx3xxlvC3rCXWDobYthvd7ftHnArBoDlTxt51vwVXEq0+BunlE6FAH5hVLdfUIaLd m4qG4MAK9/cX4S4RVuKHsxrfzEdJ3T3tUpgo1kz306PtTaAW5R/GWOHsH/oCtrSFGWhY GScolVvUvSluzpF+tITw2pU3846Gr9A9osiqd4U/wkHJ1KD+G/b8knzm9YDtb5ALyU1o hWFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=ipnsU7QahW+fw6sVEvOIV8d9N8vsj/rzFjEHV2UEusc=; b=v9NZ4FZsKhxM+2CHR3NC5q90CXTx4h9Um2aU7szhOzYXOzgMCK4h9hpOj9XSpAMtxk QyofcEIB+j6yuCsWIuCm0Dy9t1C5PoxaNUucvEsV2LfNCCagUVvkF1i4Gcv4cmL9CnCI ysVVnkVOERr1CUNsZi/fVpX5N/VeEMH8yFYbv4BRTSSUQdUuKgh6WsFlpJJwLSsFSykZ QPBwct156MHDfZX5VjDmZID8/zyRrHbSmxwyIOWrbm9aXfxvJn/Xbz+NHt9Ya0vBFCZy TdoMOZEeZ3umS4vb3J7lXcXWrdNdt2xF0gy2ItlzD8KeGPMN6jhAbdK1EX9oazynKbXu uIVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="cu2lo/Mr"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j24-20020a63cf18000000b0053fc3bc33e4si9223758pgg.795.2023.06.07.15.17.55; Wed, 07 Jun 2023 15:18:09 -0700 (PDT) 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=@broadcom.com header.s=google header.b="cu2lo/Mr"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231276AbjFGWN6 (ORCPT <rfc822;literming00@gmail.com> + 99 others); Wed, 7 Jun 2023 18:13:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230324AbjFGWN5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Jun 2023 18:13:57 -0400 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 753AB2119 for <linux-kernel@vger.kernel.org>; Wed, 7 Jun 2023 15:13:56 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-3f9b5ec058aso23130891cf.0 for <linux-kernel@vger.kernel.org>; Wed, 07 Jun 2023 15:13:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1686176035; x=1688768035; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=ipnsU7QahW+fw6sVEvOIV8d9N8vsj/rzFjEHV2UEusc=; b=cu2lo/MrzOD7RsnHZgVIHe1Aqz+mo6Ob19+lxZTQHLMstBgMXAXwH3+7VZo2jWDJgQ SvQRcdpbFdMde5SC1sznK139pRdvSLJNsal0ALwhfPlUqVIGNybTCm4Hv7PTMEgkd1s5 hpzYDkiZVLJA9LDgHYcVNDWeFltnQciY8uigQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686176035; x=1688768035; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ipnsU7QahW+fw6sVEvOIV8d9N8vsj/rzFjEHV2UEusc=; b=CeMyIuiBxDfjebKXxqhv753HQ2rrhyL9CGyfIp+wWPt18Z532gNY87J/zKZiQsjYag 2tnhHTV7M5v7jeTZ/TuwXZOrPV/ddAdU8rKMX0iB0WTkDU7nZE/sujxSXJ7k4CC5gGOX OPV2OORlTSgkp9jI8BVVKD3TKXgxM55a7mN/OfxglKqS1t1tNJUCgvRgoP0MXgcGqg4E YYIP1R4CsAOwKPi01sgQVJX1/13rb1yFfuQogvy2oyDVAUNT6/K/gp7Svvrk/md8BBR9 Ndv1AKY+baXq9oXUYauiIFhsSssxfS3BSYVFQ1gN0gYUFKUwzjUaTJcZmGqKWq3gl6gd OLqQ== X-Gm-Message-State: AC+VfDwX8VI5P7qAhAc4GqMDkS+mUUOFVmLYcacHXJzfXNHYr4MgL0/o OZf8VA/DtiS/hj7vZjpGqNyah6kjNFwNK7UDQZHNQ4kHqKSd3HZ1D8/WiEfeBAhBDmb9Ig2LHK7 G/b5itUENSnGKL4TUOVNHE241BymcKYSa32iO2TPl/swI3gHxNiwyFde+OfZXfwrWRCXSeozt4z CFyiQDolJv8Vw5xvkenQ== X-Received: by 2002:ac8:7d41:0:b0:3f5:19eb:6d27 with SMTP id h1-20020ac87d41000000b003f519eb6d27mr5364651qtb.10.1686176034795; Wed, 07 Jun 2023 15:13:54 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id 8-20020ac85908000000b003f86c08b3e7sm249390qty.21.2023.06.07.15.13.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 15:13:52 -0700 (PDT) From: Florian Fainelli <florian.fainelli@broadcom.com> To: linux-kernel@vger.kernel.org Cc: gehao@kylinos.cn, brauner@kernel.org, Florian Fainelli <florian.fainelli@broadcom.com>, Jan Kiszka <jan.kiszka@siemens.com>, Kieran Bingham <kbingham@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, Pankaj Raghav <p.raghav@samsung.com>, Luis Chamberlain <mcgrof@kernel.org> Subject: [PATCH] scripts/gdb: Fix SB_* constants parsing Date: Wed, 7 Jun 2023 15:13:35 -0700 Message-Id: <20230607221337.2781730-1-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000009ace0a05fd9173c6" X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MIME_NO_TEXT, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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?1768083988742341852?= X-GMAIL-MSGID: =?utf-8?q?1768083988742341852?= |
Series |
scripts/gdb: Fix SB_* constants parsing
|
|
Commit Message
Florian Fainelli
June 7, 2023, 10:13 p.m. UTC
After f15afbd34d8f ("fs: fix undefined behavior in bit shift for
SB_NOUSER") the constants were changed from plain integers which
LX_VALUE() can parse to constants using the BIT() macro which causes the
following:
Reading symbols from build/linux-custom/vmlinux...done.
Traceback (most recent call last):
File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/vmlinux-gdb.py", line 25, in <module>
import linux.constants
File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/scripts/gdb/linux/constants.py", line 5
LX_SB_RDONLY = ((((1UL))) << (0))
Use LX_GDBPARSED() which does not suffer from that issue.
f15afbd34d8f ("fs: fix undefined behavior in bit shift for SB_NOUSER")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
scripts/gdb/linux/constants.py.in | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Comments
On Wed, Jun 07, 2023 at 03:13:35PM -0700, Florian Fainelli wrote: > After f15afbd34d8f ("fs: fix undefined behavior in bit shift for > SB_NOUSER") the constants were changed from plain integers which > LX_VALUE() can parse to constants using the BIT() macro which causes the > following: > > Reading symbols from build/linux-custom/vmlinux...done. > Traceback (most recent call last): > File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/vmlinux-gdb.py", line 25, in <module> > import linux.constants > File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/scripts/gdb/linux/constants.py", line 5 > LX_SB_RDONLY = ((((1UL))) << (0)) > > Use LX_GDBPARSED() which does not suffer from that issue. > > f15afbd34d8f ("fs: fix undefined behavior in bit shift for SB_NOUSER") > Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> > --- Fine by me, Acked-by: Christian Brauner <brauner@kernel.org>
diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in index 471300ba176c..50a92c4e9984 100644 --- a/scripts/gdb/linux/constants.py.in +++ b/scripts/gdb/linux/constants.py.in @@ -48,12 +48,12 @@ if IS_BUILTIN(CONFIG_COMMON_CLK): LX_GDBPARSED(CLK_GET_RATE_NOCACHE) /* linux/fs.h */ -LX_VALUE(SB_RDONLY) -LX_VALUE(SB_SYNCHRONOUS) -LX_VALUE(SB_MANDLOCK) -LX_VALUE(SB_DIRSYNC) -LX_VALUE(SB_NOATIME) -LX_VALUE(SB_NODIRATIME) +LX_GDBPARSED(SB_RDONLY) +LX_GDBPARSED(SB_SYNCHRONOUS) +LX_GDBPARSED(SB_MANDLOCK) +LX_GDBPARSED(SB_DIRSYNC) +LX_GDBPARSED(SB_NOATIME) +LX_GDBPARSED(SB_NODIRATIME) /* linux/htimer.h */ LX_GDBPARSED(hrtimer_resolution)