From: Horms <horms@debian.org>
To: Nikos Ntarmos <ntarmos@ceid.upatras.gr>, 329354@bugs.debian.org
Cc: Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
Frederik Schueler <fs@lowpingbastards.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: CAN-2005-0204 and 2.4
Date: Thu, 22 Sep 2005 11:30:25 +0900 [thread overview]
Message-ID: <20050922023025.GA20981@verge.net.au> (raw)
In-Reply-To: <E1EI1tH-0006Yy-00@master.debian.org>
On Wed, Sep 21, 2005 at 01:31:37PM +0300, Nikos Ntarmos wrote:
> Package: kernel-source-2.4.27
> Version: 2.4.27-11.hls.2005082200
> Severity: important
> Justification: fails to build from source
>
> Patch 143_outs.diff.bz2 breaks the kernel compilation on x86_64. The
> problem is that it uses the IO_BITMAP_BYTES macro which is defined for
> i386 (in linux/include/asm-i386/processor.h) but not for x86_64.
> Reverting the patch lets the kernel build again, although I guess the
> correct solution would be to add an appropriate IO_BITMAP_BYTES to
> linux/include/asm-x86_64/processor.h as well.
Hi Nikos,
First up, thanks for testing out my prebuild kernels. For the
uninitiated they are snapshots of what is in the deabian kernel-team's
SVN and live in http://packages.vergenet.net/testing/
The problem that you see is a patch that was included in
2.4.27-11 (the current version in sid), though it isn't built
for amd64.
Could you see if the following patch works for you. I've CCed lkml and
Marcelo for their consideration. It seems to me that 2.4 is indeed
vulnerable to CAN-2005-0204, perhaps someone can shed some light on
this.
--
Horms
Description: [CAN-2005-0204]: AMD64, allows local users to write to privileged IO ports via OUTS instruction
Patch author: Suresh Siddha (suresh.b.siddha@intel.com)
Upstream status: not applied
URL: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=146244
Patch source: Micah Anderson <micah@riseup.net> (debian-kernel)
Added definition of IO_BITMAP_BYTES for Debian's 2.4.27 and
submitted upstream for consideration for inclusion in 2.4 -- Horms
--- a/include/asm-x86_64/desc.h 2005-02-24 19:51:26.000000000 +0900
+++ b/include/asm-x86_64/desc.h 2005-02-24 19:52:40.000000000 +0900
@@ -128,7 +128,7 @@
static inline void set_tss_desc(unsigned n, void *addr)
{
- set_tssldt_descriptor((void *)&gdt_table + __CPU_DESC_INDEX(n,tss), (unsigned long)addr, DESC_TSS, sizeof(struct tss_struct));
+ set_tssldt_descriptor((void *)&gdt_table + __CPU_DESC_INDEX(n,tss), (unsigned long)addr, DESC_TSS, IO_BITMAP_OFFSET + IO_BITMAP_BYTES + 7);
}
static inline void set_ldt_desc(unsigned n, void *addr, int size)
--- a/include/asm-x86_64/processor.h 2005-09-22 11:12:40.000000000 +0900
+++ b/include/asm-x86_64/processor.h 2005-09-22 11:12:43.000000000 +0900
@@ -260,6 +260,7 @@
* Size of io_bitmap in longwords: 32 is ports 0-0x3ff.
*/
#define IO_BITMAP_SIZE 32
+#define IO_BITMAP_BYTES (IO_BITMAP_SIZE * sizeof(u32))
#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
#define INVALID_IO_BITMAP_OFFSET 0x8000
next parent reply other threads:[~2005-09-22 2:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1EI1tH-0006Yy-00@master.debian.org>
2005-09-22 2:30 ` Horms [this message]
2005-09-22 13:56 ` CAN-2005-0204 and 2.4 Nikos Ntarmos
2005-09-26 2:04 ` Horms
2005-09-22 20:04 ` Marcelo Tosatti
2005-09-23 22:17 ` [patch] x86_64: fix tss limit (was Re: CAN-2005-0204 and 2.4) Siddha, Suresh B
2005-09-23 22:55 ` Jesper Juhl
2005-09-23 23:22 ` Siddha, Suresh B
2005-09-23 23:25 ` Jesper Juhl
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=20050922023025.GA20981@verge.net.au \
--to=horms@debian.org \
--cc=329354@bugs.debian.org \
--cc=fs@lowpingbastards.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=ntarmos@ceid.upatras.gr \
/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