From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7394 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] replace 'hlt' by 'ud2' in i386/x32/x86_64 a_crash implementations Date: Fri, 17 Apr 2015 01:55:00 -0400 Message-ID: <20150417055500.GW6817@brightrain.aerifal.cx> References: <1429207139-10359-1-git-send-email-amonakov@ispras.ru> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1429250118 19532 80.91.229.3 (17 Apr 2015 05:55:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Apr 2015 05:55:18 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7407-gllmg-musl=m.gmane.org@lists.openwall.com Fri Apr 17 07:55:18 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YizFE-0003Gv-Jp for gllmg-musl@m.gmane.org; Fri, 17 Apr 2015 07:55:16 +0200 Original-Received: (qmail 24134 invoked by uid 550); 17 Apr 2015 05:55:14 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 24106 invoked from network); 17 Apr 2015 05:55:13 -0000 Content-Disposition: inline In-Reply-To: <1429207139-10359-1-git-send-email-amonakov@ispras.ru> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7394 Archived-At: 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. Rich