linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Jackie Liu <liuyun01@kylinos.cn>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	Dan Robertson <danlrobertson89@gmail.com>,
	Jan Kiszka <jan.kiszka@siemens.com>,
	David Howells <dhowells@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 5.0 20/25] scripts/gdb: replace flags (MS_xyz -> SB_xyz)
Date: Tue, 12 Mar 2019 10:08:58 -0700	[thread overview]
Message-ID: <20190312170405.070629032@linuxfoundation.org> (raw)
In-Reply-To: <20190312170403.643852550@linuxfoundation.org>

5.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jackie Liu <liuyun01@kylinos.cn>

commit 663cb6340c6e84fe29aa6d0fa63d85ea6bd6cd19 upstream.

Since commit 1751e8a6cb93 ("Rename superblock flags (MS_xyz ->
SB_xyz)"), scripts/gdb should be updated to replace MS_xyz with SB_xyz.

This change didn't directly affect the running operation of scripts/gdb
until commit e262e32d6bde "vfs: Suppress MS_* flag defs within the
kernel unless explicitly enabled" removed the definitions used by
constants.py.

Update constants.py.in to utilise the new internal flags, matching the
implementation at fs/proc_namespace.c::show_sb_opts.

Note to stable, e262e32d6bde landed in v5.0-rc1 (which was just
released), so we'll want this picked back to 5.0 stable once this patch
hits mainline (akpm just picked it up).  Without this, debugging a
kernel a kernel via GDB+QEMU is broken in the 5.0 release.

[kieran.bingham@ideasonboard.com: add fixes tag, reword commit message]
Link: http://lkml.kernel.org/r/20190305103014.25847-1-kieran.bingham@ideasonboard.com
Fixes: e262e32d6bde "vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled"
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Dan Robertson <danlrobertson89@gmail.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: David Howells <dhowells@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 scripts/gdb/linux/constants.py.in |   12 ++++++------
 scripts/gdb/linux/proc.py         |   12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

--- a/scripts/gdb/linux/constants.py.in
+++ b/scripts/gdb/linux/constants.py.in
@@ -37,12 +37,12 @@
 import gdb
 
 /* linux/fs.h */
-LX_VALUE(MS_RDONLY)
-LX_VALUE(MS_SYNCHRONOUS)
-LX_VALUE(MS_MANDLOCK)
-LX_VALUE(MS_DIRSYNC)
-LX_VALUE(MS_NOATIME)
-LX_VALUE(MS_NODIRATIME)
+LX_VALUE(SB_RDONLY)
+LX_VALUE(SB_SYNCHRONOUS)
+LX_VALUE(SB_MANDLOCK)
+LX_VALUE(SB_DIRSYNC)
+LX_VALUE(SB_NOATIME)
+LX_VALUE(SB_NODIRATIME)
 
 /* linux/mount.h */
 LX_VALUE(MNT_NOSUID)
--- a/scripts/gdb/linux/proc.py
+++ b/scripts/gdb/linux/proc.py
@@ -114,11 +114,11 @@ def info_opts(lst, opt):
     return opts
 
 
-FS_INFO = {constants.LX_MS_SYNCHRONOUS: ",sync",
-           constants.LX_MS_MANDLOCK: ",mand",
-           constants.LX_MS_DIRSYNC: ",dirsync",
-           constants.LX_MS_NOATIME: ",noatime",
-           constants.LX_MS_NODIRATIME: ",nodiratime"}
+FS_INFO = {constants.LX_SB_SYNCHRONOUS: ",sync",
+           constants.LX_SB_MANDLOCK: ",mand",
+           constants.LX_SB_DIRSYNC: ",dirsync",
+           constants.LX_SB_NOATIME: ",noatime",
+           constants.LX_SB_NODIRATIME: ",nodiratime"}
 
 MNT_INFO = {constants.LX_MNT_NOSUID: ",nosuid",
             constants.LX_MNT_NODEV: ",nodev",
@@ -184,7 +184,7 @@ values of that process namespace"""
             fstype = superblock['s_type']['name'].string()
             s_flags = int(superblock['s_flags'])
             m_flags = int(vfs['mnt']['mnt_flags'])
-            rd = "ro" if (s_flags & constants.LX_MS_RDONLY) else "rw"
+            rd = "ro" if (s_flags & constants.LX_SB_RDONLY) else "rw"
 
             gdb.write(
                 "{} {} {} {}{}{} 0 0\n"



  parent reply	other threads:[~2019-03-12 18:12 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12 17:08 [PATCH 5.0 00/25] 5.0.2-stable review Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 01/25] media: uvcvideo: Fix type check leading to overflow Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 02/25] Input: wacom_serial4 - add support for Wacom ArtPad II tablet Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 03/25] Input: elan_i2c - add id for touchpad found in Lenovo s21e-20 Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 04/25] iscsi_ibft: Fix missing break in switch statement Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 05/25] scsi: aacraid: " Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 06/25] x86/PCI: Fixup RTIT_BAR of Intel Denverton Trace Hub Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 07/25] arm64: dts: zcu100-revC: Give wifi some time after power-on Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 08/25] arm64: dts: hikey: " Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 09/25] arm64: dts: hikey: Revert "Enable HS200 mode on eMMC" Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 10/25] ARM: dts: exynos: Fix pinctrl definition for eMMC RTSN line on Odroid X2/U3 Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 11/25] ARM: dts: exynos: Add minimal clkout parameters to Exynos3250 PMU Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 12/25] ARM: dts: exynos: Fix max voltage for buck8 regulator on Odroid XU3/XU4 Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 13/25] drm: disable uncached DMA optimization for ARM and arm64 Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 14/25] media: Revert "media: rc: some events are dropped by userspace" Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 15/25] Revert "PCI/PME: Implement runtime PM callbacks" Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 16/25] bpf: Stop the psock parser before canceling its work Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 17/25] gfs2: Fix missed wakeups in find_insert_glock Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 18/25] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei() Greg Kroah-Hartman
2019-03-12 17:08 ` [PATCH 5.0 19/25] staging: erofs: compressed_pages should not be accessed again after freed Greg Kroah-Hartman
2019-03-12 17:08 ` Greg Kroah-Hartman [this message]
2019-03-12 17:08 ` [PATCH 5.0 21/25] ath9k: Avoid OF no-EEPROM quirks without qca,no-eeprom Greg Kroah-Hartman
2019-03-12 17:09 ` [PATCH 5.0 22/25] perf/x86/intel: Make cpuc allocations consistent Greg Kroah-Hartman
2019-03-12 17:09 ` [PATCH 5.0 23/25] perf/x86/intel: Generalize dynamic constraint creation Greg Kroah-Hartman
2019-03-12 17:09 ` [PATCH 5.0 24/25] x86: Add TSX Force Abort CPUID/MSR Greg Kroah-Hartman
2019-03-12 17:09 ` [PATCH 5.0 25/25] perf/x86/intel: Implement support for TSX Force Abort Greg Kroah-Hartman
2019-03-13  8:57 ` [PATCH 5.0 00/25] 5.0.2-stable review Naresh Kamboju
2019-03-13 17:37 ` Jon Hunter
2019-03-13 20:36 ` Guenter Roeck
2019-03-13 20:59   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190312170405.070629032@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=danlrobertson89@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuyun01@kylinos.cn \
    --cc=ndesaulniers@google.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).