From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Florian Weimer Newsgroups: gmane.comp.lib.glibc.alpha Subject: Re: [PATCH 0/2] nptl: Update struct pthread_unwind_buf Date: Fri, 09 Feb 2018 13:11:16 +0100 Message-ID: <878tc2mkgr.fsf@mid.deneb.enyo.de> References: <20180201205757.51911-1-hjl.tools@gmail.com> <4abf9786-1879-f16c-5a01-3261cd718d63@redhat.com> <87inb7pug7.fsf@mid.deneb.enyo.de> <2a02aac9-6aa3-4dc6-b122-039ae85365e8@redhat.com> <87d11emoap.fsf@mid.deneb.enyo.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1518178179 15595 195.159.176.226 (9 Feb 2018 12:09:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Feb 2018 12:09:39 +0000 (UTC) Cc: "Carlos O'Donell" , GNU C Library To: "H.J. Lu" Original-X-From: libc-alpha-return-90176-glibc-alpha=m.gmane.org@sourceware.org Fri Feb 09 13:09:35 2018 Return-path: Envelope-to: glibc-alpha@blaine.gmane.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; q=dns; s=default; b=GaKdN HBrYXx8AgxJ9d6nV2ACL9OgLOcsbUN6NpzKZq+pku1644j9RGZtc3nLyYw5/0J1W HrPqQlXatGsMltSarPczU8R/BhkWErTX0LLjikzNqe3qdWZdFFJjv5smMQ1YBYdP GZEz+NfT0CSg1ogdJJEskgCsyMFliBzJP/SPNA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; s=default; bh=UXkzQQXFyaC hfZ6FxDuOTlT5SRY=; b=eInwwFeDaqnR6j4aRYpyN9c6FzcuwecMkNiRsokMrAQ q0GawRiyms+3UZ3UDjXE/zh/KlMNYeOboL8m9SvY82nE1XZaIFbDC0eMBExpWxkd J8do/kvPTACeeRMdGiz+2NJfb8JVEvMJce9fNNAyJWv2JkRDi150HGS0qnKb//zc = Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Original-Sender: libc-alpha-owner@sourceware.org Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= X-HELO: albireo.enyo.de In-Reply-To: (H. J. Lu's message of "Fri, 9 Feb 2018 03:13:44 -0800") Xref: news.gmane.org gmane.comp.lib.glibc.alpha:82524 Archived-At: Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ek7UW-0002kq-F8 for glibc-alpha@blaine.gmane.org; Fri, 09 Feb 2018 13:09:20 +0100 Received: (qmail 46303 invoked by alias); 9 Feb 2018 12:11:22 -0000 Received: (qmail 45728 invoked by uid 89); 9 Feb 2018 12:11:22 -0000 * H. J. Lu: >> My proposal is still rather hackish, but so is the existing code (the > > A pointer to a buffer in user program is passed to libpthread. > There is a jmp buf in the buffer followed by other fields. Since > the size of jmp buf is increased in glibc 2.28, we need to know the > offset of other fields. Otherwise libpthread may write beyond the > buffer in user program. I don't see how symbol versioning can help > us here since the INTERNAL libpthread functions don't know the > layout of __pthread_unwind_buf_t of USER programs. I suggest *not* to increase the size of the jump buffer. CET markup will not be correct for static libraries compiled against 2.27 or earlier with a CET-enabled toolchain, so this is the only completely safe approach.