public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Catalin BOIE <util@deuroconsult.ro>
Cc: linux-kernel@vger.kernel.org
Subject: Re: idt change in a running kernel? what locking?
Date: Fri, 3 Oct 2003 07:34:11 +0100	[thread overview]
Message-ID: <20031003063411.GF15691@mail.shareable.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0310030850110.10930@hosting.rdsbv.ro>

Catalin BOIE wrote:
> What may happen if I modify idt on a running kernel?
> It's lock_kernel enough?

lock_kernel won't help at all.  It doesn't disable interrupts.

It's more likely, you want to use get_cpu()/put_cpu() to prevent the
current kernel thread from being pre-empted to a different CPU.

> Of course that the new location contain a valid idt table.

If the new table has the same entries as the old one for all
interrupts which are enabled it should be fine.  "lidt" is an atomic
operation with respect to interrupts.

If you are intending to change idt on all CPUs, you'll need something
more complicated.

-- Jamie

  reply	other threads:[~2003-10-03  6:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-03  5:52 idt change in a running kernel? what locking? Catalin BOIE
2003-10-03  6:34 ` Jamie Lokier [this message]
2003-10-03  6:52   ` Catalin BOIE
2003-10-03 17:02     ` Jamie Lokier
2003-10-06  5:12       ` Catalin BOIE
2003-10-06 17:07         ` Jamie Lokier
2003-10-07  4:35           ` Catalin BOIE

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=20031003063411.GF15691@mail.shareable.org \
    --to=jamie@shareable.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=util@deuroconsult.ro \
    /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