Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1370127

Re: [PATCH v5 4/9] x86/traps: Enable all exception handler callbacks early

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Re: [PATCH v5 4/9] x86/traps: Enable all exception handler callbacks early
Date 2016-04-03 10:10 +0200
Message-ID <rjLgB-tH-3@gated-at.bofh.it> (permalink)
References <rjups-4TG-5@gated-at.bofh.it> <rjups-4TG-3@gated-at.bofh.it> <rjyW6-81e-9@gated-at.bofh.it> <rjAbv-IR-1@gated-at.bofh.it> <rjAOe-Z0-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Apr 02, 2016 at 10:52:48PM +0200, Borislav Petkov wrote:
> On Sat, Apr 02, 2016 at 01:16:07PM -0700, Andy Lutomirski wrote:
> > I have no idea why it was explicitly unsupported, but I'm guessing it
> > was just to avoid duplicating the code.  Early "ext" uaccess failures
> > are certainly not going to work, but I don't think this is a problem
> > -- there's no userspace before trap_init runs, so how exactly is an
> > "ext" uaccess going to happen in the first place?
> > 
> > In any event, if it did happen in older kernels, it would have
> > immediately panicked due to that code.  At least with my code it just
> > might manage to EFAULT correctly.
> 
> Yeah, I was wondering what that early thing meant.
> 
> Linus or tip guys probably remember what this whole deal with early
> uaccess was about. I'll try to do some git archeology tomorrow.

Yep, just as I suspected:

6a1ea279c210 ("x86, extable: Add early_fixup_exception()")

Apparently, thread_info might not have been setup yet. I'm guessing the
intention behind this no-uaccess-fixup-early is to not even attempt any
fixup due to stuff *probably* not initialized yet and so the safer thing
would be to panic instead.

I'm wondering whether making it try to EFAULT correctly is the right
thing to do... We're certainly more conservative if we panic and not
allow some silently failed attempt at recovery which looks successful,
to continue.

hpa, thoughts?

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v5 4/9] x86/traps: Enable all exception handler callbacks early Andy Lutomirski <luto@kernel.org> - 2016-04-02 16:10 +0200
  Re: [PATCH v5 4/9] x86/traps: Enable all exception handler callbacks  early Borislav Petkov <bp@alien8.de> - 2016-04-02 21:00 +0200
    Re: [PATCH v5 4/9] x86/traps: Enable all exception handler callbacks early Andy Lutomirski <luto@amacapital.net> - 2016-04-02 22:20 +0200
      Re: [PATCH v5 4/9] x86/traps: Enable all exception handler callbacks  early Borislav Petkov <bp@alien8.de> - 2016-04-02 23:00 +0200
        Re: [PATCH v5 4/9] x86/traps: Enable all exception handler callbacks  early Borislav Petkov <bp@alien8.de> - 2016-04-03 10:10 +0200
          Re: [PATCH v5 4/9] x86/traps: Enable all exception handler callbacks early Andy Lutomirski <luto@amacapital.net> - 2016-04-03 15:30 +0200
          Re: [PATCH v5 4/9] x86/traps: Enable all exception handler callbacks early Linus Torvalds <torvalds@linux-foundation.org> - 2016-04-03 16:00 +0200
            Re: [PATCH v5 4/9] x86/traps: Enable all exception handler callbacks early Andy Lutomirski <luto@amacapital.net> - 2016-04-03 16:00 +0200
              Re: [PATCH v5 4/9] x86/traps: Enable all exception handler callbacks early Linus Torvalds <torvalds@linux-foundation.org> - 2016-04-03 16:20 +0200
              Re: [PATCH v5 4/9] x86/traps: Enable all exception handler callbacks  early Borislav Petkov <bp@alien8.de> - 2016-04-03 16:20 +0200
                Re: [PATCH v5 4/9] x86/traps: Enable all exception handler callbacks early Andy Lutomirski <luto@amacapital.net> - 2016-04-04 17:50 +0200
  [tip:x86/asm] x86/traps: Enable all exception handler callbacks  early tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2016-04-13 13:50 +0200

csiph-web