]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
5 years agocve-update-db-native: don't hardcode the database name
Ross Burton [Sun, 8 Dec 2019 18:35:52 +0000 (20:35 +0200)]
cve-update-db-native: don't hardcode the database name

Don't hardcode the database filename, there's a variable for this in
cve-check.bbclass.

(From OE-Core rev: 0d188a9dc4ae64c64cd661e9d9c3841e86f226ab)

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>
5 years agocve-update-db-native: don't refresh more than once an hour
Ross Burton [Sun, 8 Dec 2019 18:35:51 +0000 (20:35 +0200)]
cve-update-db-native: don't refresh more than once an hour

We already fetch the yearly CVE metadata and check that for updates before
downloading the full data, but we can speed up CVE checking further by only
checking the CVE metadata once an hour.

(From OE-Core rev: 50d898fd360c58fe85460517d965f62b7654771a)

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>
5 years agocve-check: we don't actually need to unpack to check
Ross Burton [Sun, 8 Dec 2019 18:35:50 +0000 (20:35 +0200)]
cve-check: we don't actually need to unpack to check

The patch scanner works with patch files in the layer, not in the workdir, so it
doesn't need to unpack.

(From OE-Core rev: 2cba6ada970deb5156e1ba0182f4f372851e3c17)

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>
5 years agocve-check: failure to parse versions should be more visible
Ross Burton [Sun, 8 Dec 2019 18:35:49 +0000 (20:35 +0200)]
cve-check: failure to parse versions should be more visible

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agocve-check: ensure all known CVEs are in the report
Ross Burton [Sun, 8 Dec 2019 18:35:48 +0000 (20:35 +0200)]
cve-check: ensure all known CVEs are in the report

CVEs that are whitelisted or were not vulnerable when there are version
comparisons were not included in the report, so alter the logic to ensure that
all relevant CVEs are in the report for completeness.

(From OE-Core rev: 98256ff05fcfe9d5ccad360582c36eafb577c264)

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>
5 years agosdk: Install nativesdk locales for all TCLIBC variants
Khem Raj [Thu, 26 Sep 2019 05:15:59 +0000 (22:15 -0700)]
sdk: Install nativesdk locales for all TCLIBC variants

install_locales() here is actually operating on nativesdk and only glibc
is the default library for nativesdk, since thats what most of
desktop/server distros use, therefore bailing out based on TCLIBC is not
needed here, since nativesdk-glibc would be required for all non-glibc
targetting SDKs as well.

Fixes SDK install time error

ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:
Your system needs to support the en_US.UTF-8 locale.
ERROR: SDK preparation failed

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibpcap: upgrade 1.9.0 -> 1.9.1
Zang Ruochen [Tue, 19 Nov 2019 09:39:33 +0000 (11:39 +0200)]
libpcap: upgrade 1.9.0 -> 1.9.1

-libpcap/0001-pcap-usb-linux.c-add-missing-limits.h-for-musl-syste.patch
 Removed since this is included in 1.9.1.

Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
[CVE-2018-16301 CVE-2019-15161 CVE-2019-15162 CVE-2019-15163 CVE-2019-15164 CVE-2019-15165]
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoprocps: whitelist CVE-2018-1121
Ross Burton [Tue, 5 Nov 2019 21:44:48 +0000 (23:44 +0200)]
procps: whitelist CVE-2018-1121

This CVE is about race conditions in 'ps' which make it unsuitable for security
audits.  As these race conditions are unavoidable ps shouldn't be used for
security auditing, so this isn't a valid CVE.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agowebkitgtk: set CVE_PRODUCT
Chen Qi [Tue, 5 Nov 2019 21:44:47 +0000 (23:44 +0200)]
webkitgtk: set CVE_PRODUCT

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibsndfile1: whitelist CVE-2018-13419
Ross Burton [Tue, 5 Nov 2019 21:44:45 +0000 (23:44 +0200)]
libsndfile1: whitelist CVE-2018-13419

This is a memory leak that nobody else can replicate and has been rejected by
upstream.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibxfont2: set CVE_PRODUCT
Chen Qi [Tue, 5 Nov 2019 21:44:44 +0000 (23:44 +0200)]
libxfont2: set CVE_PRODUCT

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibpam: set CVE_PRODUCT
Ross Burton [Tue, 5 Nov 2019 21:44:43 +0000 (23:44 +0200)]
libpam: set CVE_PRODUCT

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoboost: set CVE vendor to Boost
Ross Burton [Tue, 5 Nov 2019 21:44:42 +0000 (23:44 +0200)]
boost: set CVE vendor to Boost

There's a Boost module for Drupal.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoed: set CVE vendor to avoid false positives
Ross Burton [Tue, 5 Nov 2019 21:44:41 +0000 (23:44 +0200)]
ed: set CVE vendor to avoid false positives

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agosubversion: set CVE vendor to Apache
Ross Burton [Tue, 5 Nov 2019 21:44:40 +0000 (23:44 +0200)]
subversion: set CVE vendor to Apache

There's a Jenkins plugin for Subversion.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agogit: set CVE vendor to git-scm
Ross Burton [Tue, 5 Nov 2019 21:44:39 +0000 (23:44 +0200)]
git: set CVE vendor to git-scm

There's a Jenkins plugin for Git.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoflex: set CVE_PRODUCT to include vendor
Ross Burton [Tue, 5 Nov 2019 21:44:38 +0000 (23:44 +0200)]
flex: set CVE_PRODUCT to include vendor

There are many projects called Flex and they have CVEs, so also set the vendor
to remove these false positives.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoopenssl: set CVE vendor to openssl
Anuj Mittal [Tue, 5 Nov 2019 21:44:37 +0000 (23:44 +0200)]
openssl: set CVE vendor to openssl

Differentiate it from openssl gem for Ruby.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython: update to 2.7.17
Alexander Kanavin [Mon, 18 Nov 2019 14:28:40 +0000 (15:28 +0100)]
python: update to 2.7.17

Drop backports, rebase a couple of patches.

This is the second last release of py 2.x; upstream support ends on
1 January 2020, there will be one final 2.x afterwards.

Note that the only thing that still needs python 2.x in oe-core is
u-boot; when the next u-boot update arrives, we should find out
where the py3 migration is for that component before merging the
update.

(From OE-Core rev: 184b60eb905bb75ecc7a0c29a175e624d8555fac)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
[Minor fixup for warrior context]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython: fix CVE-2018-20852
Anuj Mittal [Wed, 31 Jul 2019 04:54:54 +0000 (12:54 +0800)]
python: fix CVE-2018-20852

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython: fix CVE-2019-16935
Chen Qi [Sun, 17 Nov 2019 23:23:34 +0000 (07:23 +0800)]
python: fix CVE-2019-16935

(From OE-Core rev: 1a7593bcdaf8a8cf15259aee8a0e2686247f2987)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agobind: fix CVE-2019-6471 and CVE-2018-5743
Kai Kang [Fri, 22 Nov 2019 02:04:26 +0000 (10:04 +0800)]
bind: fix CVE-2019-6471 and CVE-2018-5743

Backport patches to fix CVE-2019-6471 and CVE-2018-5743 for bind.
CVE-2019-6471 is fixed by 0001-bind-fix-CVE-2019-6471.patch and the
other 6 patches are for CVE-2018-5743. And backport one more patch to
fix compile error on arm caused by these 6 commits.

(From OE-Core rev: 3c39d4158677b97253df63f23b74c3a9dd5539f6)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agofile: fix CVE-2019-18218
Ross Burton [Mon, 4 Nov 2019 12:14:55 +0000 (12:14 +0000)]
file: fix CVE-2019-18218

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>
5 years agopatch: the CVE-2019-13638 fix also handles CVE-2018-20969
Ross Burton [Mon, 4 Nov 2019 12:27:13 +0000 (12:27 +0000)]
patch: the CVE-2019-13638 fix also handles CVE-2018-20969

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>
5 years agopseudo: Add statx support to fix fedora30 issues
Richard Purdie [Wed, 6 Nov 2019 13:20:01 +0000 (13:20 +0000)]
pseudo: Add statx support to fix fedora30 issues

Modern distros (e.g. fedora30) are starting to use the new statx() syscall through
the newly exposed glibc wrapper function in software like coreutils (e.g. the ls
command). Add support to intercept this to pseudo.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
[Fixup for warrior context]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopseudo: Drop static linking to sqlite3
Richard Purdie [Fri, 8 Nov 2019 14:36:36 +0000 (14:36 +0000)]
pseudo: Drop static linking to sqlite3

Back in 2010[1] we made pseudo statically link against sqlite3. Since then
the world has changed, pseudo now has separate processes for the database
in the server and the client and they have separate linking commands.

Also, whilst there were concerns about needing specific versions of sqlite3,
in the OE environment, this is always the case.

[1] http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=ad0ac0ecd38fc77daf42485489fccc10a5e1e3e7

The static sqlite3-native is causing us problems, in particular:

tmp/work/x86_64-linux/pseudo-native/1.9.0+gitAUTOINC+060058bb29-r0/recipe-sysroot-native/usr/lib/libsqlite3.a(sqlite3.o):(.data.rel+0xb0): undefined reference to `fcntl64'

which occurs if sqlite3-native was built on a machine with glibc 2.28 or later
and pseudo-native is being built on glibc before that. With dyanmical linking,
libc is backwards compatible and works but with static linking it does not.

There appears to be no easy way to avoid this other than adding a copy of
sqlite3 into the pseudo recipe. Given the static linking doesn't seem to
be required any longer due to the separate processes, drop that to fix
those issues.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopseudo: Fix openat() with a symlink pointing to a directory
Jason Wessel [Mon, 5 Aug 2019 16:32:37 +0000 (09:32 -0700)]
pseudo: Fix openat() with a symlink pointing to a directory

While working with ostree disk generation in conjunction with wic, I
found a problem with pseudo where it tried to resolve a symlink when
it shouldn't, based on openat() flags. A C program has been
constructed to test pseudo to show that it is working properly with
the correct behavior around openat().

 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <dirent.h>
 #include <unistd.h>
 #include <fcntl.h>

int main()
{
    /*
     * Tested with: gcc -Wall -o app app.c ; echo "no pseudo" ;
     * ./app ; echo "pseudo"; pseudo ./app
     */
    system("rm -rf tdir tlink");
    system("mkdir tdir");
    system("ln -s tdir tlink");
    DIR *dir = opendir(".");
    int dfd = dirfd(dir);

    int target_dfd = openat (dfd, "tlink", O_RDONLY | O_NONBLOCK |
                             O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW);
    if (target_dfd == -1) {
        printf("Test 1 good\n");
    } else {
        printf("Test 1 failed\n");
        close(target_dfd);
    }
    target_dfd = openat (dfd, "tlink", O_RDONLY | O_NONBLOCK |
                         O_DIRECTORY | O_CLOEXEC);
    if (target_dfd == -1) {
        printf("Test 2 failed\n");
    } else {
        printf("Test 2 good\n");
        close(target_dfd);
    }
    /* Test 3 make sure the owner of the link is root  */
    struct stat sbuf;
    if (!lstat("tlink", &sbuf) && sbuf.st_uid == 0) {
        printf("Test 3 good\n");
    } else {
        printf("Test 3 failed\n");
    }
    /* Test 4 tests open with the "rb" flag, owner should not change */
    int ofd = openat(dfd,"./tlink", O_RDONLY|O_CLOEXEC);
    if (ofd >= 0) {
        if (fstat(ofd, &sbuf) != 0)
            printf("ERROR in fstat test 4\n");
        else if (sbuf.st_uid == 0)
            printf("Test 4 good\n");
        close(ofd);
    } else {
        printf("Test 4 failed with openat()\n");
    }
    /* Test pseudo db to see the fstat() above did not delete the DB entry */
    if (!lstat("tlink", &sbuf) && sbuf.st_uid == 0)
        printf("Test 5 good\n");
    else
        printf("Test 5 failed... tlink is owned by %i and not 0\n", sbuf.st_uid);
    return 0;
}

int main()
{
    /* Tested with: gcc -Wall -o app app.c ; echo "no pseudo" ; ./app ; echo "pseudo"; pseudo ./app */
    system("rm -rf tdir tlink");
    system("mkdir tdir");
    system("ln -s tdir tlink");
    DIR *dir = opendir(".");
    int dfd = dirfd(dir);

    int target_dfd = openat (dfd, "tlink", O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW);
    if (target_dfd == -1) {
        printf("This is right\n");
    } else {
        printf("This is broken\n");
    }
    return 0;
}

Many thanks to Peter Seebach for fixing the problem in the pseudo code
to use the same logic which was already there for the
AT_SYMLINK_NOFOLLOW.

Also updated is the license MD5 checksum since the master branch of
pseudo has had the SPDX data updated.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: Upgrade 3.7.4 -> 3.7.5
Adrian Bunk [Tue, 5 Nov 2019 21:38:13 +0000 (23:38 +0200)]
python3: Upgrade 3.7.4 -> 3.7.5

Backported patch removed.

3.7.5 also includes the fix for CVE-2019-16935.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: CVE-2019-16056
Chen Qi [Wed, 9 Oct 2019 08:36:39 +0000 (16:36 +0800)]
python3: CVE-2019-16056

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: fix the test_locale output format
Mingli Yu [Mon, 5 Aug 2019 09:38:18 +0000 (02:38 -0700)]
python3: fix the test_locale output format

Before this patch:
 # python3 -m test -v test_locale
 [snip]
 test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9') ok
 [snip]

 After this patch:
 # python3 -m test -v test_locale
 [snip]
 test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9')... ok
 [snip]

Make the test ended with "... ok" is common in python
unittest world, we should make it keep consistent
with other test cases in case it may be ignored to
record in the report if we use the common filter
"... ok".

[YOCTO #13298]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: Fix .pyc file reproduciblility
Joshua Watt [Thu, 27 Jun 2019 13:53:17 +0000 (08:53 -0500)]
python3: Fix .pyc file reproduciblility

Applies a patch to python that makes the pre-compiled .pyc files
generated during the build reproducible.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: Reformat sysconfig
Joshua Watt [Fri, 21 Jun 2019 13:35:54 +0000 (08:35 -0500)]
python3: Reformat sysconfig

Reformats the sysconfig file when packaging. This file is output by
using the python pprint function. This function will wrap long lines at
80 characters by default, and will even split strings at whitespace
boundaries to do so, e.g.:

 'A': 'B is really'
    ' long'

This causes a problem for reproducibility however because there might be
lines of differing lengths depending on the build path. These
non-reproducible paths are removed, but their effect on string wrapping
from pprint remains.

To correct this, reformat the entire sysconfig file by re-printing using
pprint with an (effectively) unlimited line length.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: python3: Fix build error x86->x86
Ricardo Ribalda Delgado [Wed, 19 Jun 2019 09:44:55 +0000 (11:44 +0200)]
python3: python3: Fix build error x86->x86

When building x86->x86 the system will try to execute .so and related items
from the default PYTHONPATH.  This will fail if the target CPU contains
instructions that the host CPU does not have, add CROSSPYTHONPATH
into PYTHONPATH so we can prepend the list to find correct libs.

Fixes:

Illegal instruction (core dumped)
Makefile:625: recipe for target 'sharedmods' failed
make: *** [sharedmods] Error 132
make: *** Waiting for unfinished jobs....

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: fix build on softfloat mips
Matthias Schoepfer via Openembedded-core [Thu, 6 Jun 2019 16:07:18 +0000 (18:07 +0200)]
python3: fix build on softfloat mips

This patch originally only meant to correct the python3 build for mips
with softfloat, as the original test only checked for mips hardfloat.

Replaced custom C Program for triplet detection with autotools triplet
detection.

Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
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>
5 years agopython3: fix do_install fail for parallel buiild
Changqing Li [Wed, 8 May 2019 10:05:27 +0000 (18:05 +0800)]
python3: fix do_install fail for parallel buiild

When using make -j with the 'install' target, it's possible for altbininstall
(which normally creates BINDIR) and libainstall (which doesn't, though it
installs python-config there) to race, resulting in a failure due to
attempting to install python-config into a nonexistent BINDIR. Ensure it also
exists in the libainstall target.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibxslt: fix CVE-2019-18197
Joe Slater [Wed, 6 Nov 2019 18:45:54 +0000 (10:45 -0800)]
libxslt: fix CVE-2019-18197

Use patch from upstream after 1.1.33 release.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibtiff: fix CVE-2019-17546
Joe Slater [Wed, 6 Nov 2019 18:45:53 +0000 (10:45 -0800)]
libtiff: fix CVE-2019-17546

Apply unmodified patch from upstream.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agotiff: fix CVE-2019-14973
Trevor Gamblin [Fri, 20 Sep 2019 18:25:11 +0000 (14:25 -0400)]
tiff: fix CVE-2019-14973

CVE reference: https://nvd.nist.gov/vuln/detail/CVE-2019-14973
Upstream merge: https://gitlab.com/libtiff/libtiff/commit/2218055c

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
[fixup for Warrior context]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolib/oe/lsb: Make sure the distro ID is always lowercased
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:39 +0000 (23:08 +0100)]
lib/oe/lsb: Make sure the distro ID is always lowercased

In commit 8689e561 (lib/oe/lsb: attempt to ensure consistent distro id
regardless of source), the distro ID returned by
oe.lsb.distro_identifier() was lowercased, but only if a release
version is also present.

This changes the code to always lowercase the distro ID, including the
default distro ID "unknown", which is used if no other ID can be
identified.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agodevtool: finish: Add suppport for the --no-clean option
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:38 +0000 (23:08 +0100)]
devtool: finish: Add suppport for the --no-clean option

This works just like the already existing --no-clean option to the
`devtool reset` command.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agodevtool: finish: Keep patches ordered when updating bbappend
Niclas Svensson [Tue, 5 Nov 2019 22:08:37 +0000 (23:08 +0100)]
devtool: finish: Keep patches ordered when updating bbappend

The _get_patchset_revs() function returns the patches in an
OrderedDict to keep them ordered. However, this information was lost
when the patches were added to the bbappend file.

Signed-off-by: Niclas Svensson <niclas.svensson@axis.com>
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agotzdata: Correct the packaging of /etc/localtime and /etc/timezone
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:36 +0000 (23:08 +0100)]
tzdata: Correct the packaging of /etc/localtime and /etc/timezone

During restructuring of the packaging in 2af4d6eb (tzdata: Install
everything by default), these two files remained in the tzdata
package, which is supposed to be empty. Move them to tzdata-core where
they belong.

Also simplify the definition of CONFFILES_tzdata-core. As its value
only takes effect for files that actually exist, there is no need to
complicate its definition by checking if a file is created before
adding it to the list of configuration files.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopackage_rpm.bbclass: Remove a misleading bb.note()
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:35 +0000 (23:08 +0100)]
package_rpm.bbclass: Remove a misleading bb.note()

It should have been removed in 3db9d865 (classes/package_rpm.bbclass:
Enhance diagnostic messages) when it was split in two new notes.

Also change the casing of two other notes to align them with the other
notes.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agodevtool: Avoid failure for recipes with S == WORKDIR and no local files
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:34 +0000 (23:08 +0100)]
devtool: Avoid failure for recipes with S == WORKDIR and no local files

When extracting the sources for a recipe that has S == WORKDIR and no
local files in the SRC_URI (which, e.g., can happen for a recipe with
a URI that has the unpack=false attribute), the extraction fails with
the following backtrace:

  Traceback (most recent call last):
    File ".../scripts/devtool", line 344, in <module>
      ret = main()
    File ".../scripts/devtool", line 331, in main
      ret = args.func(args, config, basepath, workspace)
    File ".../poky/scripts/lib/devtool/standard.py", line 762, in
    modify
      initial_rev, _ = _extract_source(srctree, args.keep_temp,
      args.branch, False, config, basepath, workspace,
      args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
    File ".../poky/scripts/lib/devtool/standard.py", line 647, in
    _extract_source
      bb.process.run('git %s commit -a -m "Committing local file
      symlinks\n\n%s"' % (' '.join(useroptions),
      oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
    File ".../poky/bitbake/lib/bb/process.py", line 178, in run
      raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
  bb.process.ExecutionError: Execution of 'git commit -a -m
  "Committing local file symlinks

  %% ignore"' failed with exit code 1:
  On branch devtool
  nothing to commit, working tree clean

This is because no files were found in the oe-local-files directory
and consequently no symbolic links were added using `git add`, but the
`git commit` command was still executed.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agonativesdk-meson: Remove some unused variables
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:33 +0000 (23:08 +0100)]
nativesdk-meson: Remove some unused variables

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agomeson.bbclass: Remove the MESON_*_ARGS variables
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:32 +0000 (23:08 +0100)]
meson.bbclass: Remove the MESON_*_ARGS variables

The options in ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} are already passed
via ${CC}/${CXX} and there is no reason to pass them a second time. Thus
we can remove MESON_TOOLCHAIN_ARGS. And when it is removed, the other
MESON_*_ARGS variables revert to the standard CFLAGS, CXXFLAGS and
LDFLAGS, so just use them directly instead.

Apart from the obvious improvement with not passing a lot of options
twice, this also solves a problem where -pie would be passed on the
command line in a way that it would prevent building any dynamic
libraries using meson if using a toolchain that is not built with
--enable-default-pie and if security_flags.inc is used.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agomeson: Backport patch to handle strings in cross file args
Peter Kjellerstedt [Tue, 5 Nov 2019 22:08:31 +0000 (23:08 +0100)]
meson: Backport patch to handle strings in cross file args

This allows <language>_args and <language>_link_args properties, e.g.,
c_link_args, in meson.cross to be specified as either a string or a
list.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agogo-1.12: update to 1.12.9 minor release
Khem Raj [Thu, 31 Oct 2019 19:27:56 +0000 (19:27 +0000)]
go-1.12: update to 1.12.9 minor release

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agogo: Upgrade 1.12.5 -> 1.12.6
Adrian Bunk [Thu, 31 Oct 2019 19:27:55 +0000 (19:27 +0000)]
go: Upgrade 1.12.5 -> 1.12.6

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agogo: update 1.12.1->1.12.5
Alexander Kanavin [Thu, 31 Oct 2019 19:27:54 +0000 (19:27 +0000)]
go: update 1.12.1->1.12.5

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobuild-appliance-image: Update to warrior head revision 2019-04.2-warrior
Richard Purdie [Wed, 30 Oct 2019 13:55:57 +0000 (13:55 +0000)]
build-appliance-image: Update to warrior head revision

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoqemu: update to 3.1.1.1
Armin Kuster [Tue, 29 Oct 2019 09:47:32 +0000 (10:47 +0100)]
qemu: update to 3.1.1.1

bug fix only update.

Drop patches included in update.

For full set of changes, see: https://git.qemu.org/?p=qemu.git;a=shortlog;h=refs/tags/v3.1.1.1

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agogo: fix CVE-2019-16276
Chen Qi [Tue, 29 Oct 2019 09:47:31 +0000 (10:47 +0100)]
go: fix CVE-2019-16276

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e31f87e289dfd3bbca961e927447a9c7ba816d3f)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit e02e8fa2e82cceaaa6a433466f52f97b0984762a)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosudo: fix CVE-2019-14287
Changqing Li [Tue, 29 Oct 2019 09:47:30 +0000 (10:47 +0100)]
sudo: fix CVE-2019-14287

In Sudo before 1.8.28, an attacker with access to a Runas ALL sudoer
account can bypass certain policy blacklists and session PAM modules,
and can cause incorrect logging, by invoking sudo with a crafted user
ID. For example, this allows bypass of !root configuration, and USER=
logging, for a "sudo -u \#$((0xffffffff))" command.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 4e11cd561f2bdaa6807cf02ee7c9870881826308)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit b1e0149c41e3c344a0496e64ab3b0c9dd4685ea4)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibgcrypt: fix CVE-2019-12904
Yi Zhao [Tue, 29 Oct 2019 09:47:29 +0000 (10:47 +0100)]
libgcrypt: fix CVE-2019-12904

In Libgcrypt 1.8.4, the C implementation of AES is vulnerable to a
flush-and-reload side-channel attack because physical addresses are
available to other processes. (The C implementation is used on platforms
where an assembly-language implementation is unavailable.)

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2019-12904

Patches from:
https://github.com/gpg/libgcrypt/commit/1374254c2904ab5b18ba4a890856824a102d4705
https://github.com/gpg/libgcrypt/commit/daedbbb5541cd8ecda1459d3b843ea4d92788762
https://github.com/gpg/libgcrypt/commit/a4c561aab1014c3630bc88faf6f5246fee16b020

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 37e390ff05b6a4509019db358ed496731d80cc51)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 4c207cb1ad46c0d2005ab3eae70d78c937e084b5)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoopenssl: make OPENSSL_ENGINES match install path
George McCollister [Tue, 29 Oct 2019 09:47:28 +0000 (10:47 +0100)]
openssl: make OPENSSL_ENGINES match install path

Set OPENSSL_ENGINES to the path where engines are actually installed.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 59565fec0b3f3e24eb01c03b671913599cd3134d)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 578f41124565a7cda738c7fe3d25702ee41b08ed)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython: Fix CVE-2019-10160
Changqing Li [Tue, 29 Oct 2019 09:47:27 +0000 (10:47 +0100)]
python: Fix CVE-2019-10160

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit b4240b585d7fcac2fdbf33a8e72d48cb732eb696)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 10d87a3085665a959a5fda64ae3895cb27ddf343)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython: CVE-2019-16056
Chen Qi [Tue, 29 Oct 2019 09:47:26 +0000 (10:47 +0100)]
python: CVE-2019-16056

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 27be9cf71a6fe906a23e81b56f1cc18a6fc9ef97)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython: add tk-lib as runtime dependency for python-tkinter
Yi Zhao [Tue, 29 Oct 2019 09:47:25 +0000 (10:47 +0100)]
python: add tk-lib as runtime dependency for python-tkinter

Fixes:
ERROR: python-2.7.16-r0 do_package_qa: QA Issue:
/usr/lib/python2.7/lib-dynload/_tkinter.so contained in package
python-tkinter requires libtk8.6.so, but no providers found in
RDEPENDS_python-tkinter? [file-rdeps]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit f78248a2380bbbbf271b5bb02c762f5bc7a3a92e)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython: include CVE patches for python-native as well
Anuj Mittal [Tue, 29 Oct 2019 09:47:24 +0000 (10:47 +0100)]
python: include CVE patches for python-native as well

Also avoids maintaining a different set of patches for both.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit b3b1c00cc46b33ddbf7e008267032220e1e298af)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibcroco: Fix two CVEs
Muminul Islam [Tue, 29 Oct 2019 09:47:23 +0000 (10:47 +0100)]
libcroco: Fix two CVEs

CVE: CVE-2017-8834 CVE-2017-8871

Signed-off-by: Muminul Islam <muislam@microsoft.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolinux-yocto: add drm-bochs support
Alexander Kanavin [Tue, 29 Oct 2019 09:47:22 +0000 (10:47 +0100)]
linux-yocto: add drm-bochs support

This allows better modesetting support for the '-vga std'
emulated hardware provided by Qemu, which we want to
standardize on.

See here for background:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13466

(From OE-Core rev: 569d3f5d0454ed31f2f6df29f1703246a3dcd715)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolinux-yocto/4.19: make drm-bochs feature available
Bruce Ashfield [Tue, 29 Oct 2019 09:47:21 +0000 (10:47 +0100)]
linux-yocto/4.19: make drm-bochs feature available

The other active kernel versions have this feature available. To
consistently enable the same video output for qemu, we can cherry
pick the feature to 4.19.

(From OE-Core rev: a777e0f34e106455f963bd58fd8728a16c588c4d)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokernel-yocto: import security fragments from meta-security
Bruce Ashfield [Tue, 29 Oct 2019 09:47:20 +0000 (10:47 +0100)]
kernel-yocto: import security fragments from meta-security

Adding the following fragments from meta-security to make them
centrally available and easier to maintain:

   283939d5c9e kernel-cache: add yama security fragments
   0b86f3fa241 kernel-cache: add ima fragments
   731b466654d kernel-cache: add smack
   813afe8ff47 kernel-cache: add apparmor fragments

(From OE-Core rev: 3063d64984e993d3e7dc2f4c80fb74005f5d6d7e)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolinux-yocto: arch/x86/boot: use prefix map to avoid embedded paths
Bruce Ashfield [Tue, 29 Oct 2019 09:47:19 +0000 (10:47 +0100)]
linux-yocto: arch/x86/boot: use prefix map to avoid embedded paths

>From the kernel patch:

[
    It was observed that the kernel embeds the path in the x86 boot
    artifacts.

    From https://bugzilla.yoctoproject.org/show_bug.cgi?id=13458:

    [
       If you turn on the buildpaths QA test, or try a reproducible build, you
       discover that the kernel image contains build paths.

       $ strings bzImage-5.0.19-yocto-standard |grep tmp/
       out of pgt_buf in
       /data/poky-tmp/reproducible/tmp/work-shared/qemux86-64/kernel-source/arch/x86/boot/compressed/kaslr_64.c!?

       But what's this in the top-level Makefile:

       $ git grep prefix-map
       Makefile:KBUILD_CFLAGS  += $(call
       cc-option,-fmacro-prefix-map=$(srctree)/=)

       So the __FILE__ shouldn't be using the full path.  However
       arch/x86/boot/compressed/Makefile has this:

       KBUILD_CFLAGS := -m$(BITS) -O2

       So that clears KBUILD_FLAGS, removing the -fmacro-prefix-map option.
    ]

    Other architectures do not clear the flags, but instead prune before
    adding boot or specific options. There's no obvious reason why x86 isn't
    doing the same thing (pruning vs clearing) and no build or boot issues
    have been observed.

    So we make x86 can do the same thing, and we no longer have embedded paths.
]

This issue has been reported upstream, and a patch submission is
pending, but for now, we'll soak the proposed patch in linux-yocto to
see if any issues are found

[YOCTO: #13458]

(From OE-Core rev: 78b0ff5960814af935a8089ec49c51d76f148149)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolinux-yocto: bsp/beaglebone: support qemu -machine virt
Bruce Ashfield [Tue, 29 Oct 2019 09:47:18 +0000 (10:47 +0100)]
linux-yocto: bsp/beaglebone: support qemu -machine virt

While we don't normally do a dual h/w and virt BSP (since they
tend to have conflicting requirements over time). A minimal overhead
option to do this was submitted to linux-yocto. Since it has no
impact on the h/w reference, has SDK testing value and can serve
as a template on how to do this for other arm boards, it is worth
making the configuration available.

The original commit log follows:

[

   If the kernel supports Qemu's virt machine, runqemu works almost for free.
   The device tree for machine virt is included in Qemu, which simplifies
   everything quite a bit.
   This change adds ARCH_VIRT=y and some drivers to the beaglebone kernel
   configuration which allows to:

     export MACHINE="beaglebone-yocto"
     bitbake core-image-minimale
     runqemu

   This also works out of an eSDK. Whithout this feature usually two
   different SDKs need to be compiled and maintained. One SDK is used for development
   in Qemu, another one is used to develop for the real target hardware.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
]

(From OE-Core rev: cc1fca6d464775daa15032f11c02d16b99759407)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolinux-yocto/5.0: make scsi-debug include scsi core configs
Bruce Ashfield [Tue, 29 Oct 2019 09:47:17 +0000 (10:47 +0100)]
linux-yocto/5.0: make scsi-debug include scsi core configs

Updating the scsi-debug fragment to include the core scsi config
options. This allows standalone use of the fragment, since all
supporting options will be enabled simply by including the top
level config in a BSP.

This also removes a configuration warning on qemuarm, since we
will no longer have missing / unavailable options during the
config audit.

(From OE-Core rev: c65826e96a77928938fef69fc0cbc65ec7431cb2)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolinux-yocto/5.0: bsp: add basic xilinx zynqmp support
Bruce Ashfield [Tue, 29 Oct 2019 09:47:16 +0000 (10:47 +0100)]
linux-yocto/5.0: bsp: add basic xilinx zynqmp support

Zumeng Chen has added core/basic support for the zynqmp that is bootable
using the 5.0 and 5.2-rcX kernels. This makes the fragments available
for future refinement and factoring. A bootlog follows:

    ZynqMP> setenv bootargs console=ttyPS0,115200 root=/dev/mmcblk0p3 rw
    rootwait earlycon=cdns,mmio,0xFF000000 clk_ignore_unused ip=dhcp
    ZynqMP> tftpboot 0x10000000 Image; tftpboot 0x11800000 dtb; booti
    0x10000000 - 0x11800000
    Using ethernet@ff0e0000 device

    Filename 'Image'.
    Load address: 0x10000000
    Loading:
      ###########
      11.3 MiB/s
    done
    Bytes transferred = 16378368 (f9ea00 hex)
    Using ethernet@ff0e0000 device
    TFTP from server 128.224.162.211; our IP address is 128.224.162.99
    Filename 'dtb'.
    Load address: 0x11800000
    Loading: ##
      4.7 MiB/s
    done
    Bytes transferred = 19746 (4d22 hex)
Booting using the fdt blob at 0x11800000
Loading Device Tree to 0000000007ff8000, end 0000000007fffd21 ... OK

    Starting kernel ...

    Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    Linux version 5.2.0-rc3-yoctodev-standard (oe-user@oe-host) (gcc version
    9.1.0 (GCC)) #1 SMP PREEMPT Thu Jun 6 00:53:26 UTC 2019
    Machine model: ZynqMP ZCU102 Rev1.0
    earlycon: cdns0 at MMIO 0x00000000ff000000 (options '')
    printk: bootconsole [cdns0] enabled
    efi: Getting EFI parameters from FDT:
    efi: UEFI not found.
    cma: Reserved 16 MiB at 0x000000007ec00000
    psci: probing for conduit method from DT.
    psci: PSCIv1.1 detected in firmware.
    psci: Using standard PSCI v0.2 function IDs
    psci: MIGRATE_INFO_TYPE not supported.
    psci: SMC Calling Convention v1.1
    percpu: Embedded 30 pages/cpu s83416 r8192 d31272 u122880
    Detected VIPT I-cache on CPU0
    CPU features: detected: ARM erratum 845719
    Speculative Store Bypass Disable mitigation not required
    Built 1 zonelists, mobility grouping on.  Total pages: 1031940
    Kernel command line: console=ttyPS0,115200 root=/dev/mmcblk0p3 rw
    rootwait earlycon=cdns,mmio,0xFF000000 clk_ignore_unused ip=dhcp
    Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
    Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
    software IO TLB: mapped [mem 0x7ac00000-0x7ec00000] (64MB)
    Memory: 4013572K/4193280K available (10748K kernel code, 1210K rwdata,
    2764K rodata, 1216K init, 757K bss, 163324K reserved, 16384K
    cma-reserved)
    SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    ftrace: allocating 36121 entries in 142 pages
    rcu: Preemptible hierarchical RCU implementation.
    rcu:    RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
     Tasks RCU enabled.
    rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
    rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
    NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
    GIC: Adjusting CPU interface base to 0x00000000f902f000
    GIC: Using split EOI/Deactivate mode
    random: get_random_bytes called from start_kernel+0x328/0x4c4 with
    crng_init=0
    arch_timer: cp15 timer(s) running at 99.99MHz (phys).
    clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles:
    0x170f8de2d3, max_idle_ns: 440795206112 ns
    sched_clock: 56 bits at 99MHz, resolution 10ns, wraps every
    4398046511101ns
    Console: colour dummy device 80x25
    Calibrating delay loop (skipped), value calculated using timer
    frequency.. 199.98 BogoMIPS (lpj=399960)
    pid_max: default: 32768 minimum: 301
    LSM: Security Framework initializing
    Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
    Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
    *** VALIDATE proc ***
    *** VALIDATE cgroup1 ***
    *** VALIDATE cgroup2 ***
    ASID allocator initialised with 32768 entries
    rcu: Hierarchical SRCU implementation.
    EFI services will not be available.
    smp: Bringing up secondary CPUs ...
    Detected VIPT I-cache on CPU1
    CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
    Detected VIPT I-cache on CPU2
    CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
    Detected VIPT I-cache on CPU3
    CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
    smp: Brought up 1 node, 4 CPUs
    SMP: Total of 4 processors activated.
    CPU features: detected: 32-bit EL0 Support
    CPU features: detected: CRC32 instructions
    CPU: All CPU(s) started at EL2
    alternatives: patching kernel code
    devtmpfs: initialized
    clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff,
    max_idle_ns: 7645041785100000 ns
    futex hash table entries: 1024 (order: 4, 65536 bytes)
    xor: measuring software checksum speed
8regs     :  2360.000 MB/sec
32regs    :  2706.000 MB/sec
arm64_neon:  2018.000 MB/sec
    xor: using function: 32regs (2706.000 MB/sec)
    DMI not present or invalid.
    NET: Registered protocol family 16
    cpuidle: using governor ladder
    hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
    DMA: preallocated 256 KiB pool for atomic allocations
    ï¿½ï¿½É¥ï¿½ï¿½Ñ­ console [ttyPS0] enabled 0xff000000 (irq = 33, base_baud =
    6250000) is a xuartps
    printk: console [ttyPS0] enabled
    printk: bootconsole [cdns0] disabled
    printk: bootconsole [cdns0] disabled
    ff010000.serial: ttyPS1 at MMIO 0xff010000 (irq = 34, base_baud =
    6250000) is a xuartps
    HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
    HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
    HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
    HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
    raid6: neonx8   gen()  1518 MB/s
    raid6: neonx8   xor()  1442 MB/s
    raid6: neonx4   gen()  1471 MB/s
    raid6: neonx4   xor()  1409 MB/s
    raid6: neonx2   gen()  1128 MB/s
    raid6: neonx2   xor()  1175 MB/s
    raid6: neonx1   gen()   737 MB/s
    raid6: neonx1   xor()   887 MB/s
    raid6: int64x8  gen()  1166 MB/s
    raid6: int64x8  xor()   763 MB/s
    raid6: int64x4  gen()   983 MB/s
    raid6: int64x4  xor()   739 MB/s
    raid6: int64x2  gen()   683 MB/s
    raid6: int64x2  xor()   601 MB/s
    raid6: int64x1  gen()   452 MB/s
    raid6: int64x1  xor()   462 MB/s
    raid6: using algorithm neonx8 gen() 1518 MB/s
    raid6: .... xor() 1442 MB/s, rmw enabled
    raid6: using neon recovery algorithm
    vgaarb: loaded
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    media: Linux media interface: v0.10
    videodev: Linux video capture interface: v2.00
    pps_core: LinuxPPS API ver. 1 registered
    pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti
    <giometti@linux.it>
    PTP clock support registered
    EDAC MC: Ver: 3.0.0
    FPGA manager framework
    clocksource: Switched to clocksource arch_sys_counter
    *** VALIDATE hugetlbfs ***
    NET: Registered protocol family 2
    tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768
    bytes)
    TCP established hash table entries: 32768 (order: 6, 262144 bytes)
    TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
    TCP: Hash tables configured (established 32768 bind 32768)
    UDP hash table entries: 2048 (order: 4, 65536 bytes)
    UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
    NET: Registered protocol family 1
    RPC: Registered named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    PCI: CLS 0 bytes, default 64
    hw perfevents: no interrupt-affinity property for /pmu, guessing.
    hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
    kprobes: failed to populate blacklist: -22
    Please take care of using kprobes.
    workingset: timestamp_bits=46 max_order=20 bucket_order=0
    NFS: Registering the id_resolver key type
    Key type id_resolver registered
    Key type id_legacy registered
    jffs2: version 2.2. ï¿½Â© 2001-2006 Red Hat, Inc.
    Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
    io scheduler mq-deadline registered
    io scheduler kyber registered
    nwl-pcie fd0e0000.pcie: Link is DOWN
    nwl-pcie fd0e0000.pcie: host bridge /amba/pcie@fd0e0000 ranges:
    nwl-pcie fd0e0000.pcie:   MEM 0xe0000000..0xefffffff -> 0xe0000000
    nwl-pcie fd0e0000.pcie:   MEM 0x600000000..0x7ffffffff -> 0x600000000
    nwl-pcie fd0e0000.pcie: PCI host bridge to bus 0000:00
    pci_bus 0000:00: root bus resource [bus 00-ff]
    pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
    pci_bus 0000:00: root bus resource [mem 0x600000000-0x7ffffffff pref]
    pci 0000:00:00.0: [10ee:d021] type 01 class 0x060400
    pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot
    pci 0000:00:00.0: PCI bridge to [bus 01-0c]
    pcieport 0000:00:00.0: PME: Signaling with IRQ 37
    xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
    xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
    xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
    xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
    xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
    xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
    xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
    xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
    cacheinfo: Unable to detect cache hierarchy for CPU 0
    brd: module loaded
    loop: module loaded
    ahci-ceva fd0c0000.ahci: AHCI 0001.0301 32 slots 2 ports 6 Gbps 0x3 impl
    platform mode
    ahci-ceva fd0c0000.ahci: flags: 64bit ncq sntf pm clo only pmp fbs pio
    slum part ccc sds apst
    scsi host0: ahci-ceva
    scsi host1: ahci-ceva
    ata1: SATA max UDMA/133 mmio [mem 0xfd0c0000-0xfd0c1fff] port 0x100 irq
    31
    ata2: SATA max UDMA/133 mmio [mem 0xfd0c0000-0xfd0c1fff] port 0x180 irq
    31
    libphy: Fixed MDIO Bus: probed
    CAN device driver interface
    libphy: MACB_mii_bus: probed
    Generic PHY ff0e0000.ethernet-ffffffff:0c: attached PHY driver [Generic
    PHY] (mii_bus:phy_addr=ff0e0000.ethernet-ffffffff:0c, irq=POLL)
    macb ff0e0000.ethernet eth0: Cadence GEM rev 0x50070106 at 0xff0e0000
    irq 20 (00:0a:35:04:9a:86)
    dwc3 fe200000.usb: Failed to get clk 'ref': -2
    dwc3 fe200000.usb: Configuration mismatch. dr_mode forced to host
    xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
    xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f625 hci version 0x100 quirks
    0x0000000002010010
    xhci-hcd xhci-hcd.0.auto: irq 35, io mem 0xfe200000
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
    xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0  SuperSpeed
    usb usb2: We don't know the algorithms for LPM for this host, disabling
    LPM.
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 1 port detected
    usbcore: registered new interface driver usb-storage
    rtc_zynqmp ffa60000.rtc: registered as rtc0
    pca953x 0-0020: 0-0020 supply vcc not found, using dummy regulator
    GPIO line 322 (sel0) hogged as output/low
    GPIO line 323 (sel1) hogged as output/high
    GPIO line 324 (sel2) hogged as output/high
    GPIO line 325 (sel3) hogged as output/high
    pca953x 0-0021: 0-0021 supply vcc not found, using dummy regulator
    cdns-i2c ff020000.i2c: 400 kHz mmio ff020000 irq 22
    cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 23
    i2c i2c-0: Added multiplexed i2c bus 2
    i2c i2c-0: Added multiplexed i2c bus 3
    i2c i2c-0: Added multiplexed i2c bus 4
    i2c i2c-0: Added multiplexed i2c bus 5
    pca954x 0-0075: registered 4 multiplexed busses for I2C mux pca9544
    at24 6-0054: 1024 byte 24c08 EEPROM, writable, 1 bytes/write
    i2c i2c-1: Added multiplexed i2c bus 6
    i2c i2c-7: of_i2c: modalias failure on
    /amba/i2c@ff030000/i2c-mux@74/i2c@1/clock-generator@36
    i2c i2c-7: Failed to create I2C device for
    /amba/i2c@ff030000/i2c-mux@74/i2c@1/clock-generator@36
    i2c i2c-1: Added multiplexed i2c bus 7
    si570 8-005d: registered, current frequency 300000000 Hz
    i2c i2c-1: Added multiplexed i2c bus 8
    si570 9-005d: clock registration failed
    si570: probe of 9-005d failed with error -17
    i2c i2c-1: Added multiplexed i2c bus 9
    i2c i2c-10: of_i2c: modalias failure on
    /amba/i2c@ff030000/i2c-mux@74/i2c@4/clock-generator@69
    i2c i2c-10: Failed to create I2C device for
    /amba/i2c@ff030000/i2c-mux@74/i2c@4/clock-generator@69
    i2c i2c-1: Added multiplexed i2c bus 10
    i2c i2c-1: Added multiplexed i2c bus 11
    i2c i2c-1: Added multiplexed i2c bus 12
    i2c i2c-1: Added multiplexed i2c bus 13
    pca954x 1-0074: registered 8 multiplexed busses for I2C switch pca9548
    i2c i2c-1: Added multiplexed i2c bus 14
    i2c i2c-1: Added multiplexed i2c bus 15
    i2c i2c-1: Added multiplexed i2c bus 16
    i2c i2c-1: Added multiplexed i2c bus 17
    i2c i2c-1: Added multiplexed i2c bus 18
    i2c i2c-1: Added multiplexed i2c bus 19
    i2c i2c-1: Added multiplexed i2c bus 20
    i2c i2c-1: Added multiplexed i2c bus 21
    pca954x 1-0075: registered 8 multiplexed busses for I2C switch pca9548
    ina2xx 2-0040: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 2-0041: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 2-0042: power monitor ina226 (Rshunt = 5000 uOhm)
    ata1: SATA link down (SStatus 0 SControl 330)
    ina2xx 2-0043: power monitor ina226 (Rshunt = 5000 uOhm)
    ata2: SATA link down (SStatus 0 SControl 330)
    ina2xx 2-0044: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 2-0045: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 2-0046: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 2-0047: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 2-004a: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 2-004b: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 3-0040: power monitor ina226 (Rshunt = 2000 uOhm)
    ina2xx 3-0041: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 3-0042: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 3-0043: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 3-0044: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 3-0045: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 3-0046: power monitor ina226 (Rshunt = 5000 uOhm)
    ina2xx 3-0047: power monitor ina226 (Rshunt = 5000 uOhm)
    cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer at (____ptrval____)
    with timeout 10s
    device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised:
    dm-devel@redhat.com
    EDAC MC: ECC not enabled
    cpu cpu0: failed to get clock: -2
    cpufreq-dt: probe of cpufreq-dt failed with error -2
    sdhci: Secure Digital Host Controller Interface driver
    sdhci: Copyright(c) Pierre Ossman
    sdhci-pltfm: SDHCI platform and OF driver helper
    mmc0: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    u32 classifier
 Actions configured
    NET: Registered protocol family 10
    Segment Routing with IPv6
    sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    NET: Registered protocol family 17
    can: controller area network core (rev 20170425 abi 9)
    NET: Registered protocol family 29
    can: raw protocol (rev 20170425)
    can: broadcast manager protocol (rev 20170425 t)
    can: netlink gateway (rev 20170425) max_hops=1
    Key type dns_resolver registered
    registered taskstats version 1
    Btrfs loaded, crc32c=crc32c-generic
    Key type encrypted registered
    printk: console [netcon0] enabled
    netconsole: network logging started
    rtc_zynqmp ffa60000.rtc: setting system clock to 2019-06-06T03:39:58 UTC
    (1559792398)
    macb ff0e0000.ethernet eth0: link up (1000/Full)
    pps pps0: new PPS source ptp0
    macb ff0e0000.ethernet: gem-ptp-timer ptp clock registered.
    IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    mmc0: Problem switching card into high-speed mode!
    mmc0: new SDHC card at address 0001
    mmcblk0: mmc0:0001 SD16G 14.5 GiB
    Sending DHCP requests .
      mmcblk0: p1 p2 p3
    , OK
    IP-Config: Complete:
  device=eth0, hwaddr=00:0a:35:04:9a:86, ipaddr=xxxxx,
    mask=255.255.254.0
  host=xxx, domain=corp.ad.wrs.com, nis-domain=swamp
  bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=

    clk: Not disabling unused clocks
    md: Waiting for all devices to be available before autodetect
    md: If you don't use raid, use raid=noautodetect
    md: Autodetecting RAID arrays.
    md: autorun ...
    md: ... autorun DONE.
    EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts:
    (null)
    VFS: Mounted root (ext4 filesystem) on device 179:3.
    devtmpfs: mounted
    Freeing unused kernel memory: 1216K
    Run /sbin/init as init process
    random: fast init done
    systemd[1]: systemd 242-19-gdb2e367+ running in system mode. (+PAM
    -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP
    -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN
    -)
    systemd[1]: Detected architecture arm64.

    Welcome to Wind River Linux development 19.23 Update 0!

    systemd[1]: Set hostname to <xilinx-zynqmp>.
    random: systemd: uninitialized urandom read (16 bytes read)
    systemd[1]: Initializing machine ID from random generator.
    systemd[1]: Failed to bump fs.file-max, ignoring: Invalid argument
    systemd[1]: /lib/systemd/system/dbus.socket:4: ListenStream= references
    a path below legacy directory /var/run/, updating
    /var/run/dbus/system_bus_socket ï¿½â†’ /run/dbus/system_bus_socket; please
    update the unit f.
    systemd[1]: /lib/systemd/system/rpcbind.socket:4: ListenStream=
    references a path below legacy directory /var/run/, updating
    /var/run/rpcbind.sock ï¿½â†’ /run/rpcbind.sock; please update the unit file
    accordingly.
    random: systemd: uninitialized urandom read (16 bytes read)
    systemd[1]: Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on Journal Socket (/dev/log).
    random: systemd: uninitialized urandom read (16 bytes read)
    systemd[1]: Listening on Syslog Socket.
    [  OK  ] Listening on Syslog Socket.
    systemd[1]: Listening on udev Kernel Socket.
    [  OK  ] Listening on udev Kernel Socket.
    [  OK  ] Listening on udev Control Socket.
    [  OK  ] Created slice User and Session Slice.
    [  OK  ] Listening on initctl Compatibility Named Pipe.
    [  OK  ] Reached target Swap.
    [  OK  ] Created slice system-serial\x2dgetty.slice.
    [  OK  ] Reached target Slices.
    [  OK  ] Listening on Journal Socket.
      Starting udev Coldplug all Devices...
      Mounting POSIX Message Queue File System...
      Mounting Temporary Directory (/tmp)...
      Starting Journal Service...
      Starting Remount Root and Kernel File Systems...
      Mounting Kernel Debug File System...
    EXT4-fs (mmcblk0p3): re-mounted. Opts: (null)
      Starting Create list of re�…odes for the current kernel...
    [  OK  ] Started Forward Password R�…uests to Wall Directory Watch.
    [  OK  ] Reached target Remote File Systems.
    [  OK  ] Listening on Network Service Netlink Socket.
      Starting Apply Kernel Variables...
    [  OK  ] Started Dispatch Password ï¿½â€¦ts to Console Directory Watch.
    [  OK  ] Reached target Paths.
    [  OK  ] Created slice system-getty.slice.
      Mounting Huge Pages File System...
    [  OK  ] Started Journal Service.
    [  OK  ] Mounted POSIX Message Queue File System.
    [  OK  ] Mounted Temporary Directory (/tmp).
    [  OK  ] Started Remount Root and Kernel File Systems.
    [  OK  ] Mounted Kernel Debug File System.
    [  OK  ] Started Create list of req�… nodes for the current kernel.
    [  OK  ] Started Apply Kernel Variables.
    [  OK  ] Mounted Huge Pages File System.
      Starting Create System Users...
      Starting Rebuild Hardware Database...
      Starting Flush Journal to Persistent Storage...
    [  OK  ] Started udev Coldplug all Devices.
    systemd-journald[148]: Received request to flush runtime journal from
    PID 1
    [  OK  ] Started Flush Journal to Persistent Storage.
    [  OK  ] Started Create System Users.
      Starting Create Static Device Nodes in /dev...
    [  OK  ] Started Create Static Device Nodes in /dev.
    [  OK  ] Reached target Local File Systems (Pre).
      Mounting /var/volatile...
    [  OK  ] Mounted /var/volatile.
    [  OK  ] Reached target Local File Systems.
      Starting Create Volatile Files and Directories...
      Starting Load/Save Random Seed...
    [  OK  ] Started Load/Save Random Seed.
    [  OK  ] Started Create Volatile Files and Directories.
      Starting Network Time Synchronization...
      Starting Rebuild Journal Catalog...
      Starting Update UTMP about System Boot/Shutdown...
      Starting Run pending postinsts...
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target System Time Set.
    [  OK  ] Reached target System Time Synchronized.
    [  OK  ] Started Rebuild Journal Catalog.
    [  OK  ] Started Run pending postinsts.
    [  OK  ] Started Rebuild Hardware Database.
      Starting udev Kernel Device Manager...
      Starting Update is Completed...
    [  OK  ] Started Update is Completed.
    [  OK  ] Started udev Kernel Device Manager.
    [  OK  ] Reached target System Initialization.
      Starting Console System Startup Logging...
    [  OK  ] Listening on RPCbind Server Activation Socket.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [  OK  ] Listening on dropbear.socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Reached target Basic System.
    [  OK  ] Started System Logging Service.
    [  OK  ] Started Dynamic Host Configuration Protocol (DHCP).
    [  OK  ] Started Kernel Logging Service.
      Starting Login Service...
    [  OK  ] Started D-Bus System Message Bus.
    [  OK  ] Started Xserver startup without a display manager.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timers.
      Starting Telephony service...
      Starting Network Service...
    [  OK  ] Started Console System Startup Logging.
    [  OK  ] Found device /dev/ttyPS0.
    [  OK  ] Listening on Load/Save RF ï¿½â€¦itch Status /dev/rfkill Watch.
    [  OK  ] Started Network Service.
      Starting Network Name Resolution...
    [  OK  ] Started Login Service.
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Started Telephony service.
    [  OK  ] Reached target Network.
      Starting Berkeley Internet Name Domain (DNS)...
      Starting /etc/rc.local Compatibility...
      Starting Permit User Sessions...
      Starting Avahi mDNS/DNS-SD Stack...
    [  OK  ] Started /etc/rc.local Compatibility.
    [  OK  ] Started Permit User Sessions.
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started Serial Getty on ttyPS0.
    [  OK  ] Started Avahi mDNS/DNS-SD Stack.
    [  OK  ] Started Berkeley Internet Name Domain (DNS).
    [  OK  ] Reached target Host and Network Name Lookups.

    Wind River Linux development 19.23 Update 0 xilinx-zynqmp ttyPS0

    xilinx-zynqmp login: root
    root@xilinx-zynqmp:~# uname 0a
    uname: extra operand '0a'
    Try 'uname --help' for more information.
    root@xilinx-zynqmp:~# uname -a
    Linux xilinx-zynqmp 5.2.0-rc3-yoctodev-standard #1 SMP PREEMPT Thu Jun 6
    00:53:26 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux

(From OE-Core rev: b0dc58f535a27be6c649dcf336c7dc0cdb23d96b)

Signed-off-by: Zumeng Chen <zchen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agognutls:upgrade 3.6.7 -> 3.6.8
Zang Ruochen [Tue, 29 Oct 2019 09:47:15 +0000 (10:47 +0100)]
gnutls:upgrade 3.6.7 -> 3.6.8

-Upgrade from gnutls_3.6.7.bb to gnutls_3.6.8.bb.

Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit b34486a616ab4d4b30247a5dff58a18ef26ed709)
[Bug fix only update.
Including: CVE-2019-3836 CVE-2019-3829
https://lists.gnupg.org/pipermail/gnutls-help/2019-May/004527.html]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokernel.bbclass: fix installation of modules signing certificates
Dmitry Eremin-Solenikov [Tue, 29 Oct 2019 09:47:14 +0000 (10:47 +0100)]
kernel.bbclass: fix installation of modules signing certificates

If one has provided external key/certificate for modules signing, Kbuild
will skip creating signing_key.pem and will write only signing_key.x509
certificate. Thus we have to check for .x509 file existence rather than
.pem one.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2527e731eba43bd36d0ea268aca6b03155376134)
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agouninative: Update to 2.7 release
Michael Halstead [Mon, 7 Oct 2019 16:47:57 +0000 (09:47 -0700)]
uninative: Update to 2.7 release

The 2.7 release updates glibc to version 2.30. Recently added to openSUSE
Tumbleweed and needed for Fedora Core 31.

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agomeson: Fix native patch to python3
Ricardo Ribalda Delgado [Wed, 19 Jun 2019 09:42:33 +0000 (11:42 +0200)]
meson: Fix native patch to python3

Fixes:

  File "/workdir/build/tmp/work/dbfp4-poky-linux/qv4l2/1.17.0+gitAUTOINC+95f39aae48-r0/recipe-sysroot-native/usr/lib/python3.7/site-packages/mesonbuild/dependencies/base.py", line 574, in _call_pkgbin
    cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env, use_native)
  File "/workdir/build/tmp/work/dbfp4-poky-linux/qv4l2/1.17.0+gitAUTOINC+95f39aae48-r0/recipe-sysroot-native/usr/lib/python3.7/site-packages/mesonbuild/dependencies/base.py", line 556, in _call_pkgbin_real
    cmd = self.pkgbin.get_command() + "-native" + args
TypeError: can only concatenate list (not "str") to list

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoqemu: fix build issue on new hosts with glibc 2.30
Armin Kuster [Sun, 6 Oct 2019 04:30:56 +0000 (21:30 -0700)]
qemu: fix build issue on new hosts with glibc 2.30

This fixes the following error:

TOPDIR/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:254:16: error: static declaration of â€˜gettid’ follows non-static declaration
 254 | _syscall0(int, gettid)
 |                ^~~~~~
 TOPDIR/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:185:13: note: in definition of macro â€˜_syscall0’
 185 | static type name (void)   \
 |             ^~~~
 In file included from /usr/include/unistd.h:1170,
 from TOPDIR/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/include/qemu/osdep.h:90,
 from TOPDIR/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:20:
 /usr/include/bits/unistd_ext.h:34:16: note: previous declaration of â€˜gettid’ was here
 34 | extern __pid_t gettid (void) __THROW;
 |                ^~~~~~

Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agosystemd: update SRCREV for systemd v241-stable
Jan Klare [Tue, 27 Aug 2019 14:52:04 +0000 (16:52 +0200)]
systemd: update SRCREV for systemd v241-stable

Currently systemd 241 does break for kernels 5.2+ with the error described here:
* https://github.com/systemd/systemd/issues/12784

The issue has been fixed in master and will be fixed in the release 243. The
necessary patches have been backported to systemd/systemd-stable in the branch
v241-stable, but currently in warrior an old version of that branch is pulled
in.

This patch updates the SRCREV to the latest commit from that branch and
therefore pulls in the needed fix to run systemd 241 on 5.2+ kernels.

Signed-off-by: Jan Klare <jan.klare@bisdn.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoclasses/image-live.bbclass: Don't hardcode cpio.gz
Andrii Bordunov via Openembedded-core [Thu, 26 Sep 2019 09:04:57 +0000 (11:04 +0200)]
classes/image-live.bbclass: Don't hardcode cpio.gz

There's INITRAMFS_FSTYPES that can be set differently.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agounzip: Fix CVE-2019-13232
Dan Tran [Thu, 26 Sep 2019 23:08:16 +0000 (23:08 +0000)]
unzip: Fix CVE-2019-13232

Signed-off-by: Dan Tran <dantran@microsoft.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoqemu: Fix CVE-2019-8934
Dan Tran [Sat, 5 Oct 2019 18:08:17 +0000 (11:08 -0700)]
qemu: Fix CVE-2019-8934

Signed-off-by: Dan Tran <dantran@microsoft.com>
[Fix up against lastest warrior]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agojson-c: Don't --enable-rdrand
Adrian Bunk [Sun, 29 Sep 2019 20:44:53 +0000 (23:44 +0300)]
json-c: Don't --enable-rdrand

In recent years AMD CPUs have had various problems with RDRAND
giving either non-random data or no result at all, which is
problematic if either build or target machine has a CPU with
this problem.

The fallback is /dev/urandom, and I'd trust the kernel here.

--enable-rdrand was added in an upgrade to a new upstream
version without mentioning any reason.

[YOCTO #13534]

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython3: upgrade 3.7.3 -> 3.7.4
Anuj Mittal [Tue, 1 Oct 2019 19:58:17 +0000 (22:58 +0300)]
python3: upgrade 3.7.3 -> 3.7.4

Also fixes CVE-2019-9740, CVE-2019-9948. For details, see:

https://docs.python.org/3.7/whatsnew/changelog.html#python-3-7-4-final

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
[ Backported patch removed. ]
Signed-off-by: Adrian Bunk <bunk@stusta.de>
[Bug fix only update]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agopython: update to 3.7.3
Alexander Kanavin [Tue, 1 Oct 2019 19:58:16 +0000 (22:58 +0300)]
python: update to 3.7.3

License-update: copyright years

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
[ Backported patches removed. ]
Signed-off-by: Adrian Bunk <bunk@stusta.de>
[Bug fix only update]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agorunqemu: Add support for kvm on aarch64
Richard Purdie [Tue, 1 Oct 2019 00:56:00 +0000 (17:56 -0700)]
runqemu: Add support for kvm on aarch64

The main issue is to make the x86 checks apply to x86 targets only. We may
end up with better checks on other architectures but this adapts the code to
allow for that and its still controlled by whether QB_CPU_KVM is set.

The code needed minor refactoring so the qemu-system-XXX name is set
earlier so the kvm code can use it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoqemuarm64: Add QB_CPU_KVM to allow kvm acceleration
Richard Purdie [Tue, 1 Oct 2019 00:55:59 +0000 (17:55 -0700)]
qemuarm64: Add QB_CPU_KVM to allow kvm acceleration

This allows kvm acceleration on arm systems that support it. "host" is the
best option I can find right now to attempt to use the acceleration. It
potentially might not be correct but arm systems are sensitive to the
correct values and I don't want to encode the autobuilders CPU type here.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f13788541f64774a586971ed57699e4397b38b32)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agocve-check: backport rewrite from master
Ross Burton [Wed, 25 Sep 2019 11:11:02 +0000 (12:11 +0100)]
cve-check: backport rewrite from master

As detailed at [1] the XML feeds provided by NIST are being discontinued on
October 9th 2019.  As cve-check-tool uses these feeds, cve-check.bbclass will be
inoperable after this date.

To ensure that cve-check continues working, backport the following commits from
master to move away from the unmaintained cve-check-tool to our own Python code
that fetches the JSON:

546d14135c5 cve-update-db: New recipe to update CVE database
bc144b028f6 cve-check: Remove dependency to cve-check-tool-native
7f62a20b32a cve-check: Manage CVE_PRODUCT with more than one name
3bf63bc6084 cve-check: Consider CVE that affects versions with less than operator
c0eabd30d7b cve-update-db: Use std library instead of urllib3
27eb839ee65 cve-check: be idiomatic
09be21f4d17 cve-update-db: Manage proxy if needed.
975793e3825 cve-update-db: do_populate_cve_db depends on do_fetch
0325dd72714 cve-update-db: Catch request.urlopen errors.
4078da92b49 cve-check: Depends on cve-update-db-native
f7676e9a38d cve-update-db: Use NVD CPE data to populate PRODUCTS table
bc0195be1b1 cve-check: Update unpatched CVE matching
c807c2a6409 cve-update-db-native: Skip recipe when cve-check class is not loaded.
07bb8b25e17 cve-check: remove redundant readline CVE whitelisting
5388ed6d137 cve-check-tool: remove
270ac00cb43 cve-check.bbclass: initialize to_append
e6bf9000987 cve-check: allow comparison of Vendor as well as Product
91770338f76 cve-update-db-native: use SQL placeholders instead of format strings
7069302a4cc cve-check: Replace CVE_CHECK_CVE_WHITELIST by CVE_CHECK_WHITELIST
78de2cb39d7 cve-update-db-native: Remove hash column from database.
4b301030cf9 cve-update-db-native: use os.path.join instead of +
f0d822fad2a cve-update-db: actually inherit native
b309840b6aa cve-update-db-native: use executemany() to optimise CPE insertion
bb4e53af33d cve-update-db-native: improve metadata parsing
94227459792 cve-update-db-native: clean up JSON fetching
95438d52b73 cve-update-db-native: fix https proxy issues
1f9a963b9ff glibc: exclude child recipes from CVE scanning

[1] https://nvd.nist.gov/General/News/XML-Vulnerability-Feed-Retirement

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agokernel-uboot: compress arm64 kernels
Bedel, Alban [Wed, 31 Jul 2019 13:53:45 +0000 (13:53 +0000)]
kernel-uboot: compress arm64 kernels

AArch64 images are not self-decompressing, thus usually much larger.
Boot times can be reduced by compressing them in FIT and uImages.

This commit is a backport of commit a725d188b5 (kernel-uboot: compress
arm64 kernels) and commit 60bc7e180e (kernel-uboot: remove useless
special casing of arm64 Image) from master. Both commit were melted
into one to avoid some useless churn.

Signed-off-by: Alban Bedel <alban.bedel@aerq.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agouboot: fixes to uboot-extlinux-config attribute values
Will Page [Thu, 12 Sep 2019 15:02:15 +0000 (15:02 +0000)]
uboot: fixes to uboot-extlinux-config attribute values

The way this class uses overrides to support generation of multiple
sections is subject to two different issues: 1) labels that conflict
with existing override names causing the value for the conflicting label
to be set for all labels, and 2) reusing the override list through each
iteration, prepending each new label to the list of overrides makes
earlier labels' value take precedence over later labels, making later
labels virtually impossible to customize.

The first issue is resolved by removing all label names from overrides
before iterating over labels.  The second issue is resolved by
generating a fresh list of overrides with only the current label added.

The current label is also appended to the list of overrides instead of
prepended, which makes it the highest priority override.  This is
matches the behavior of devtool-source.bbclass, which similarly
monkey-patches overrides.

Closes https://bugzilla.yoctoproject.org/show_bug.cgi?id=13469 .

Signed-off-by: Will Page <wpage@polysync.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agouseradd: Ensure do_populate_sysroot has dependency on useradd variables
Richard Purdie [Fri, 31 May 2019 16:45:57 +0000 (17:45 +0100)]
useradd: Ensure do_populate_sysroot has dependency on useradd variables

The do_populate_sysroot task doesn't rerun if you change any of the USERADD_PARAM
or GROUPADD_PARAM variables, only do_package will.

If another task depends on the recipe, this means it won't see any updated changes.

This patch adds in the missing vardeps ensuring the code is deterministic.

[YOCTO #13232]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 37d0382a3c67f47f8cfdd977a041069bf912b8c3)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agouseradd: Fix build architecture corruption of sstate artefacts
Richard Purdie [Fri, 31 May 2019 07:54:00 +0000 (08:54 +0100)]
useradd: Fix build architecture corruption of sstate artefacts

When mixing aarch64 and x86_64 host builds with common sstate, useradd failures
were found. This was due to references to:

/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/sysroots-components/aarch64/pseudo-native/usr/bin/pseudo
or
/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/sysroots-components/x86_64/pseudo-native/usr/bin/pseudo

on the wrong architecture within the useradd postinst files.

Instead of using COMPONENTS_DIR as the FIXME, use PSEUDO_SYSROOT which contains
the arch component as well to avoid this.

Add extra comments to cause the relavent sstate to be rebuilt.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 0384622f72a6c0bd8225cf06f692340fdef67d4a)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agomultilib.bbclass: Reduce ALTERNATIVE_PRIORITY for extended recipes
Robert Yang [Wed, 26 Jun 2019 12:59:34 +0000 (20:59 +0800)]
multilib.bbclass: Reduce ALTERNATIVE_PRIORITY for extended recipes

Fixed:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake core-image-minimal
update-alternatives: libtool has multiple providers with the same priority,
please check
/path/to/rootfs/usr/lib/opkg/alternatives/libtool for details

Both libtool and lib32-libtool have the same priority (as they're the same
recipe), so update-alternatives won't deterministically pick a provider. This
means you could end up with an image using a 32-bit pkgconfig and 64-bit
libtool, for example.

Make extended recipes reduce priority by 1 (or 2, 3 ... when there are multiple
variants in MULTILIB_VARIANTS) to fix the problem.

[YOCTO #13418]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agogcc: Security fix for CVE-2019-15847
Armin Kuster [Wed, 18 Sep 2019 03:21:47 +0000 (20:21 -0700)]
gcc: Security fix for CVE-2019-15847

Affects <= 9.2.0

Dropped Changelog changes

Signed-off-by: Armin Kuster <akuster@mvista.com>
5 years agoCurl: Security fix for CVE-2019-5482
Armin Kuster [Fri, 13 Sep 2019 23:14:16 +0000 (16:14 -0700)]
Curl: Security fix for CVE-2019-5482

Source: curl.org
MR: 99905
Type: Security Fix
Disposition: Backport from https://github.com/curl/curl/commit/facb0e4662415b5f28163e853dc6742ac5fafb3d
ChangeID: e0c807da8937f687a4b2e28eaa6b4b5a51845bc5
Description:

Fixes CVE-2019-5482
- Affected versions: libcurl >= 7.19.4 to and including 7.65.3
- Not affected versions: libcurl < 7.19.4

Signed-off-by: Armin Kuster <akuster@mvista.com>
5 years agolibgpg-error: Fix build with gawk 5.x
Sean Nyekjaer [Mon, 9 Sep 2019 18:29:13 +0000 (20:29 +0200)]
libgpg-error: Fix build with gawk 5.x

Based on poky master, but for version 1.35

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agolibxcrypt: Fix the build with -Os
Adrian Bunk [Mon, 9 Sep 2019 10:25:19 +0000 (13:25 +0300)]
libxcrypt: Fix the build with -Os

| In file included from ../git/lib/alg-des.c:66:
| ../git/lib/alg-des.c: In function '_crypt_des_set_key':
| ../git/lib/byteorder.h:24:1: error: inlining failed in call to 'be32_to_cpu': call is unlikely and code size would grow [-Werror=inline]
|  be32_to_cpu (const unsigned char *buf)
|  ^~~~~~~~~~~
| ../git/lib/alg-des.c:81:13: note: called from here
|    rawkey1 = be32_to_cpu (&key[4]);
|              ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agokernel-devsrc: tweak for v5.3+
Bruce Ashfield [Wed, 14 Aug 2019 15:31:29 +0000 (11:31 -0400)]
kernel-devsrc: tweak for v5.3+

The 5.3 kernel has two changes that require tweaks to the minimal
kernel-devsrc package.

4ce97317f [x86/purgatory: Do not use __builtin_memcpy and __builtin_memset]

  This change removes the need for arch/x86/purgatory/string.c and
  instead reuses a copy in arch/x86/boot/compressed/, so we can't copy
  the file anymore. To support older kernels, we make the copy survive
  the non-existence of the file.

b1663d7e [docs: Kbuild/Makefile: allow check for missing docs at build time]

  This change adds the sourceing of Documentation/Kbuild to the top
  level Kbuild file. So we now leave the copy of Documention/'s Kbuild
  in the devsrc.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agokernel-fitimage: uboot-sign: fix missing signature
Jun Nie [Wed, 10 Jul 2019 07:10:56 +0000 (15:10 +0800)]
kernel-fitimage: uboot-sign: fix missing signature

u-boot.bin with dtb & signature should be placed in ${B} so that
it can be deployed by u-boot as expected. Otherwise, the version
without signature is installed.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
5 years agogcc-8.3: Security fix for CVE-2019-14250
Armin Kuster [Sat, 31 Aug 2019 15:40:01 +0000 (08:40 -0700)]
gcc-8.3: Security fix for CVE-2019-14250

Affects < 9.2

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoglibc / glibc-locale: Fix stash_locale determinism problems
Jason Wessel [Mon, 8 Jul 2019 19:16:12 +0000 (12:16 -0700)]
glibc / glibc-locale: Fix stash_locale determinism problems

When using sstate, or performing an incremental build any change to
the do_stash_locale() will cause a build failure because
do_stash_locale() was destroying the results obtained from the
do_install() with several mv operations.  A recent change to
do_stash_locale() for a different problem illustrated a number of
build failures for users in the community.

To fix the problem, do_stash_locale() must use copy operations instead
of the mv operations.  Because this is changed to a copy, the sysroot
and package stage need to remove the files that would have been
previously removed.  The correct "fixup" code to deal with the removal
already existed in the previous do_poststash_install_cleanup().  All
that needed change was the path to where to remove the files
from the sysroot and package stages.

In order to force a re-compilation of glibc some unused white space
was removed from do_compile() for glibc.  I could not find any other
way around this and we don't want to have all the community folks to
have another iteration where they have to remove their tmp directories
or purge some portion of the sstate.  It also makes this change
bisectable. If the change to the glibc is not included, it will fail
with the following message:

=====
| DEBUG: Executing shell function do_prep_locale_tree
| tar: i18n: Cannot stat: No such file or directory
| tar: Exiting with failure status due to previous errors
| gzip: /poky/build/tmp/work/core2-64-poky-linux/glibc-locale/2.29-r0/locale-tree//usr/share/i18n/charmaps/*gz.gz: No such file or directory
=====

After this one time change I tested changing only the
do_stash_locale() function and it now works well because it is
deterministically operating off the sstate data or a local build.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoglibc/glibc-locale: Fix do_stash_locale to work with usrmerge and multilibs
Jason Wessel [Tue, 2 Jul 2019 20:16:09 +0000 (13:16 -0700)]
glibc/glibc-locale: Fix do_stash_locale to work with usrmerge and multilibs

The do_stash_locale was not working consistently across the 4 build
configurations and the multilib, usrmerge configuration would fail
entirely with the obscure message:

| DEBUG: Executing shell function do_prep_locale_tree
| tar: i18n: Cannot stat: No such file or directory
| tar: Exiting with failure status due to previous errors
| gzip: /poky/build/tmp/work/core2-64-poky-linux/glibc-locale/2.29-r0/locale-tree//usr/share/i18n/charmaps/*gz.gz: No such file or directory
| WARNING: /poky/build/tmp/work/core2-64-poky-linux/glibc-locale/2.29-r0/temp/run.do_prep_locale_tree.124690:1 exit 1 from 'gunzip $i'

Here is the 4 build configurations without the patch applied:

A) x86-64 no multilibs, no usrmerge
find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l
909
B) x86-64 no multilibs, usrmerge
find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l
909
C) x86-64 multilibs, no usrmerge
find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l
885
D) x86-64 multilibs, usrmerge
find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l
864

The issue here is that all the moves should be processed first, then a
copy should be made of the lib directories, but only in the case they
are different when using the usrmerge feature.  Even though the build
worked for the multilib configuration without usrmerge, the content
was not the same.

After applying the patch the same number of files are in all the
configurations.  The list of files was also diffed, after normalizing
the directory names to ensure all the correct files were copied.

Ultimately there are probably additional files that should be pruned
from what is copied to the stated_locale, but the purpose of this
patch is make it 100% consistent between the build types and fix the
builds.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoglibc-locale: Fix build error with PACKAGE_NO_GCONV = "1"
Jason Wessel [Tue, 2 Jul 2019 20:16:08 +0000 (13:16 -0700)]
glibc-locale: Fix build error with PACKAGE_NO_GCONV = "1"

When the PACKAGE_NO_GCONV is set to 1 an empty directory is left behind from the do_install rule:

=====
ERROR: glibc-locale-2.29-r0 do_package: QA Issue: glibc-locale: Files/directories were installed but not shipped in any package:
  /usr/lib
  /usr/lib/locale
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
glibc-locale: 2 installed and not shipped files. [installed-vs-shipped]
ERROR: glibc-locale-2.29-r0 do_package: Fatal QA errors found, failing task.
=====

The simple fix is to prune the empty directory.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agoglibc: Fix multilibs + usrmerge builds
Jason Wessel [Sun, 30 Jun 2019 02:15:48 +0000 (19:15 -0700)]
glibc: Fix multilibs + usrmerge builds

The build of glibc fails when you have multilibs enabled + the distro
feature usrmerge.  Here is an example configuration:

===
MACHINE = "qemux86-64"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_append = " systemd "
DISTRO_FEATURES_append += " usrmerge"

require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
===

This will fail with the following error:

NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: glibc-2.28-r0 do_poststash_install_cleanup: Function failed: do_poststash_install_cleanup (log file is located at /poky/build/tmp/work/core2-64-poky-linux/glibc/2.28-r0/temp/log.do_poststash_install_cleanup.107893)
ERROR: Logfile of failure stored in: /poky/build/tmp/work/core2-64-poky-linux/glibc/2.28-r0/temp/log.do_poststash_install_cleanup.107893

The fix is to not perform the rmdir check when using the multilib + usr/merge, namely:

if [ "${libdir}" != "${exec_prefix}/lib" ] && [ "${root_prefix}/lib" != "${exec_prefix}/lib" ]; then

This will evaluate as follows (collecting the output from bitbake -e glibc)

* no multilibs no usrmerge
        if [ "/usr/lib" != "/usr/lib" ] && [ "/lib" != "/usr/lib" ]; then
* no multilibs yes usrmerge
        if [ "/usr/lib" != "/usr/lib" ] && [ "/usr/lib" != "/usr/lib" ]; then
* yes multilibs no usrmerge
        if [ "/usr/lib64" != "/usr/lib" ] && [ "/lib" != "/usr/lib" ]; then
* yes multilibs yes user merge
        if [ "/usr/lib64" != "/usr/lib" ] && [ "/usr/lib" != "/usr/lib" ]; then

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
5 years agobinutils: Fix mips patch which changes default emulation
Nathan Rossi [Wed, 28 Aug 2019 05:06:29 +0000 (05:06 +0000)]
binutils: Fix mips patch which changes default emulation

The patch incorrectly removes 'mips_elf32_ntrad_le_vec' from the
'targ_selvecs' replacing it with duplicate entries for
'mips_elf32_ntrad_be_vec'. Correct this so that the default binutils can
still handle 'mips_elf32_ntrad_le_vec' binaries.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>