aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc
AgeCommit message (Collapse)Author
2018-04-05glibc-package: Avoid race sstate races with do_stash_localeRichard Purdie
The change to make do_stash_locale an sstate task between do_install and do_package has some unforeseen problems since the function deletes part of ${D} but may or may not run depending on whether the task is installed from sstate. This cleans up the current "pre packaging" function to be more deterministic and result in the same set of files, whichever code path we end up reaching that point by. Its not an ideal sitation but it should avoid the race failures we've seen on some builds. (From OE-Core rev: 2a60bba00da9c4e2b1a1ce30e509dba82cc6c94a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05glibc: Separate locale files to their own sstate taskRichard Purdie
Putting the locale and script files into the sysroot for use by their specific recipes used to be a simple way to share the files. With RSS, we don't want to copy these into many different recipes so put these files in their own sstate task. (From OE-Core rev: c283f2532851e2a65e08fe7b3fd71c5d9abb70f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05glibc-locale.inc: avoid duplicate packagesJuro Bystricky
PACKAGES_DYNAMIC contained an identical set of packages twice. I suspect this was a result of global search/replace when moving recipes from eglibc to glibc long time ago. (From OE-Core rev: 9d0f0fa80ffbafc2d4a1df0fa3ac5d84396a8182) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05glibc-locale.inc: fix typo in commentGianfranco Costamagna
(From OE-Core rev: 74ef87b31e33436e82f4985fa99b570726a5e564) Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com> Signed-off-by: Lorenzo Chianura <lorenzo.chianura@abinsula.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05cross-localedef-native: add way to specify which locale archive to writeRoss Burton
localedef has no way to specify which locale archive to use, and the compile-time default isn't useful as it points to the work directory. Add support to read an environmental variable for the path, and don't fail to write a new locale archive. (From OE-Core rev: bf0f205a3c3714926649bd69db29e4df1c0ea112) (From OE-Core rev: 38b0e8d9b1944a955e4ed682184dafdce20db4b9) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05glibc: relocate locale paths in nativesdkRoss Burton
nativesdk is built with a specific prefix but this will be different at install time, however glibc hard-codes the path to locale files. Expand these strings to 4K and move them to a magic segment which we can relocate when the SDK is installed. (From OE-Core rev: 59e0679378aac27c4fea0b06721e0a184a93c100) (From OE-Core rev: c1f220f89496de51d3aa6eacd42cd8d3ddaad104) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: e1faf9ac7e89d33aba33547ede19a10aaa034207) Fixup patch Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05glibc: don't use host locales in nativesdkRoss Burton
(From OE-Core rev: d7ded85766852689a0d774c896a11d0609004ab2) (From OE-Core rev: 152e045f42a66a0f74f6c097213f023c2c740292) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-07glibc-common.inc: set CVE_PRODUCT to glibcMikko Rapeli
All recipes which include this .inc map to glibc NVD component. Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 613a13725db4e05539974cc7c66584a287d7b4bd) Signed-off-by: Ruslan Ruslichenko <rruslich@cisco.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-12-08glibc: CVE-2017-15670Thiruvadi Rajaraman
Source: git://sourceware.org/git/glibc.git MR: 76647 Type: Security Fix Disposition: Backport from glibc-2.27 ChangeID: f4494e472d36748c2b3171a91640b26c638f6e0b Description: CVE-2017-15670: glob: Fix one-byte overflow [BZ #22320] Affects: glibc < 2.27 Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com> Reviewed-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Armin Kuster <akuster@mvista.com>
2017-12-08glibc: Security fix for CVE-2017-8804Rajkumar Veer
Source: https://sourceware.org MR: 74337 Type: Security Fix Disposition: Backport from https://sourceware.org/ml/libc-alpha/2017-05/msg00105.html ChangeID: c8c51220e40185dd0ac3d657046e70b82cb94bee Description: CVE-2017-8804 sunrpc: xdr_bytes/xdr_string need to free buffer on error [BZ #21461] Affects: glibc < 2.25 Signed-off-by: Rajkumar Veer <rveer@mvista.com> Reviewed-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Armin Kuster <akuster@mvista.com>
2017-12-08glibc: Fix CVE-2017-1000366George McCollister
Add backported patches from the upstream release/2.24/master branch to fix CVE-2017-1000366. Also add a backported patch that resolves SSE related build problems introduced by these patches. Signed-off-by: George McCollister <george.mccollister@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-12-08glibc: Fix CVE-2015-5180George McCollister
Add backported patch to fix CVE-2015-5180 from the upstream release/2.24/master branch. Signed-off-by: George McCollister <george.mccollister@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-12-07cross-localedef-native: Include locale_t.hJoshua Watt
Newer versions of glibc (2.26) moved the struct locale definition from xlocale.h to bits/types/locale_t.h. For compatibility with build hosts using this version of glibc, include this header. See f0be25b6336db7492e47d2e8e72eb8af53b5506d in glibc Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13glibc-locale: add runtime dependency on glibcMartin Jansa
* the libc.so.6 dependency is detected always: $ grep FILERDEPENDS BUILD-*/pkgdata/qemux86/runtime/localedef BUILD-bad/pkgdata/qemux86/runtime/localedef:FILERDEPENDSFLIST_localedef: /usr/bin/localedef BUILD-bad/pkgdata/qemux86/runtime/localedef:FILERDEPENDS_/usr/bin/localedef_localedef: libc.so.6(GLIBC_2.15) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.0) libc.so.6 BUILD-ok/pkgdata/qemux86/runtime/localedef:FILERDEPENDSFLIST_localedef: /usr/bin/localedef BUILD-ok/pkgdata/qemux86/runtime/localedef:FILERDEPENDS_/usr/bin/localedef_localedef: libc.so.6(GLIBC_2.15) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.0) libc.so.6 * but in some builds the glibc dependency isn't built soon enough: $ diff -uNr BUILD-*/pkgdata/qemux86/runtime/localedef --- BUILD-bad/pkgdata/qemux86/runtime/localedef 2017-09-02 21:17:50.000000000 +0000 +++ BUILD-ok/pkgdata/qemux86/runtime/localedef 2017-09-11 10:15:49.954381592 +0000 @@ -6,6 +6,7 @@ LICENSE: GPLv2 & LGPLv2.1 DESCRIPTION_localedef: glibc: compile locale definition files SUMMARY: Locale data from glibc +RDEPENDS_localedef: glibc (>= 2.26) SECTION: base PKG_localedef: localedef FILES_localedef: /usr/bin/localedef and the build fails with QA issues: http://errors.yoctoproject.org/Errors/Details/155529/ ERROR: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6(GLIBC_2.0), but no providers found in RDEPENDS_localedef? [file-rdeps] ERROR: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6(GLIBC_2.15), but no providers found in RDEPENDS_localedef? [file-rdeps] ERROR: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6(GLIBC_2.3), but no providers found in RDEPENDS_localedef? [file-rdeps] ERROR: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6(GLIBC_2.2), but no providers found in RDEPENDS_localedef? [file-rdeps] ERROR: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6(GLIBC_2.1), but no providers found in RDEPENDS_localedef? [file-rdeps] ERROR: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6, but no providers found in RDEPENDS_localedef? [file-rdeps] ERROR: QA run found fatal errors. Please consider fixing them. * reproducible with Yocto 2.2 Morty as well, with slightly different error message: ERROR: glibc-locale-2.24-r0 do_package_qa: QA Issue: /usr/bin/localedef contained in package localedef requires libc.so.6(GLIBC_2.4), but no providers found in RDEPENDS_localedef? [file-rdeps] * cherry-picked from master 2d2b4d7383c93174fe8eeb72440e81345df71295 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29glibc: fix pthread_cond_broadcast issue (arm)Catalin Enache
pthread_mutex functions such as pthread_cond_wait(), pthread_mutex_unlock() return errors after PTHREAD_PRIO_INHERIT is enabled Reference: https://sourceware.org/bugzilla/show_bug.cgi?id=18463 Upstream patches: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=f0e3925bf3b8df6940c3346db17e42615979d458 https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=13cb8f76da9d9420330796f469dbf10643ba5b12 https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=23b5cae1af04f2d912910fdaf73cb482265798c1 https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=ed19993b5b0d05d62cc883571519a67dae481a14 https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=2e4cf778972573221e9b87fd992844ea9b67b9bf https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=abff18c0c6055ca5d1cd46923fd1205c057139a5 This issue is Morty specific (glibc 2.24). The issue is no longer present in glibc 2.25 (master branch). Signed-off-by: Catalin Enache <catalin.enache@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-08-29glibc: Security fix CVE-2016-6323Armin Kuster
arm: mark __startcontext as .cantunwind, GNU CVE: CVE-2016-6323 Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-05-18glibc: Fix use after free in pthread_create()Yuanjie Huang
[BZ 20116] -- https://sourceware.org/bugzilla/show_bug.cgi?id=20116 The commit documents the ownership rules around 'struct pthread' and when a thread can read or write to the descriptor. With those ownership rules in place it becomes obvious that pd->stopped_start should not be touched in several of the paths during thread startup, particularly so for detached threads. In the case of detached threads, between the time the thread is created by the OS kernel and the creating thread checks pd->stopped_start, the detached thread might have already exited and the memory for pd unmapped. As a regression test we add a simple test which exercises this exact case by quickly creating detached threads with large enough stacks to ensure the thread stack cache is bypassed and the stacks are unmapped. Before the fix the testcase segfaults, after the fix it works correctly and completes without issue. For a detailed discussion see: https://www.sourceware.org/ml/libc-alpha/2017-01/msg00505.html (cherry-picked from commit f8bf15febcaf137bbec5a61101e88cd5a9d56ca8) Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11glibc: Enable backtrace from abort on ARMYuanjie Huang
ARM stack frames for abort and raise were limited to the the actual abort and raise call, such as: Obtained 4 stack frames. ./test-app(print_trace+0x1c) [0x10a08] ./test-app() [0x10b3c] /lib/libc.so.6(__default_sa_restorer+0) [0x4adae1e0] /lib/libc.so.6(gsignal+0xa0) [0x4adacf74] This is not terribly useful when trying to figure out what function may have called called the abort, especially when using pthreads. After the change the trace would now look like: Obtained 8 stack frames. ./test-app(print_trace+0x1c) [0x10a08] ./test-app() [0x10b3c] /lib/libc.so.6(__default_sa_restorer+0) [0x4befe1e0] /lib/libc.so.6(gsignal+0xa0) [0x4befcf74] /lib/libc.so.6(abort+0x134) [0x4befe358] ./test-app(dummy_function+0x50) [0x10adc] ./test-app(main+0xd4) [0x10c24] /lib/libc.so.6(__libc_start_main+0x114) [0x4bee7a58] (From OE-Core rev: 93bf8713d8e13c278543baea94fb8dad0cb80e49) Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2016-10-07glibc: Add mipsisa{32, 64}r6{el, } supportZubair Lutfullah Kakakhel
Add support for MIPS Release 6 ISA The loader is located at a new place for multiarch. For more details, check https://wiki.debian.org/Multiarch and https://sourceware.org/glibc/wiki/ABIList#mips Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28SDK: Allow changing SDKMACHINE without wiping TMP folderJuro Bystricky
When changing SDKMACHINE, we may encounter an error forcing us to wipe the TMP folder. Since only SDK_ARCH is captured in the PN of the crosssdk recipes, changes to SDK_OS result in conflicts. Eventually we hit the error: ERROR: ...: The recipe <...> is trying to install files into a shared area when those files already exist. The build has stopped as continuing in this scenario WILL break things This patchset addresses the problem by SDK_SYS as the recipe name suffix instead of SDK_ARCH. [YOCTO #9281] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-27glibc-initial: use python3 instead of python (v2)Markus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-13glibc: remove hard-coded reference to gcc -EJérémy Rosen
Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-03glibc-scripts: add RDEPENDS on libsotruss package required by sotruss scriptJagadeesh Krishnanjanappa
It solves below error observed on qemux86 target: root@qemux86:~# sotruss ./hello ERROR: ld.so: object '/usr/$LIB/audit/sotruss-lib.so' cannot be loaded as audit interface: cannot open shared object file; ignored. Hello World root@qemux86:~# With this change, we get: root@qemux86:~# sotruss ./hello hello -> libc.so.6 :*__libc_start_main(0x8048300, 0x1, 0xbfc86274) hello -> libc.so.6 :*puts(0x804851c, 0xb74af000, 0x0) Hello World root@qemux86:~# Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-23glibc: Fix scope resolution in glibc to be breadth first.Mark Hatle
The ELF specification indicates symbol resolution should be breadth first, not depth first. The dl-deps.c: dl_build_locale_scope function is processing in a depth first mode. This is causes certain symbols to be incorrectly reported when LD_TRACE_PRELINKING=1 is enabled. See glibc BZ #20488 for more information. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-07glibc: Switch to 2.24 release branchKhem Raj
glibc 2.24 is released now https://www.sourceware.org/ml/libc-alpha/2016-08/msg00212.html Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-07-21glibc: Update to 2.24 after hard-freezeKhem Raj
Drop upstreamed patch Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20glibc: use the host locale archive in nativesdk buildsRoss Burton
The nativesdk libc when used by buildtools has a hard requirement on supporting a UTF-8 locale because Python 3 needs a UTF-8 locale. However we currently only ship the C locale, which means that Python attempts to lookup the user's locale (for example, en_NZ.UTF-8) in the locale archive under it's prefix it fails and falls back to C. This the results in Python using ASCII instead of UTF-8 for file encoding, and bitbake breaks. Th obvious solution would be to ship all locales, but this would add approximately 250MB to the size of the buildtools tarball (which is currently around 30MB). Generating a binary locale archive reduces this down to 100MB, but this is still a drastic increase in footprint. If we ship a subset of locales in the tarball then there will be users whose locale isn't in the tarball, and they'll have to change their locale to an "approved" one, which isn't the best of messages to send to new users. The alternative is to tell the nativesdk libc that the locale archive isn't under it own prefix but is in fact at /usr/lib/locale/locale-archive, so the buildtools libc uses the host locale archive. The locale archive format appears to be at least fairly stable: our glibc 2.24 can read the locale archive generated by glibc 2.17 (Centos 7). [ YOCTO #9775 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-12glibc: add more Imagination Meta relocation to elf.hRoss Burton
glibc master added the EM_METAG tag but didn't add the relocation defines. However the kernel tooling only checks for EM_METAG when defining its own values so scripts/recordmcount ends up using R_META_* symbols without their definition. Whilst the kernel can and should be fixed, this breaks all users of recordmcount so patch elf.h to add the values. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-12glibc: Upgrade to latest tip of masterKhem Raj
- libc-package.bbclass: Do not use --old-style This option has been dropped from latest glibc Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-05-21nativesdk-glibc: Extend relocation support to localesRichard Purdie
Currently locales are not found in a relocated buildtools-tarball such as that used in eSDK. This breaks bitbake when used under python3. This patch adds enough relocation magic to nativesdk-glibc so that the binary locales can be found even in a relocated buildtools-tarball and bitbake works successfully under python3. The eSDK also works correctly after this change too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-21glibc-locale: Enable binary locale generation for nativesdk-glibcRichard Purdie
python3 has much stricter locale requirements than previous versions. If a locale isn't present, python3 reverts to ascii mode under which bit bake can't operate. We therefore need working binary locales in things like uninative-tarball and buildtools-tarball. This patch enables binary locales for nativesdk-glibc. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-18glibc: Add missing patch hunk backRichard Purdie
This hunk of patch went missing during the glibc upgrade to 2.24 and without it, uninative-tarball doesn't work properly. This adds it back so we can spin a new version of uninative. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14glibc-initial.inc: fix py3 SyntaxError in cfgscript print()Tim Orling
Update so this works with python3. Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14glibc: Add recipes for 2.24 releaseKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06cross-localedef-native_2.22.bb: Use autotools configureTristan Van Berkom
Use the autotools default configure commands and just tell autotools where to run configure from. This fixes the build when running on an aarch64 host, which the prebuilt configure scripts with glibc 2.22 do not recognize. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-04-06glibc: remove unused CVE patchesRobert Yang
They were CEVs and should be already in the source after upgraded. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31ldconfig-native: Fix ELF flags on 64-bit binariesClemens Lang
Yocto's ldconfig-native was exported from an old version of glibc and generates an ld.so.cache that is partially ignored by current versions of glibc when loading libraries. This occurs for 64-bit binaries, where glibc expects FLAG_ELF_LIBC6, but ldconfig-native only generates the standard ELF flag. Fix this with an additional patch on top of the patch for now. You can verify this by applying the patch below to your target copy of glibc and running LD_DEBUG=libs /lib64/ld-linux-x86-64.so.2 --list $anybinary --- ./elf/dl-cache.c.orig 2016-01-07 11:05:36.823447171 +0100 +++ ./elf/dl-cache.c 2016-01-07 11:19:53.925878628 +0100 @@ -106,6 +106,8 @@ if (_dl_cache_check_flags (flags) \ && _dl_cache_verify_ptr (lib->value)) \ { \ + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))\ + _dl_debug_printf (" considering file %s\n", cache_data + lib->value); \ if (best == NULL || flags == GLRO(dl_correct_cache_id)) \ { \ HWCAP_CHECK; \ @@ -117,6 +119,9 @@ searching. */ \ break; \ } \ + } else { \ + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)) \ + _dl_debug_printf (" ignoring file %s due to flags %x, expected %x\n", cache_data + lib->value, lib->flags, GLRO(dl_correct_cache_id)); \ } \ } \ while (++middle <= right); \ @@ -265,14 +270,23 @@ /* Only accept hwcap if it's for the right platform. */ #define HWCAP_CHECK \ - if (lib->hwcap & hwcap_exclude) \ + if (lib->hwcap & hwcap_exclude) { \ + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)) \ + _dl_debug_printf (" hwcap mismatch %x vs. %x\n", lib->hwcap, hwcap_exclude); \ continue; \ - if (GLRO(dl_osversion) && lib->osversion > GLRO(dl_osversion)) \ + } \ + if (GLRO(dl_osversion) && lib->osversion > GLRO(dl_osversion)) { \ + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)) \ + _dl_debug_printf (" os version mismatch %x vs. %x\n", lib->osversion, GLRO(dl_osversion)); \ continue; \ + } \ if (_DL_PLATFORMS_COUNT \ && (lib->hwcap & _DL_HWCAP_PLATFORM) != 0 \ - && (lib->hwcap & _DL_HWCAP_PLATFORM) != platform) \ - continue + && (lib->hwcap & _DL_HWCAP_PLATFORM) != platform) { \ + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)) \ + _dl_debug_printf (" platform mismatch %x vs. %x\n", lib->hwcap & _DL_HWCAP_PLATFORM, platform); \ + continue; \ + } SEARCH_CACHE (cache_new); } else This version of ldconfig-native should really be replaced with a version matching the glibc source in use on the target platform. Signed-off-by: Clemens Lang <clemens.lang@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-07glibc: Add relocation of GCONV_PATHRichard Purdie
We're seeing various failures where nativesdk glibc can't find the gconv modules. We've tried various workaround but this needs fixing 'properly'. One significant problem is knowing when a binary would use this glibc and hence when to set the path and when not to. Add the default path to its own special section which the sdk relocation script already knows how to handle and remap. This significantly improves the usability of uninative. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-28glibc.inc: improve optimisation level sanity checkingAndre McCurdy
- Avoid code duplication to handle -O, -O1 and -Os cases - Consider the effective optimisation level only (avoids spurious warnings if multiple optimisation flags are present). - Prefix warnings with PN instead of hardcoding "glibc" (avoids confusing warnings since the test is also applied to glibc-initial, nativesdk-glibc, nativesdk-glibc-initial, etc, and each could potentually have different optimisation flags). Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-21glibc: Upgrade to 2.23Khem Raj
Drop kconfig and options-group support Forward port cross-localedef support Assume ssp support in libc when building gcc-initial Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-02-18glibc: Security fix CVE-2015-7547Armin Kuster
CVE-2015-7547: getaddrinfo() stack-based buffer overflow Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18glibc: CVE-2015-8776Armin Kuster
it was found that out-of-range time values passed to the strftime function may cause it to crash, leading to a denial of service, or potentially disclosure information. Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18glibc: CVE-2015-9761Armin Kuster
A stack overflow vulnerability was found in nan* functions that could cause applications which process long strings with the nan function to crash or, potentially, execute arbitrary code. Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18glibc: CVE-2015-8779Armin Kuster
A stack overflow vulnerability in the catopen function was found, causing applications which pass long strings to the catopen function to crash or, potentially execute arbitrary code. Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18glibc: CVE-2015-8777.patchArmin Kuster
The process_envvars function in elf/rtld.c in the GNU C Library (aka glibc or libc6) before 2.23 allows local users to bypass a pointer-guarding protection mechanism via a zero value of the LD_POINTER_GUARD environment variable. Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07glibc-locale: fix QA warningArmin Kuster
WARNING: QA Issue: glibc-locale: /glibc-binary-localedata-sd-in/usr/lib/locale/sd_IN/LC_CTYPE is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated] fix type Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-06cross-localedef-native: add ABI breaking glibc patchJens Rehsack
Add patch from commit 96b1b5c127e9e0e637aaf7948cf3330a94a5cd57 to cross-localedef-native to avoid broken images built with ENABLE_BINARY_LOCALE_GENERATION set to 1: $ sh -c "export LANG=de_DE; ls -la" sh: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed. Aborted Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-30glibc.inc: do not immediate expand SELECTED_OPTIMIZATIONHongxu Jia
We need to expand SELECTED_OPTIMIZATION later, so do not immediate expansion, and do the work in anonymous python function. It is reasonable to give an error for -O0. [YOCTO #7058] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-29glibc-testing.inc: drop pruning of PATCH_GET from the testglibc scriptAndre McCurdy
PATCH_GET is no longer exported by bitbake.conf, so no longer needs to be pruned from the glibc do_compile() environment. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-26meta: fix capitalisation in Upstream-StatusRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>