From patchwork Wed Oct 3 00:40:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 148037 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp5805163lji; Tue, 2 Oct 2018 17:40:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV62RRXMrv7Nm3QrcAkpsrrwRVQV55C/+mX6pSTCS5+hVaBSGOo9D/nSLV2tOdjEMKalsQ4Vu X-Received: by 2002:a65:43cd:: with SMTP id n13-v6mr10904676pgp.185.1538527214715; Tue, 02 Oct 2018 17:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538527214; cv=none; d=google.com; s=arc-20160816; b=jtDVIXa/sIztDkSZmHCYTE2TrrzrfR4lWD1O5SYL8WrVTb7zJTxsq+uhXtzKCB8Fj0 GxogfBlFFJbrXW76ASpBEXnRYGmaEqdmKIFd4rDygr3eFowZmPhiAcQRY7K/496AcLVH x04uI2HhOzGFYiqBuHzV8rvccV7nbKyJ9ANa2K6r4MtsPdNIpqzn6Z9GVt3g7zUY9frt da7ZKngKXpAKR6ti4fPc2aMkdurWH/s892AbN00XnSHEv97LaRqdSajCDo9X1qUcOWhU L9qLbkf9BJqd+ja7QNontKo6vcFCG1qAIUSMoyYLvupcGhdbV4RbfRGtMeacj5R87Xhz jR9A== 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=EzeKbRAIXjtzCauk0V7xuwe6Z8DF0h4jKn9onpAGTVY=; b=Kt58Yz8Jm/r6cwRtSSosUg604rY2BtlUMPcDHzxlVMXbIOvqjdI9giv2QFWoltZWll tCq5oGUfTf3Kg4VzAMPU6jqILhrNVKCpRI8hxcYM76bv+WURM0X33kLeBYZDUQp0tRCg tNBQvywoKlwQRHjQBog0hjkzfNBE+qVsPEhSVJ6e7gc1SgYCMiw6QtTjws/7sH7i2F22 QIYd2AjWzf5CIryivTdTd+O/nuM5nNYAqHplL707TEt5us4h+N7FQ5vDm0yISMYvOyPU bhu3qOm88lQfvNH6U1Rn73gRtjG2SleHcZi/gqdEy5Oo+HV8OrNXdT8envIRYEoCfD4c 0MNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=YGFKqC3S; 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 d92-v6si17941918pld.75.2018.10.02.17.40.13; Tue, 02 Oct 2018 17:40:14 -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=YGFKqC3S; 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 CF621746A8; Wed, 3 Oct 2018 00:40:10 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by mail.openembedded.org (Postfix) with ESMTP id 8049474588 for ; Wed, 3 Oct 2018 00:40:09 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id y15-v6so2549086plr.12 for ; Tue, 02 Oct 2018 17:40:10 -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=eIysqE4Ib2txAf7W01WzJNvq2Inh9YBRfC7NIUWoEMc=; b=YGFKqC3S3z5y+hd+8HlYTnn2BSHXJpQRAyQ4yzOjkIcBb4NVLu380bO5pp1Prg7AVz xe7Vnekcn24h6eePrDcCaIVjx5ennc1/qS6jb/DDyIUmbbY75mCReH2jInM/MM1HNoQ+ woqn4J3F5BRThXum3DnKS+hBXxsOT26Lz59BzufIO86DatWEHHPfsrWgCsJLqw9kKNLe 0zLc2BuvkabALju7UIzBJePufDgWDZzYrZToKK0zpHe3ImfblPxOcErSIGluUS1UBFxW Gm9geqtWcLRhtpSbVMs8ybvcfYGl0ps5VnWeHKrges/aLyyAA35K+ebCDj2MUFS87sL1 ZA3w== 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=eIysqE4Ib2txAf7W01WzJNvq2Inh9YBRfC7NIUWoEMc=; b=OhWHUGO6J5lTYIDkCV8fTSm09UPRVXQKNFhEK/2bgIoLN/NGWwaHXQHmtyFR/J9yQT iOIuMmV3eGd4vvkFd4yEEt79pfyM7lCNRxAUVMKT//9nc9wh6BjziH5CQuUxDo/x90lw xf3EVO7Js1imgGu+uKJqvGd7Rrk7GL3Tui5EayWG8cgXJxv5bPzS39nEkhz027oNX3N8 EofWVyZ25YgzqP6jR1G42n0K9E6xuLcmXy6idZAKQAb8Hh4cSA7OYT8Sl1r2C0OFsyoO 2J/sAbFX1JEh9CmNC862v1t6r+6S8Hl1B1bONXdlZ4aLuhnX6jERgWIynMzpZ9h9NFu5 D/EA== X-Gm-Message-State: ABuFfohse86Vrp8OLvhpRS7jnvbWRtZNXZHuA/npPGPg2VRJJc3qMC/W qfDMVBTXe+Ji3YbTj96tflkIa26C X-Received: by 2002:a17:902:1e2:: with SMTP id b89-v6mr19150388plb.296.1538527209973; Tue, 02 Oct 2018 17:40:09 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::fd07]) by smtp.gmail.com with ESMTPSA id d186-v6sm29503240pfg.173.2018.10.02.17.40.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 17:40:09 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Tue, 2 Oct 2018 17:40:02 -0700 Message-Id: <20181003004002.34090-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Subject: [OE-core] [PATCH V2] 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 --- meta/recipes-graphics/mesa/mesa.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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..e6f3712706 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}" 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 = " --disable-asm --disable-glx-tls" # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"