public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: William Cattey <wdc@MIT.EDU>
Cc: Andi Kleen <andi@firstfloor.org>, Chuck Anderson <cra@WPI.EDU>,
	linux-kernel@vger.kernel.org
Subject: Re: vm86.c audit_syscall_exit() call trashes registers
Date: Fri, 28 Sep 2007 23:06:37 -0700	[thread overview]
Message-ID: <46FDEB6D.6000403@goop.org> (raw)
In-Reply-To: <7CB783C7-8EC7-4AA3-B825-B23595373229@MIT.EDU>

William Cattey wrote:
> Your fix seems to have remedied a problem we are having with EDID
> fetches through vm86.c.  At the present moment, we're trying to
> understand your cleanup so as to back port it to an earlier rev of the
> kernel (2.6.18).
>
> 3 questions for you:
>
> 1. Are we correct in understanding that your cleanup only touched
> vm86.c and vm86.h?
>
> 2. Do you remember your changes well enough from back when you made
> them in December 2006 to be able to point out the changes solely made
> to the audit calls?
>
> 3. Does correct operation of vm86.c in the 2.6 kernel require all of
> your changes, or just the subset that affects the audit calls?

It was only a small part of the patch.  I think it was basically this
hunk (hand-edited, so this won't apply directly):

@@ -306,19 +334,18 @@ static void do_sys_vm86(struct kernel_vm
        tsk->thread.screen_bitmap = info->screen_bitmap;
        if (info->flags & VM86_SCREEN_BITMAP)
                mark_screen_rdonly(tsk->mm);
        __asm__ __volatile__("xorl %eax,%eax; movl %eax,%fs; movl %eax,%gs\n\t");
-       __asm__ __volatile__("movl %%eax, %0\n" :"=r"(eax));
 
        /*call audit_syscall_exit since we do not exit via the normal paths */
        if (unlikely(current->audit_context))
-               audit_syscall_exit(AUDITSC_RESULT(eax), eax);
+               audit_syscall_exit(AUDITSC_RESULT(0), 0);
 

 

This is certainly a bogus piece of code, and it could result in more or
less random values of eax being passed to audit_syscall_exit().    But I
don't know if it will have any bearing on your EDID problem; the rest of
the patch is related to the introduction of using %gs as the base for
the per-processor data area, and shouldn't cause any functional change
to sys_vm86(), but its possible I fixed some other bug in the process.

    J

  reply	other threads:[~2007-09-29  6:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-14 18:31 vm86.c audit_syscall_exit() call trashes registers Chuck Anderson
2007-08-14 20:42 ` Andi Kleen
2007-08-14 20:52   ` William Cattey
2007-08-14 21:28     ` Andi Kleen
2007-08-14 21:37       ` William Cattey
     [not found]         ` <20070814214622.GE23308@one.firstfloor.org>
     [not found]           ` <6655DD8B-D9C6-495D-9E22-2FDF6B375C9D@MIT.EDU>
     [not found]             ` <20070814221927.GH23308@one.firstfloor.org>
2007-09-25 23:38               ` William Cattey
2007-09-29  0:58                 ` Jeremy Fitzhardinge
2007-09-29  1:13                   ` William Cattey
2007-09-29  6:06                     ` Jeremy Fitzhardinge [this message]
2007-09-29  6:09                       ` Jeremy Fitzhardinge
2007-10-01 22:30                         ` William Cattey
2007-10-01 23:49                           ` Jeremy Fitzhardinge
2007-10-02 16:44                 ` Chuck Ebbert
2007-10-04 23:58                   ` William Cattey
2007-10-05  0:10                     ` Chuck Ebbert

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=46FDEB6D.6000403@goop.org \
    --to=jeremy@goop.org \
    --cc=andi@firstfloor.org \
    --cc=cra@WPI.EDU \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wdc@MIT.EDU \
    /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