u-boot.git
6 years agoFix spelling of download.
Vagrant Cascadian [Fri, 1 Mar 2019 03:53:43 +0000 (19:53 -0800)]
Fix spelling of download.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Gbp-Pq: Topic exynos
Gbp-Pq: Name 0002-Fix-spelling-of-download.patch

6 years agoarm: config: fix default console only to specify the device
Dongjin Kim [Sat, 28 Oct 2017 04:22:27 +0000 (00:22 -0400)]
arm: config: fix default console only to specify the device

This reverts commit 767edf0f6b3eaa0303f3fd6afdc14ddce0aca70c and restores
commit 232ed3ca534708527a9515c7c41bc3542949525c.

Debian's flash-kernel expect the console variable to just contain the device,
because it will set the bootargs to "console=${console}". So revert adding
"console=" to the console parameter, but also adjust the shipped bootscripts
for exynos boards to cope with it.

Bug-Debian: https://bugs.debian.org/920116
Signed-off-by: Benjamin Drung <bdrung@debian.org>
Gbp-Pq: Topic exynos
Gbp-Pq: Name 0001-arm-config-fix-default-console-only-to-specify-the-d.patch

6 years agolib: uuid: Fix unseeded PRNG on RANDOM_UUID=y
Eugeniu Rosca [Thu, 2 May 2019 12:27:06 +0000 (14:27 +0200)]
lib: uuid: Fix unseeded PRNG on RANDOM_UUID=y

The random uuid values (enabled via CONFIG_RANDOM_UUID=y) on our
platform are always the same. Below is consistent on each cold boot:

 => ### interrupt autoboot
 => env default -a; gpt write mmc 1 $partitions; print uuid_gpt_misc
 ...
 uuid_gpt_misc=d117f98e-6f2c-d04b-a5b2-331a19f91cb2
 => env default -a; gpt write mmc 1 $partitions; print uuid_gpt_misc
 ...
 uuid_gpt_misc=ad5ec4b6-2d9f-8544-9417-fe3bd1c9b1b3
 => env default -a; gpt write mmc 1 $partitions; print uuid_gpt_misc
 ...
 uuid_gpt_misc=cceb0b18-39cb-d547-9db7-03b405fa77d4
 => env default -a; gpt write mmc 1 $partitions; print uuid_gpt_misc
 ...
 uuid_gpt_misc=d4981a2b-0478-544e-9607-7fd3c651068d
 => env default -a; gpt write mmc 1 $partitions; print uuid_gpt_misc
 ...
 uuid_gpt_misc=6d6c9a36-e919-264d-a9ee-bd00379686c7

While the uuids do change on every 'gpt write' command, the values
appear to be taken from the same pool, in the same order.

Assuming U-Boot with RANDOM_UUID=y is deployed on a large number of
devices, all those devices would essentially expose the same UUID,
breaking the assumption of system/RFS/application designers who rely
on UUID as being globally unique (e.g. a database using UUID as key
would alias/mix up entries/records due to duplicated UUID).

The root cause seems to be simply _not_ seeding PRNG before generating
a random value. It turns out this belongs to an established class of
PRNG-specific problems, commonly known as "unseeded randomness", for
which I am able to find below bugs/CVE/CWE:
 - https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-0285
   ("CVE-2015-0285 openssl: handshake with unseeded PRNG")
 - https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-9019
   ("CVE-2015-9019 libxslt: math.random() in xslt uses unseeded
   randomness")
 - https://cwe.mitre.org/data/definitions/336.html
   ("CWE-336: Same Seed in Pseudo-Random Number Generator (PRNG)")

The first revision [1] of this patch updated the seed based on the
output of get_timer(), similar to [4].

There are two problems with this approach:
 - get_timer() has a poor _ms_ resolution
 - when gen_rand_uuid() is called in a loop, get_timer() returns the
   same result, leading to the same seed being passed to srand(),
   leading to the same uuid being generated for several partitions
   with different names

The above drawbacks have been addressed in the second version [2].
In its third revision (current), the patch reworded the description
and summary line to emphasize it is a *fix* rather than an improvement.

Testing [3] consisted of running 'gpt write mmc 1 $partitions' in a
loop on R-Car3 for several minutes, collecting 8844 randomly generated
UUIDS. Two consecutive cold boots are concatenated in the log.
As a result, all uuid values are unique (scripted check).

Thanks to Roman, who reported the issue and provided support in fixing.

[1] https://patchwork.ozlabs.org/patch/1091802/
[2] https://patchwork.ozlabs.org/patch/1092945/
[3] https://gist.github.com/erosca/2820be9d554f76b982edd48474d0e7ca
[4] commit da384a9d7628 ("net: rename and refactor eth_rand_ethaddr() function")

Reported-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Gbp-Pq: Topic upstream
Gbp-Pq: Name lib-uuid-Fix-unseeded-PRNG-on-RANDOM_UUID-y.patch

6 years agoFix ext4 block group descriptor sizing
Benjamin Lim [Fri, 29 Mar 2019 11:29:45 +0000 (07:29 -0400)]
Fix ext4 block group descriptor sizing

Ext4 allows for arbitrarily sized block group descriptors when 64-bit
addressing is enabled, which was previously not properly supported. This
patch dynamically allocates a chunk of memory of the correct size.

Signed-off-by: Benjamin Lim <jarsp.ctf@gmail.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name Fix-ext4-block-group-descriptor-sizing.patch

6 years agoFix typo: missmatched -> mismatched.
Vagrant Cascadian [Tue, 8 Jan 2019 21:10:23 +0000 (13:10 -0800)]
Fix typo: missmatched -> mismatched.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name 0001-Fix-typo-missmatched-mismatched.patch

6 years agofs: ext4: Unmount FS in do_fs_type()
Marek Vasut [Wed, 6 Feb 2019 12:19:29 +0000 (13:19 +0100)]
fs: ext4: Unmount FS in do_fs_type()

Unlike other generic FS accessors, fs_get_info() does not call fs_close()
at the end of it's operation. Thus, using fs_get_info() in do_fs_type()
without calling fs_close() causes potential memory leak by creating new
filesystem structures on each call of do_fs_type().

The test case to trigger this problem is as follows. It is required to
have ext4 filesystem on the first partition of the SDMMC device, since
ext4 requires stateful mount and causes memory allocation.
=> while true ; do mmc rescan ; fstype mmc 1 ; done
Eventually, the mounting of ext4 will fail due to malloc failures
and the filesystem will not be correctly detected.

This patch fixes the problem by adding the missing fs_close().

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name fs-ext4-Unmount-FS-in-do_fs_type.patch

6 years agotest-imagetools-test-fixes
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
test-imagetools-test-fixes

This patch allows testing in an alternate directory and also detects
failures to execute commands, treating that as a failure.

Gbp-Pq: Name test-imagetools-test-fixes

6 years agoomap5_distro_bootcmd
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
omap5_distro_bootcmd

Enable distro_bootcmd support (doc/README.distro) for omap5 targets.

Gbp-Pq: Topic am57xx
Gbp-Pq: Name omap5_distro_bootcmd

6 years agoensure-config-sandbox-for-make-env
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
ensure-config-sandbox-for-make-env

Ensure that CONFIG_SANDBOX is set when running "make env", avoiding a
failure to build caused by config_distro_bootcmd.h following the wrong
codepath...

Gbp-Pq: Name ensure-config-sandbox-for-make-env.patch

6 years agosh4-fix-linker-name-prefix
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
sh4-fix-linker-name-prefix

Gbp-Pq: Name sh4-fix-linker-name-prefix.patch

6 years agoboard-spl-rule
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
board-spl-rule

Gbp-Pq: Topic arndale
Gbp-Pq: Name board-spl-rule.diff

6 years agon900-bootz-raw-initrd
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
n900-bootz-raw-initrd

Enable booting of zImage/vmlinuz and initrd without requiring the use of
mkimage to create uImage/uInitrd.

Gbp-Pq: Name n900-bootz-raw-initrd.diff

6 years agomx53loco
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
mx53loco

Enables support for ext4, the "load" command, and using bootz with raw initrds.

Gbp-Pq: Name mx53loco

6 years agoMakefile-add-kwb-target-to-all
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
Makefile-add-kwb-target-to-all

Add u-boot.kwb to "make all" target on Kirkwood.

Gbp-Pq: Name Makefile-add-kwb-target-to-all.patch

6 years agotools-generic-builds
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
tools-generic-builds

Gbp-Pq: Name tools-generic-builds.patch

6 years agono-force-CROSS_COMPILE-powerpc
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
no-force-CROSS_COMPILE-powerpc

Debian typically builds natively, so disable forced use of
cross-compile.

Gbp-Pq: Name no-force-CROSS_COMPILE-powerpc.diff

6 years agoadd-debian-revision-to-u-boot-version
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
add-debian-revision-to-u-boot-version

Add the debian revision to the U-boot version, which is displayed at
boot and can be helpful to determine which specific version is used.

Gbp-Pq: Name add-debian-revision-to-u-boot-version

6 years agou-boot (2019.01+dfsg-7) unstable; urgency=medium
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
u-boot (2019.01+dfsg-7) unstable; urgency=medium

  [ Sunil Mohan Adapa ]
  * Enable pine64-lts target in u-boot-sunxi (Closes: #928947).

  [ Vagrant Cascadian ]
  * u-boot-omap: Enable am335x_evm target.
  * Add patches to enable PocketBeagle in am335x_evm target.
  * u-boot-omap: Fix instructions for installing beaglebone black.

[dgit import unpatched u-boot 2019.01+dfsg-7]

6 years agoImport u-boot_2019.01+dfsg-7.debian.tar.xz
Vagrant Cascadian [Tue, 14 May 2019 02:07:44 +0000 (03:07 +0100)]
Import u-boot_2019.01+dfsg-7.debian.tar.xz

[dgit import tarball u-boot 2019.01+dfsg-7 u-boot_2019.01+dfsg-7.debian.tar.xz]

6 years agoImport u-boot_2019.01+dfsg.orig.tar.xz
Vagrant Cascadian [Tue, 15 Jan 2019 00:36:19 +0000 (00:36 +0000)]
Import u-boot_2019.01+dfsg.orig.tar.xz

[dgit import orig u-boot_2019.01+dfsg.orig.tar.xz]