From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5348 Path: news.gmane.org!not-for-mail From: Andy Lutomirski Newsgroups: gmane.linux.lib.musl.general,gmane.linux.ports.arm.kernel Subject: Re: Re: Thread pointer changes Date: Fri, 27 Jun 2014 16:17:52 -0700 Message-ID: References: <20140610072835.GA8466@brightrain.aerifal.cx> <20140611145533.GT179@brightrain.aerifal.cx> <53ADC5B1.6080905@amacapital.net> <20140627200949.GQ32514@n2100.arm.linux.org.uk> <20140627210931.GT23102@port70.net> <20140627213051.GS32514@n2100.arm.linux.org.uk> <20140627215541.GC16724@brightrain.aerifal.cx> <20140627221744.GU32514@n2100.arm.linux.org.uk> <20140627223328.GB17988@brightrain.aerifal.cx> <20140627230736.GX32514@n2100.arm.linux.org.uk> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1403911112 28973 80.91.229.3 (27 Jun 2014 23:18:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Jun 2014 23:18:32 +0000 (UTC) Cc: Rich Felker , musl@lists.openwall.com, Szabolcs Nagy , Kees Cook , "linux-arm-kernel@lists.infradead.org" To: Russell King - ARM Linux Original-X-From: musl-return-5353-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jun 28 01:18:25 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 1X0fPU-0007PJ-En for gllmg-musl@plane.gmane.org; Sat, 28 Jun 2014 01:18:24 +0200 Original-Received: (qmail 13345 invoked by uid 550); 27 Jun 2014 23:18:23 -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 13337 invoked from network); 27 Jun 2014 23:18:23 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=16Fd7mKkNke5cqtzJuG5NPKGYJq5n1O8gmnh+JtjQyM=; b=EC9Yr+26FPBH9hFUnlneWEjjU/0WRm+8VzF6GCyYn3mtPKE4x5Te3Tgcvduy7Ud6Mf Ws0L9axV+158HJEprN0J9I4f+DletENkD8CFxlg0NLRh/ytgTFZGC0kkwMw03RC4KFqT 2ALJ44AgwKM5KokfqKYPT8FHJslm3CW0e5EibnzPBmz3Lm2Sk5AvxJHaO9OnDCHP6mcR aPME9tuNA3tgTqiXy+FbQEnPFWYbkOxWR4VJoMxQPP9UhBVTHtIGZ2y+cs1z5zt/ZXjw 7HsQywQTw5lF8ZwFDsl6QAb4hpMAL+2wsOKele44NcAiqsqJ9qakSzNaT1pLuXHKaRme Qfow== X-Gm-Message-State: ALoCoQmI6tvkaTaqk3tSfrcgE3Lg87hTgWifsg/KyOJalfVE6uH0cUljLnVCzLJZVEEcbWmjEINU X-Received: by 10.152.1.99 with SMTP id 3mr18621131lal.43.1403911092236; Fri, 27 Jun 2014 16:18:12 -0700 (PDT) In-Reply-To: <20140627230736.GX32514@n2100.arm.linux.org.uk> Xref: news.gmane.org gmane.linux.lib.musl.general:5348 gmane.linux.ports.arm.kernel:336498 Archived-At: On Fri, Jun 27, 2014 at 4:07 PM, Russell King - ARM Linux wrote: > The kuser helpers can NOT be removed unless the CPU is v6k+. Let me > put that a different way: the kuser helpers can not be removed unless > the ELF HWCAPs indicate TLS support. Why? (This is an honest question -- there may be an excellent answer.) I understand why they're needed in the first place, but I don't understand why they need to live at a fixed address. The closest thing to this that I'm familiar with is x86_32's sysenter. It's a very useful instruction, but it's basically impossible for libc to contain a sysenter instruction in the libc image. So the kernel provides one *at a randomized address*, and libc calls it. Admittedly, x86_32 has an advantage over ARM here: libc without a sysenter helper is completely functional; it's just slower. Nonetheless, ISTM it should be possible to start advertising the kuser helper address to libc, get all the libcs to play along, and then offer an option of randomizing it for people who know that they don't have any old libcs on their systems. --Andy