|
Message-ID: <alpine.LNX.2.11.1504171100550.3767@monopod.intra.ispras.ru> Date: Fri, 17 Apr 2015 11:12:20 +0300 (MSK) From: Alexander Monakov <amonakov@...ras.ru> To: musl@...ts.openwall.com Subject: Re: [PATCH] replace 'hlt' by 'ud2' in i386/x32/x86_64 a_crash implementations On Fri, 17 Apr 2015, Rich Felker wrote: > On Thu, Apr 16, 2015 at 08:58:59PM +0300, Alexander Monakov wrote: > > --- > > ud2 is also what GCC and Clang use to implement __builtin_trap() > > > > ud2 causes SIGILL rather than SIGSEGV; SIGSEGV is more likely to have a custom > > signal handler installed > > I've pondered instead using: > > push $-1 > mov $175,%eax > xor %ebx,%ebx > mov %esp,%ecx > int $128 > hlt // or ud2? > > This should be uncatchable but it's moderately larger. An argument in favor of plain hlt/ud2 is that registers and memory are preserved, in case someone will be analyzing the coredump. Alexander
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.