From patchwork Wed Oct 3 00:44:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 148038 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp5808148lji; Tue, 2 Oct 2018 17:44:17 -0700 (PDT) X-Google-Smtp-Source: ACcGV62ugDOMoFxi5Eo3Fq7kuUPi7B9YuQKyieJYEK//lI3d46HNfuhqXCuUBjaqbjFUO+1cwWD4 X-Received: by 2002:a63:510a:: with SMTP id f10-v6mr16469649pgb.31.1538527456977; Tue, 02 Oct 2018 17:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538527456; cv=none; d=google.com; s=arc-20160816; b=cC1rFOVbjTDLujTVMPRoczPbIcIEjWEuLXSGUqqrwv4d5MZiXYsf1h27+Zi9EiBbwh 5jT18I/C3MmUw+PPIataCSLJX9IOxD5YbITe48mf1hcvhjzUFD+3SPvjBfLE47ViYJhj pzVsWrAwCmkcfP74MaFtm3Wmh3sRJXK1Gm47SRaXAODkYiDA+XkQTiURRbmFqMG5LfXH nCvPopZECsx3l+hudTV+dA4wfEONfEKnLrMnxMubc0WM8DI1bAnZzMXzbLoVIKW7CCk/ Tx4zY/eQrFwF7r41Az/JaGfkwpSu+4SPufJ8Uisu2BkYXhSUE+rqkktlM+f3icsAh9z7 Pnpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=keK/G8dQIkN/JSsxmfK3HjFz8eBlNjTKUmKyws8BWQo=; b=csyV4K2of/MW2TbZUh+hc6e5B3OHFRSzJK4gRx5gJgUN2NoFePVMT1KVB1Hcctl6Z8 GTiqbgCytY06Q9HgSnLKMOK5Clvim2JdJRU1BT3fXIwavbpZmN3oTlCimAkWxxBvB1Qj l1rUkdCakyoJLdFIiETyKKzan8qRBSxqznKmtYOD4Uq115n6Tis/+HVNlG0EZ06G/veA QJLHnD4Zsc6KQIHUukgF1g2N+B15hTVrUsaEYaiKPm3y1MAt5PutbY39agFQFjvNr/Mt ZWe3VLuK/o2eepZizPP1FHb593KJ96aI7ITbDhHLZ0uTvF9XpcOR/S7zDMdb3xUaGPNh /O5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=SiTIWAva; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id m80-v6si16316771pfj.48.2018.10.02.17.44.16; Tue, 02 Oct 2018 17:44:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=SiTIWAva; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 573507950E; Wed, 3 Oct 2018 00:44:14 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by mail.openembedded.org (Postfix) with ESMTP id EF73E751D2 for ; Wed, 3 Oct 2018 00:44:12 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id i4-v6so717349pgq.9 for ; Tue, 02 Oct 2018 17:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eBDZP/fOEGP8889b6CWNwYyqfU2UTXYWHMTssvD67lU=; b=SiTIWAvaBKIdlJ2ijIW+4663sd+8bZfl1PeBTOvGaftJpVCLyDE/O7CLtVAHNZG/bF IrgeLZMXb3NhbS0bDi0lhBoB9BzaDveNGE0G3/W7yRWbGZGo2HWk9jtZ3SgfIit2W0WH IZYYS7mnQYIDQFl7ISmUX1/8bURZ021OeIN57Com6Q5ngIijm++2+wf91jKSZhg7ffcC VKbTHNTn54hbdo3x9CJ7+M1td+q9svmQKI7ltBx+4votNL7zdZwiF5rNXA95+X1YrC0P 3JtFbYXPNeFV0i7iQh/RDzP5vuuq/9JboalxF0e2EpWDzU84bJUpJnIYED6pTFjuzDTB MmbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eBDZP/fOEGP8889b6CWNwYyqfU2UTXYWHMTssvD67lU=; b=F2G9T/8Wso7ecm2wFEoG08m+mzFKfRaAdhKGql8r4zWSnAn6wr8zcRyuGZ9IlgQhvL v4MHmhx2pB74SETD6x3t8EVXNj0kYPkM75LB+wyzwRtMr+yfDHzFKingzorCAbu9rrpU ElkELdh88IDVIe2e1nnQpgSCJk1PglOkZILLSn6RbiY39T31OoB2Ys7qfdxzXq0Mgf4l L6h3vYYBuh2ethgJz8EpZZXf2Sa4zfTTVz67mk6Qrr+xxSBkiGjvYXQywxNQ0akGmEmp 7Tjp1Eb8zDH6GnyIxkdXCnt56shmKKDKs/7nveVqHXcPguqplJx88oLEql+qb+4HpEDW M2gQ== X-Gm-Message-State: ABuFfojOC+Iw37BCFyk7Al/bzYSWndAKa2rBknarsyqaHUyqgqdTNCmF Ile3nRyvWGjamJ6oTTXBmJM7YlLx X-Received: by 2002:a65:664e:: with SMTP id z14-v6mr16077392pgv.347.1538527453691; Tue, 02 Oct 2018 17:44:13 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::fd07]) by smtp.gmail.com with ESMTPSA id j15-v6sm21652391pfn.52.2018.10.02.17.44.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 17:44:13 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Tue, 2 Oct 2018 17:44:05 -0700 Message-Id: <20181003004405.34524-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Subject: [OE-core] [PATCH V3] mesa: Disable asm on musl X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Musl started blocking dlopen of libs with initial-exec references into dynamic TLS area, via https://github.com/kraj/musl/commit/5c2f46a214fceeee3c3e41700c51415e0a4f1acd prior to that commit, musl was loading it and silently letting subsequent TLS accesses via the miscompiled code clobber memory that didn't belong to them This was wrong behavior and it relied on additional space reserved by libc in TLS space to adjust fo such broken libs, but it also fails with glibc if the reserved space was already used up Right fix is that mesa should be patched to remove all the initial-exec hacks and use real TLS, and -mtls-dialect=gnu2 (TLSDESC) should be used on archs it's supported on (i386, x86_64, and aarch64) to make up for the lost performance, but mesa hardcodes the initial-exec, so there must be a reason that probably is better known to mesa devs. but we 'fixed' it for musl by adding --disable-glx-tls for mesa in OE, which uses pthread_getspecific instead and makes is lot slower. this caused additional problems with security flags on, it get textrels in .text segment. Therefore this is 'second fix' to get us through this warning. Cause is some unknown part of mesa's x86 assembly code is broken by readonly text segments [ YOCTO #12918 ] Signed-off-by: Khem Raj --- V3: Disable asm just on x86, since it works well elsewhere meta/recipes-graphics/mesa/mesa.inc | 2 ++ 1 file changed, 2 insertions(+) -- 2.19.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 8d0e2cb67c..0dfdfbd5b4 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -108,6 +108,8 @@ PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind" EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls" EXTRA_OECONF_append_libc-musl = " --disable-glx-tls" +EXTRA_OECONF_append_libc-musl_x86 = " --disable-asm" + # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"