From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6226 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: A running list of questions from "porting" Slackware to musl Date: Wed, 1 Oct 2014 09:48:17 +0200 Message-ID: <20141001074817.GL21835@port70.net> References: <542AA579.2040304@langurwallah.org> <20140930153216.GA1785@newbook> <20140930155023.GC23797@brightrain.aerifal.cx> <542B41C4.1040701@amacapital.net> 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 1412149723 8488 80.91.229.3 (1 Oct 2014 07:48:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Oct 2014 07:48:43 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6239-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 01 09:48:36 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XZEeH-0005ii-St for gllmg-musl@plane.gmane.org; Wed, 01 Oct 2014 09:48:34 +0200 Original-Received: (qmail 26308 invoked by uid 550); 1 Oct 2014 07:48:29 -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 26300 invoked from network); 1 Oct 2014 07:48:29 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <542B41C4.1040701@amacapital.net> User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:6226 Archived-At: * Andy Lutomirski [2014-09-30 16:50:28 -0700]: > On 09/30/2014 08:50 AM, Rich Felker wrote: > > When gcc generates the canary-check code, on failure it normally > > calls/jumps to __stack_chk_fail. But for shared libraries, that call > > would go to a thunk in the library's PLT, which depends on the GOT > > register being initialized (actually this varies by arch; x86_64 ... > > On x86_64, this would be call *whatever@gotoff(%rip) instead of call > whatever@plt. > > (Even better: the loader could patch the PLT with a direct jump. Could ... hm this seems to be a lot of complication just to crash if gcc had a -fcrash-on-ssp-chk-fail flag that simply generated a crash instruction that would be simpler/smaller/more secure (actually i think that should be the default behaviour)