From: "H. Peter Anvin" <hpa@zytor.com>
To: Joe Damato <ice799@gmail.com>
Cc: linux-x86_64@vger.kernel.org, w@1wt.eu, mingo@elte.hu,
jeremy@goop.org, linux-newbie@vger.kernel.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] x86: Add getter/setter static inlines for x86 descriptors
Date: Sun, 29 Mar 2009 21:28:00 +0000 [thread overview]
Message-ID: <49CFE7E0.80500@zytor.com> (raw)
In-Reply-To: <76c37743d20e5737eadc747cbdddbc2beb11f074.1238361501.git.ice799@gmail.com>
Joe Damato wrote:
> Static inline getters/setters have been provided to encourage consumers not to touch the internals of 32bit x86 descriptors directly.
>
> Signed-off-by: Joe Damato <ice799@gmail.com>
Okay, what is the motivation for this?
This is a serious question. The x86 descriptors are so complex that
it's not clear to me that this restriction makes the code any more
clear. Especially not with things like:
- cpu->arch.gdt[i].b |= 0x00000100;
+ desc_set_hi(tmp, desc_get_hi(tmp) | 0x00000100);
This isn't an improvement. If you're doing to so something like this,
you need to actually implement the *intent* here.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa@zytor.com>
To: Joe Damato <ice799@gmail.com>
Cc: linux-x86_64@vger.kernel.org, w@1wt.eu, mingo@elte.hu,
jeremy@goop.org, linux-newbie@vger.kernel.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] x86: Add getter/setter static inlines for x86 descriptors
Date: Sun, 29 Mar 2009 14:28:00 -0700 [thread overview]
Message-ID: <49CFE7E0.80500@zytor.com> (raw)
In-Reply-To: <76c37743d20e5737eadc747cbdddbc2beb11f074.1238361501.git.ice799@gmail.com>
Joe Damato wrote:
> Static inline getters/setters have been provided to encourage consumers not to touch the internals of 32bit x86 descriptors directly.
>
> Signed-off-by: Joe Damato <ice799@gmail.com>
Okay, what is the motivation for this?
This is a serious question. The x86 descriptors are so complex that
it's not clear to me that this restriction makes the code any more
clear. Especially not with things like:
- cpu->arch.gdt[i].b |= 0x00000100;
+ desc_set_hi(tmp, desc_get_hi(tmp) | 0x00000100);
This isn't an improvement. If you're doing to so something like this,
you need to actually implement the *intent* here.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa@zytor.com>
To: Joe Damato <ice799@gmail.com>
Cc: linux-x86_64@vger.kernel.org, w@1wt.eu, mingo@elte.hu,
jeremy@goop.org, linux-newbie@vger.kernel.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] x86: Add getter/setter static inlines for x86 descriptors
Date: Sun, 29 Mar 2009 14:28:00 -0700 [thread overview]
Message-ID: <49CFE7E0.80500@zytor.com> (raw)
In-Reply-To: <76c37743d20e5737eadc747cbdddbc2beb11f074.1238361501.git.ice799@gmail.com>
Joe Damato wrote:
> Static inline getters/setters have been provided to encourage consumers not to touch the internals of 32bit x86 descriptors directly.
>
> Signed-off-by: Joe Damato <ice799@gmail.com>
Okay, what is the motivation for this?
This is a serious question. The x86 descriptors are so complex that
it's not clear to me that this restriction makes the code any more
clear. Especially not with things like:
- cpu->arch.gdt[i].b |= 0x00000100;
+ desc_set_hi(tmp, desc_get_hi(tmp) | 0x00000100);
This isn't an improvement. If you're doing to so something like this,
you need to actually implement the *intent* here.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2009-03-29 21:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-29 21:21 [PATCH 0/2] x86: Remove direct access to internal x86 descriptor fields Joe Damato
2009-03-29 21:21 ` Joe Damato
2009-03-29 21:21 ` Joe Damato
2009-03-29 21:21 ` [PATCH 1/2] x86: Add getter/setter static inlines for x86 descriptors Joe Damato
2009-03-29 21:21 ` Joe Damato
2009-03-29 21:21 ` Joe Damato
2009-03-29 21:21 ` [PATCH 2/2] x86: Replace direct access to descriptor fields with getter/setters Joe Damato
2009-03-29 21:21 ` Joe Damato
2009-03-29 21:21 ` Joe Damato
2009-03-29 21:28 ` H. Peter Anvin [this message]
2009-03-29 21:28 ` [PATCH 1/2] x86: Add getter/setter static inlines for x86 descriptors H. Peter Anvin
2009-03-29 21:28 ` H. Peter Anvin
2009-03-29 21:50 ` [PATCH 1/2] x86: Add getter/setter static inlines for x86 Joe Damato
2009-03-29 21:50 ` [PATCH 1/2] x86: Add getter/setter static inlines for x86 descriptors Joe Damato
2009-03-29 21:50 ` Joe Damato
2009-03-29 22:10 ` H. Peter Anvin
2009-03-29 22:10 ` H. Peter Anvin
2009-03-29 22:10 ` H. Peter Anvin
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=49CFE7E0.80500@zytor.com \
--to=hpa@zytor.com \
--cc=ice799@gmail.com \
--cc=jeremy@goop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-newbie@vger.kernel.org \
--cc=linux-x86_64@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=w@1wt.eu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.