Deutsch   English   Français   Italiano  
<v47avm$ht65$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Terje Mathisen <terje.mathisen@tmsw.no>
Newsgroups: comp.arch
Subject: Re: Privilege Levels Below User
Date: Mon, 10 Jun 2024 18:52:06 +0200
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <v47avm$ht65$1@dont-email.me>
References: <jai66jd4ih4ejmek0abnl4gvg5td4obsqg@4ax.com>
 <Z9I8O.13$2JEf.11@fx14.iad> <5h%8O.4327$wDZ.776@fx48.iad>
 <1316e4baa439de908666e38c39cd8c79@www.novabbs.org> <ywE9O.33$46t.1@fx46.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 10 Jun 2024 18:52:06 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="61a4720bc8db2ac0344820afeea0b6ea";
	logging-data="586949"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+dVKn4fh7nnXUIM/iIJvo17Uzceb1CaaeGsb2p1gmdvA=="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
 Firefox/91.0 SeaMonkey/2.53.18.2
Cancel-Lock: sha1:8ck+7rj2DdJoxL8kQeMHYTS+gmo=
In-Reply-To: <ywE9O.33$46t.1@fx46.iad>
Bytes: 2087

EricP wrote:
[snip]
> Many processors automatically disable interrupts on trap because it
> greatly simplifies the race conditions in their prologue and epilogue.
> x86 did not disable interrupts on exceptions but x64 allows it as an 
> option.

I have written a lot of x86 interrupt handlers, these chips did very 
much disable all interrupts when transferring control to my handler.

The typical approach was to do the minimum work possible to save 
whatever HW buffer/data needed saving, before executing a STI (SeT 
Interrupt enable bit?) and then do anything else that had to be done 
while still in the primary handler.

IRET restored flags, IP and CS, transferring control back to whatever 
was running when the hw interrupt happened.

Terje


-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"