From: Andy Lutomirski <luto@kernel.org>
To: mtk.manpages@gmail.com
Cc: linux-man@vger.kernel.org, "Metzger,
Markus T" <markus.t.metzger@intel.com>,
Andy Lutomirski <luto@kernel.org>
Subject: [PATCH] modify_ldt.2, set_thread_area.2: Fix type of base_addr
Date: Wed, 4 Dec 2019 12:30:45 -0800 [thread overview]
Message-ID: <cae4fcdc7ef5f2a1f2c81afb9bb1a9c552e39c4e.1575491386.git.luto@kernel.org> (raw)
Historically (before Linux 2.6.23), base_addr was unsigned long for
32-bit code and unsigned int for 64-bit code. In other words, it
was always a 32-bit value. When the ldt.h header files were
unified, the type became unsigned int on all systems. Update
modify_ldt.2 and set_thread_area.2 accordingly.
Indeed, on x86, the GDT and LDT specify 32-bit bases for code and
data segments, and this has nothing to do with the kernel.
Reported-by: "Metzger, Markus T" <markus.t.metzger@intel.com>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
man2/modify_ldt.2 | 2 +-
man2/set_thread_area.2 | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/man2/modify_ldt.2 b/man2/modify_ldt.2
index 0db6efea47ad..ae979ed41a7d 100644
--- a/man2/modify_ldt.2
+++ b/man2/modify_ldt.2
@@ -79,7 +79,7 @@ structure is defined in \fI<asm/ldt.h>\fP as:
.EX
struct user_desc {
unsigned int entry_number;
- unsigned long base_addr;
+ unsigned int base_addr;
unsigned int limit;
unsigned int seg_32bit:1;
unsigned int contents:2;
diff --git a/man2/set_thread_area.2 b/man2/set_thread_area.2
index b2f0882ed9ad..3b6b22efd9aa 100644
--- a/man2/set_thread_area.2
+++ b/man2/set_thread_area.2
@@ -67,7 +67,7 @@ to a structure of the following type:
.EX
struct user_desc {
unsigned int entry_number;
- unsigned long base_addr;
+ unsigned int base_addr;
unsigned int limit;
unsigned int seg_32bit:1;
unsigned int contents:2;
--
2.23.0
next reply other threads:[~2019-12-04 20:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 20:30 Andy Lutomirski [this message]
2019-12-14 4:54 ` [PATCH] modify_ldt.2, set_thread_area.2: Fix type of base_addr Michael Kerrisk (man-pages)
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=cae4fcdc7ef5f2a1f2c81afb9bb1a9c552e39c4e.1575491386.git.luto@kernel.org \
--to=luto@kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=markus.t.metzger@intel.com \
--cc=mtk.manpages@gmail.com \
/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).