From: Bruno Ducrot <ducrot@poupinou.org>
To: Dave Jones <davej@redhat.com>
Cc: cpufreq@www.linux.org.uk
Subject: [PATCH] security fix for speedstep-smi
Date: Thu, 10 Jun 2004 21:35:12 +0200 [thread overview]
Message-ID: <20040610193512.GC13782@poupinou.org> (raw)
In-Reply-To: <20040610164434.GA14158@dominikbrodowski.de>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Looking around speedstep-smi, there is a lot of call to
speedstep_get_state() which is used as an index for the array
speedstep_freqs. But speedstep_get_state() will return the value of ebx
after a call to a SMI handler. It's not safe IMHO.
arch/i386/kernel/cpu/cpufreq/speedstep-smi.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
- --- linux-2.6.7-rc3-mm1/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c 2004/06/10 18:30:54 1.1
+++ linux-2.6.7-rc3-mm1/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c 2004/06/10 19:12:49
@@ -139,7 +139,7 @@ static int speedstep_get_state (void)
: "a" (command), "b" (function), "c" (0), "d" (smi_port), "S" (0)
);
- - return state;
+ return (state & 1);
}
/**
- --
Bruno Ducrot
- -- Which is worse: ignorance or apathy?
- -- Don't know. Don't care.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAyLfwiZtNKH9GMYcRAhlbAJ42SVKb1w+0sv0Ov2/Jbp8NB+J34wCfcfSv
57zWVNSxfyl5fQzUpzPEYa8=
=J4Ym
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2004-06-10 19:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-08 17:15 [PATCH] 2.6.5 speedstep on P4Ms Christian Hoelbling
2004-06-08 15:30 ` Bruno Ducrot
2004-06-08 23:53 ` Christian Hoelbling
2004-06-09 15:47 ` Dominik Brodowski
2004-06-09 16:09 ` Bruno Ducrot
2004-06-09 16:29 ` Dave Jones
2004-06-09 16:53 ` Dominik Brodowski
2004-06-09 18:32 ` Mattia Dongili
2004-06-10 0:46 ` Christian Hoelbling
2004-06-10 8:30 ` Dominik Brodowski
2004-06-10 11:20 ` Dave Jones
2004-06-10 9:10 ` Bruno Ducrot
2004-06-10 15:37 ` Bruno Ducrot
2004-06-10 16:44 ` Dominik Brodowski
2004-06-10 19:26 ` [PATCH] Remove notify in speedstep_set_state [1/2] Bruno Ducrot
2004-06-10 19:28 ` [PATCH] Remove notify in speedstep_set_state [2/2] Bruno Ducrot
2004-06-10 19:35 ` Bruno Ducrot [this message]
2004-06-10 19:44 ` [PATCH] 2.6.5 speedstep on P4Ms Bruno Ducrot
2004-06-10 20:04 ` [PATCH] replace for_each_cpu with for_each_cpu_mask (was Re: [PATCH] 2.6.5 speedstep on P4Ms) Bruno Ducrot
2004-06-10 21:38 ` Dave Jones
2004-06-11 9:55 ` Bruno Ducrot
-- strict thread matches above, loose matches on Subject: below --
2004-06-11 10:06 [PATCH] security fix for speedstep-smi Bruno Ducrot
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=20040610193512.GC13782@poupinou.org \
--to=ducrot@poupinou.org \
--cc=cpufreq@www.linux.org.uk \
--cc=davej@redhat.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