Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 17 Apr 2015 21:48:38 +0300 (MSK)
From: Alexander Monakov <>
Subject: Re: [PATCH] replace 'hlt' by 'ud2' in i386/x32/x86_64 a_crash

> > An argument in favor of plain hlt/ud2 is that registers and memory are
> > preserved, in case someone will be analyzing the coredump.
> That's a good point. The above could be fixed to preserve registers
> with some minor added push/pop (simple pusha/popa on 32-bit)
> before/after the syscall, but then it gets bigger.

Hm, no, I wouldn't like to see that.  By the time a_crash executes, "the
impossible happened", so stack pointer might be pointing somewhere you
wouldn't want modified.

A good reason for compilers to generate ud2 is that it also works for kernel
code, unlike hlt -- but then OSv carries a copy of musl to run it in the
context of, as I understand, virtualized kernel -- what happens when they
execute a_crash?


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.