* [PATCH 00/11] Dizzy next #2
@ 2014-11-26 16:22 Armin Kuster
2014-11-26 16:22 ` [PATCH 01/11] wic: Don't allow mkfs to fail silently in partition command Armin Kuster
` (11 more replies)
0 siblings, 12 replies; 14+ messages in thread
From: Armin Kuster @ 2014-11-26 16:22 UTC (permalink / raw)
To: openembedded-core; +Cc: Tom Zanussi, Javier Viguera, Andrei Gherzan
Please consider these changes for the next Dizzy.
The following changes since commit 85b8abe50482deaa1af62f265e82f53a54bbcd77:
nss: define MP_USE_UINT_DIGIT when compile mpi_x86.s (2014-11-24 16:38:18 -0800)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib akuster/dizzy-next
http://git.yoctoproject.org/cgit.cgi//log/?h=akuster/dizzy-next
Andrei Gherzan (1):
xkeyboard-config: Inherit gettext
Aníbal Limón (1):
package_manager: DpkgPM fix populate_sdk
Javier Viguera (1):
shadow-securetty: add ttyAM[0-3] serial ports
Robert Yang (1):
qemu: disable the build for mips
Saul Wold (1):
babeltrace: Backport fix for unaligned integer
Tom Zanussi (5):
wic: Don't allow mkfs to fail silently in partition command
wic: Update the help text to include -D (--debug)
Revert "wic: set bootimg_dir when using image-name artifacts"
wic: Remove special-case bootimg_dir
wic: Update bootimg-partition to use bootimg_dir
Wenzong Fan (1):
python: Fix CVE-2014-7185
meta/lib/oe/package_manager.py | 2 +-
.../python/python/python-2.7.3-CVE-2014-7185.patch | 75 ++++++
meta/recipes-devtools/python/python_2.7.3.bb | 1 +
meta/recipes-devtools/qemu/qemu_2.1.0.bb | 1 +
meta/recipes-devtools/qemu/qemu_git.bb | 1 +
meta/recipes-extended/shadow/files/securetty | 4 +
.../xorg-lib/xkeyboard-config_2.12.bb | 2 +-
...n-t-perform-unaligned-integer-read-writes.patch | 252 +++++++++++++++++++++
meta/recipes-kernel/lttng/babeltrace_1.2.1.bb | 1 +
scripts/lib/image/engine.py | 42 +---
scripts/lib/image/help.py | 23 +-
scripts/lib/wic/imager/direct.py | 5 +-
.../lib/wic/kickstart/custom_commands/partition.py | 22 +-
scripts/lib/wic/plugins/imager/direct_plugin.py | 20 +-
scripts/lib/wic/plugins/source/bootimg-efi.py | 5 +-
.../lib/wic/plugins/source/bootimg-partition.py | 9 +-
scripts/lib/wic/plugins/source/bootimg-pcbios.py | 3 +-
scripts/wic | 13 +-
18 files changed, 402 insertions(+), 79 deletions(-)
create mode 100644 meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
create mode 100644 meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch
--
1.9.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 01/11] wic: Don't allow mkfs to fail silently in partition command
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
@ 2014-11-26 16:22 ` Armin Kuster
2014-11-26 16:22 ` [PATCH 02/11] wic: Update the help text to include -D (--debug) Armin Kuster
` (10 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2014-11-26 16:22 UTC (permalink / raw)
To: openembedded-core; +Cc: Tom Zanussi
From: Tom Zanussi <tom.zanussi@linux.intel.com>
The return code from the mkfs command used by the partition creation
command was being ignored, allowing it to silently fail and leaving
users mystified as to why the resulting filesystem was corrupted.
This became obvious when failures occurred when creating large
e.g. sdk filesystems [YOCTO #6863].
(From OE-Core rev: 8cef3b06f7e9f9d922673f430ddb3170d2fac000)
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../lib/wic/kickstart/custom_commands/partition.py | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py
index 8b0ace6..3950b43 100644
--- a/scripts/lib/wic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/wic/kickstart/custom_commands/partition.py
@@ -241,8 +241,10 @@ class Wic_PartData(Mic_PartData):
mkfs_cmd = "mkfs.%s -F %s %s -d %s" % \
(self.fstype, extra_imagecmd, rootfs, image_rootfs)
- exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
-
+ (rc, out) = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
+ if rc:
+ print "rootfs_dir: %s" % rootfs_dir
+ msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details) when creating filesystem from rootfs directory: %s" % (self.fstype, rc, rootfs_dir))
# get the rootfs size in the right units for kickstart (Mb)
du_cmd = "du -Lbms %s" % rootfs
@@ -284,7 +286,9 @@ class Wic_PartData(Mic_PartData):
mkfs_cmd = "mkfs.%s -b %d -r %s %s" % \
(self.fstype, rootfs_size * 1024, image_rootfs, rootfs)
- exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
+ (rc, out) = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
+ if rc:
+ msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details) when creating filesystem from rootfs directory: %s" % (self.fstype, rc, rootfs_dir))
# get the rootfs size in the right units for kickstart (Mb)
du_cmd = "du -Lbms %s" % rootfs
@@ -396,7 +400,9 @@ class Wic_PartData(Mic_PartData):
extra_imagecmd = "-i 8192"
mkfs_cmd = "mkfs.%s -F %s %s" % (self.fstype, extra_imagecmd, fs)
- exec_native_cmd(mkfs_cmd, native_sysroot)
+ (rc, out) = exec_native_cmd(mkfs_cmd, native_sysroot)
+ if rc:
+ msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details)" % (self.fstype, rc))
self.source_file = fs
@@ -414,10 +420,14 @@ class Wic_PartData(Mic_PartData):
exec_cmd(dd_cmd)
mkfs_cmd = "mkfs.%s -b %d %s" % (self.fstype, self.size * 1024, rootfs)
- exec_native_cmd(mkfs_cmd, native_sysroot)
+ (rc, out) = exec_native_cmd(mkfs_cmd, native_sysroot)
+ if rc:
+ msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details)" % (self.fstype, rc))
mkfs_cmd = "mkfs.%s -F %s %s" % (self.fstype, extra_imagecmd, fs)
- exec_native_cmd(mkfs_cmd, native_sysroot)
+ (rc, out) = exec_native_cmd(mkfs_cmd, native_sysroot)
+ if rc:
+ msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details)" % (self.fstype, rc))
self.source_file = fs
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 02/11] wic: Update the help text to include -D (--debug)
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
2014-11-26 16:22 ` [PATCH 01/11] wic: Don't allow mkfs to fail silently in partition command Armin Kuster
@ 2014-11-26 16:22 ` Armin Kuster
2014-11-26 16:22 ` [PATCH 03/11] Revert "wic: set bootimg_dir when using image-name artifacts" Armin Kuster
` (9 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2014-11-26 16:22 UTC (permalink / raw)
To: openembedded-core; +Cc: Tom Zanussi
From: Tom Zanussi <tom.zanussi@linux.intel.com>
The --debug option is missing from the wic help text; this adds it and
at the same time rearranges the usage into a more logical arrangement.
(From OE-Core rev: cf5144ef241d8f4ccaa3461ae5c9f89c2cf2f8d1)
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
scripts/lib/image/help.py | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py
index 080795e..0963532 100644
--- a/scripts/lib/image/help.py
+++ b/scripts/lib/image/help.py
@@ -109,8 +109,9 @@ wic_create_usage = """
usage: wic create <wks file or image name> [-o <DIRNAME> | --outdir <DIRNAME>]
[-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
- [-e | --image-name] [-r, --rootfs-dir] [-b, --bootimg-dir]
- [-k, --kernel-dir] [-n, --native-sysroot] [-s, --skip-build-check]
+ [-e | --image-name] [-s, --skip-build-check] [-D, --debug]
+ [-r, --rootfs-dir] [-b, --bootimg-dir]
+ [-k, --kernel-dir] [-n, --native-sysroot]
This command creates an OpenEmbedded image based on the 'OE kickstart
commands' found in the <wks file>.
@@ -129,8 +130,9 @@ NAME
SYNOPSIS
wic create <wks file or image name> [-o <DIRNAME> | --outdir <DIRNAME>]
[-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
- [-e | --image-name] [-r, --rootfs-dir] [-b, --bootimg-dir]
- [-k, --kernel-dir] [-n, --native-sysroot] [-s, --skip-build-check]
+ [-e | --image-name] [-s, --skip-build-check] [-D, --debug]
+ [-r, --rootfs-dir] [-b, --bootimg-dir]
+ [-k, --kernel-dir] [-n, --native-sysroot]
DESCRIPTION
This command creates an OpenEmbedded image based on the 'OE
@@ -172,6 +174,12 @@ DESCRIPTION
explicitly, 'wic' assumes the user knows what he or she is doing
and skips the build check.
+ The -D option is used to display debug information detailing
+ exactly what happens behind the scenes when a create request is
+ fulfilled (or not, as the case may be). It enumerates and
+ displays the command sequence used, and should be included in any
+ bug report describing unexpected results.
+
When 'wic -e' is used, the locations for the build artifacts
values are determined by 'wic -e' from the output of the 'bitbake
-e' command given an image name e.g. 'core-image-minimal' and a
@@ -519,8 +527,9 @@ DESCRIPTION
usage: wic create <wks file or image name> [-o <DIRNAME> | ...]
[-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
- [-e | --image-name] [-r, --rootfs-dir] [-b, --bootimg-dir]
- [-k, --kernel-dir] [-n, --native-sysroot] [-s, --skip-build-check]
+ [-e | --image-name] [-s, --skip-build-check] [-D, --debug]
+ [-r, --rootfs-dir] [-b, --bootimg-dir]
+ [-k, --kernel-dir] [-n, --native-sysroot]
This command creates an OpenEmbedded image based on the 'OE
kickstart commands' found in the <wks file>.
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 03/11] Revert "wic: set bootimg_dir when using image-name artifacts"
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
2014-11-26 16:22 ` [PATCH 01/11] wic: Don't allow mkfs to fail silently in partition command Armin Kuster
2014-11-26 16:22 ` [PATCH 02/11] wic: Update the help text to include -D (--debug) Armin Kuster
@ 2014-11-26 16:22 ` Armin Kuster
2014-11-26 16:22 ` [PATCH 04/11] wic: Remove special-case bootimg_dir Armin Kuster
` (8 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2014-11-26 16:22 UTC (permalink / raw)
To: openembedded-core; +Cc: Tom Zanussi
From: Tom Zanussi <tom.zanussi@linux.intel.com>
This reverts commit 7ce1dc13f91df70e8a2f420e7c3eba51cbc4bd48.
This patch broke the assumption that a non-null boot_dir means a
user-assigned (-b command-line param) value.
Reverting doesn't break anything, since the case it was added for
doesn't use the boot_dir for anything except debugging anyhow.
Fixes [YOCTO #6290]
(From OE-Core rev: db90f10bf31dec8d7d7bb2d3680d50e133662850)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
scripts/lib/image/engine.py | 9 ++-------
scripts/wic | 7 +++----
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py
index 3813fec..f1df8b4 100644
--- a/scripts/lib/image/engine.py
+++ b/scripts/lib/image/engine.py
@@ -67,8 +67,7 @@ def find_artifacts(image_name):
"""
bitbake_env_lines = get_bitbake_env_lines()
- rootfs_dir = kernel_dir = bootimg_dir = ""
- hdddir = staging_data_dir = native_sysroot = ""
+ rootfs_dir = kernel_dir = hdddir = staging_data_dir = native_sysroot = ""
for line in bitbake_env_lines.split('\n'):
if (get_line_val(line, "IMAGE_ROOTFS")):
@@ -86,12 +85,8 @@ def find_artifacts(image_name):
if (get_line_val(line, "STAGING_DIR_NATIVE")):
native_sysroot = get_line_val(line, "STAGING_DIR_NATIVE")
continue
- if (get_line_val(line, "DEPLOY_DIR_IMAGE")):
- bootimg_dir = get_line_val(line, "DEPLOY_DIR_IMAGE")
- continue
- return (rootfs_dir, kernel_dir, bootimg_dir, hdddir, staging_data_dir, \
- native_sysroot)
+ return (rootfs_dir, kernel_dir, hdddir, staging_data_dir, native_sysroot)
CANNED_IMAGE_DIR = "lib/image/canned-wks" # relative to scripts
diff --git a/scripts/wic b/scripts/wic
index 7314810..15cc9b3 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -134,8 +134,8 @@ def wic_create_subcommand(args, usage_str):
bootimg_dir = staging_data_dir = hdddir = ""
if options.image_name:
- (rootfs_dir, kernel_dir, bootimg_dir, hdddir, \
- staging_data_dir, native_sysroot) = find_artifacts(options.image_name)
+ (rootfs_dir, kernel_dir, hdddir, staging_data_dir, native_sysroot) = \
+ find_artifacts(options.image_name)
wks_file = args[0]
@@ -172,8 +172,7 @@ def wic_create_subcommand(args, usage_str):
not_found = not_found_dir = ""
if not os.path.isdir(rootfs_dir):
(not_found, not_found_dir) = ("rootfs-dir", rootfs_dir)
- elif not os.path.isdir(bootimg_dir) and not os.path.isdir(hdddir) \
- and not os.path.isdir(staging_data_dir):
+ elif not os.path.isdir(hdddir) and not os.path.isdir(staging_data_dir):
(not_found, not_found_dir) = ("bootimg-dir", bootimg_dir)
elif not os.path.isdir(kernel_dir):
(not_found, not_found_dir) = ("kernel-dir", kernel_dir)
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 04/11] wic: Remove special-case bootimg_dir
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
` (2 preceding siblings ...)
2014-11-26 16:22 ` [PATCH 03/11] Revert "wic: set bootimg_dir when using image-name artifacts" Armin Kuster
@ 2014-11-26 16:22 ` Armin Kuster
2014-11-26 16:22 ` [PATCH 05/11] wic: Update bootimg-partition to use bootimg_dir Armin Kuster
` (7 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2014-11-26 16:22 UTC (permalink / raw)
To: openembedded-core; +Cc: Tom Zanussi
From: Tom Zanussi <tom.zanussi@linux.intel.com>
The first iterations of wic very shortsightedly catered to two
specific use-cases and added special-purpose params for those cases so
that they could be directly given their corresponding boot artifacts.
(hdddir and staging_data_dir).
As more use-cases are added, it becomes rather obvious that such a
scheme doens't scale, and additionally causes confusion for plugin
writers.
This removes those special cases and states explicitly in the help
text that plugins are responsible for locating their own boot
artifacts.
(From OE-Core rev: 6ba3eb5ff7c47aee6b3419fb3a348a634fe74ac9)
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
scripts/lib/image/engine.py | 37 ++++++------------------
scripts/lib/image/help.py | 2 +-
scripts/lib/wic/imager/direct.py | 5 +---
scripts/lib/wic/plugins/imager/direct_plugin.py | 20 +++++--------
scripts/lib/wic/plugins/source/bootimg-efi.py | 5 ++--
scripts/lib/wic/plugins/source/bootimg-pcbios.py | 3 +-
scripts/wic | 12 ++++----
7 files changed, 27 insertions(+), 57 deletions(-)
diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py
index f1df8b4..e794545 100644
--- a/scripts/lib/image/engine.py
+++ b/scripts/lib/image/engine.py
@@ -67,7 +67,7 @@ def find_artifacts(image_name):
"""
bitbake_env_lines = get_bitbake_env_lines()
- rootfs_dir = kernel_dir = hdddir = staging_data_dir = native_sysroot = ""
+ rootfs_dir = kernel_dir = bootimg_dir = native_sysroot = ""
for line in bitbake_env_lines.split('\n'):
if (get_line_val(line, "IMAGE_ROOTFS")):
@@ -76,17 +76,11 @@ def find_artifacts(image_name):
if (get_line_val(line, "STAGING_KERNEL_DIR")):
kernel_dir = get_line_val(line, "STAGING_KERNEL_DIR")
continue
- if (get_line_val(line, "HDDDIR")):
- hdddir = get_line_val(line, "HDDDIR")
- continue
- if (get_line_val(line, "STAGING_DATADIR")):
- staging_data_dir = get_line_val(line, "STAGING_DATADIR")
- continue
if (get_line_val(line, "STAGING_DIR_NATIVE")):
native_sysroot = get_line_val(line, "STAGING_DIR_NATIVE")
continue
- return (rootfs_dir, kernel_dir, hdddir, staging_data_dir, native_sysroot)
+ return (rootfs_dir, kernel_dir, bootimg_dir, native_sysroot)
CANNED_IMAGE_DIR = "lib/image/canned-wks" # relative to scripts
@@ -185,18 +179,15 @@ def list_source_plugins():
def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
- native_sysroot, hdddir, staging_data_dir, scripts_path,
- image_output_dir, debug, properties_file, properties=None):
- """
- Create image
+ native_sysroot, scripts_path, image_output_dir, debug,
+ properties_file, properties=None):
+ """Create image
wks_file - user-defined OE kickstart file
rootfs_dir - absolute path to the build's /rootfs dir
bootimg_dir - absolute path to the build's boot artifacts directory
kernel_dir - absolute path to the build's kernel directory
native_sysroot - absolute path to the build's native sysroots dir
- hdddir - absolute path to the build's HDDDIR dir
- staging_data_dir - absolute path to the build's STAGING_DATA_DIR dir
scripts_path - absolute path to /scripts dir
image_output_dir - dirname to create for image
properties_file - use values from this file if nonempty i.e no prompting
@@ -211,22 +202,14 @@ def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
rootfs_dir: IMAGE_ROOTFS
kernel_dir: STAGING_KERNEL_DIR
native_sysroot: STAGING_DIR_NATIVE
- hdddir: HDDDIR
- staging_data_dir: STAGING_DATA_DIR
- In the above case, bootimg_dir remains unset and the image
- creation code determines which of the passed-in directories to
- use.
+ In the above case, bootimg_dir remains unset and the
+ plugin-specific image creation code is responsible for finding the
+ bootimg artifacts.
In the case where the values are passed in explicitly i.e 'wic -e'
is not used but rather the individual 'wic' options are used to
- explicitly specify these values, hdddir and staging_data_dir will
- be unset, but bootimg_dir must be explicit i.e. explicitly set to
- either hdddir or staging_data_dir, depending on the image being
- generated. The other values (rootfs_dir, kernel_dir, and
- native_sysroot) correspond to the same values found above via
- 'bitbake -e').
-
+ explicitly specify these values.
"""
try:
oe_builddir = os.environ["BUILDDIR"]
@@ -242,8 +225,6 @@ def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
direct_args.insert(0, bootimg_dir)
direct_args.insert(0, kernel_dir)
direct_args.insert(0, native_sysroot)
- direct_args.insert(0, hdddir)
- direct_args.insert(0, staging_data_dir)
direct_args.insert(0, "direct")
if debug:
diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py
index 0963532..6b74f57 100644
--- a/scripts/lib/image/help.py
+++ b/scripts/lib/image/help.py
@@ -189,7 +189,7 @@ DESCRIPTION
-r: IMAGE_ROOTFS
-k: STAGING_KERNEL_DIR
-n: STAGING_DIR_NATIVE
- -b: HDDDIR and STAGING_DATA_DIR (handlers decide which to use)
+ -b: empty (plugin-specific handlers must determine this)
If 'wic -e' is not used, the user needs to select the appropriate
value for -b (as well as -r, -k, and -n).
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index 5b12856..6b2ab33 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -52,8 +52,7 @@ class DirectImageCreator(BaseImageCreator):
"""
def __init__(self, oe_builddir, image_output_dir, rootfs_dir, bootimg_dir,
- kernel_dir, native_sysroot, hdddir, staging_data_dir,
- creatoropts=None):
+ kernel_dir, native_sysroot, creatoropts=None):
"""
Initialize a DirectImageCreator instance.
@@ -74,8 +73,6 @@ class DirectImageCreator(BaseImageCreator):
self.bootimg_dir = bootimg_dir
self.kernel_dir = kernel_dir
self.native_sysroot = native_sysroot
- self.hdddir = hdddir
- self.staging_data_dir = staging_data_dir
def __write_fstab(self, image_rootfs):
"""overriden to generate fstab (temporarily) in rootfs. This is called
diff --git a/scripts/lib/wic/plugins/imager/direct_plugin.py b/scripts/lib/wic/plugins/imager/direct_plugin.py
index dabd6fc..5601c3f 100644
--- a/scripts/lib/wic/plugins/imager/direct_plugin.py
+++ b/scripts/lib/wic/plugins/imager/direct_plugin.py
@@ -58,21 +58,19 @@ class DirectPlugin(ImagerPlugin):
"""
Create direct image, called from creator as 'direct' cmd
"""
- if len(args) != 9:
+ if len(args) != 7:
raise errors.Usage("Extra arguments given")
- staging_data_dir = args[0]
- hdddir = args[1]
- native_sysroot = args[2]
- kernel_dir = args[3]
- bootimg_dir = args[4]
- rootfs_dir = args[5]
+ native_sysroot = args[0]
+ kernel_dir = args[1]
+ bootimg_dir = args[2]
+ rootfs_dir = args[3]
creatoropts = configmgr.create
- ksconf = args[6]
+ ksconf = args[4]
- image_output_dir = args[7]
- oe_builddir = args[8]
+ image_output_dir = args[5]
+ oe_builddir = args[6]
krootfs_dir = self.__rootfs_dir_to_dict(rootfs_dir)
@@ -84,8 +82,6 @@ class DirectPlugin(ImagerPlugin):
bootimg_dir,
kernel_dir,
native_sysroot,
- hdddir,
- staging_data_dir,
creatoropts)
try:
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 855bbc2..e4067b6 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -173,7 +173,6 @@ class BootimgEFIPlugin(SourcePlugin):
cr.set_bootimg_dir(bootimg_dir)
staging_kernel_dir = kernel_dir
- staging_data_dir = bootimg_dir
hdddir = "%s/hdd/boot" % cr_workdir
@@ -185,12 +184,12 @@ class BootimgEFIPlugin(SourcePlugin):
if source_params['loader'] == 'grub-efi':
shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir,
"%s/grub.cfg" % cr_workdir)
- cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (staging_data_dir, hdddir)
+ cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (bootimg_dir, hdddir)
exec_cmd(cp_cmd, True)
shutil.move("%s/grub.cfg" % cr_workdir,
"%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir)
elif source_params['loader'] == 'gummiboot':
- cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (staging_data_dir, hdddir)
+ cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (bootimg_dir, hdddir)
exec_cmd(cp_cmd, True)
else:
msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader'])
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 6057bab..8a1aca1 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -144,7 +144,6 @@ class BootimgPcbiosPlugin(SourcePlugin):
cr.set_bootimg_dir(bootimg_dir)
staging_kernel_dir = kernel_dir
- staging_data_dir = bootimg_dir
hdddir = "%s/hdd/boot" % cr_workdir
@@ -153,7 +152,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
exec_cmd(install_cmd)
install_cmd = "install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" \
- % (staging_data_dir, hdddir)
+ % (bootimg_dir, hdddir)
exec_cmd(install_cmd)
du_cmd = "du -bks %s" % hdddir
diff --git a/scripts/wic b/scripts/wic
index 15cc9b3..e7df60f 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -131,11 +131,11 @@ def wic_create_subcommand(args, usage_str):
sys.exit(1)
set_bitbake_env_lines(bitbake_env_lines)
- bootimg_dir = staging_data_dir = hdddir = ""
+ bootimg_dir = ""
if options.image_name:
- (rootfs_dir, kernel_dir, hdddir, staging_data_dir, native_sysroot) = \
- find_artifacts(options.image_name)
+ (rootfs_dir, kernel_dir, bootimg_dir, native_sysroot) \
+ = find_artifacts(options.image_name)
wks_file = args[0]
@@ -172,8 +172,6 @@ def wic_create_subcommand(args, usage_str):
not_found = not_found_dir = ""
if not os.path.isdir(rootfs_dir):
(not_found, not_found_dir) = ("rootfs-dir", rootfs_dir)
- elif not os.path.isdir(hdddir) and not os.path.isdir(staging_data_dir):
- (not_found, not_found_dir) = ("bootimg-dir", bootimg_dir)
elif not os.path.isdir(kernel_dir):
(not_found, not_found_dir) = ("kernel-dir", kernel_dir)
elif not os.path.isdir(native_sysroot):
@@ -197,8 +195,8 @@ def wic_create_subcommand(args, usage_str):
rootfs_dir = rootfs_dir_to_args(krootfs_dir)
wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
- native_sysroot, hdddir, staging_data_dir, scripts_path,
- image_output_dir, options.debug, options.properties_file)
+ native_sysroot, scripts_path, image_output_dir,
+ options.debug, options.properties_file)
def wic_list_subcommand(args, usage_str):
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 05/11] wic: Update bootimg-partition to use bootimg_dir
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
` (3 preceding siblings ...)
2014-11-26 16:22 ` [PATCH 04/11] wic: Remove special-case bootimg_dir Armin Kuster
@ 2014-11-26 16:22 ` Armin Kuster
2014-11-26 16:22 ` [PATCH 06/11] babeltrace: Backport fix for unaligned integer Armin Kuster
` (6 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2014-11-26 16:22 UTC (permalink / raw)
To: openembedded-core; +Cc: Tom Zanussi
From: Tom Zanussi <tom.zanussi@linux.intel.com>
Update bootimg-partition to use bootimg_dir instead of img_deploy_dir,
to match similar usage in other plugins.
As mentioned elsewhere, plugins should use the passed-in value for
bootimg_dir directly if non-null, which corresponds to a user-assigned
value specified via a -b command-line param, and only fetch the value
from bitbake if that value is null.
(From OE-Core rev: 3822f8a7b33da56ecd9144b4bcae50734fb1af81)
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
scripts/lib/wic/plugins/source/bootimg-partition.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py
index cc72b2f..abf2494 100644
--- a/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -71,8 +71,13 @@ class BootimgPartitionPlugin(SourcePlugin):
install_cmd = "install -d %s" % hdddir
exec_cmd(install_cmd)
+ if not bootimg_dir:
+ bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not bootimg_dir:
+ msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n")
+
msger.debug('Bootimg dir: %s' % bootimg_dir)
- img_deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+
boot_files = get_bitbake_var("IMAGE_BOOT_FILES")
if not boot_files:
@@ -93,7 +98,7 @@ class BootimgPartitionPlugin(SourcePlugin):
for deploy_entry in deploy_files:
src, dst = deploy_entry
- src_path = os.path.join(img_deploy_dir, src)
+ src_path = os.path.join(bootimg_dir, src)
dst_path = os.path.join(hdddir, dst)
msger.debug('Install %s as %s' % (os.path.basename(src_path),
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 06/11] babeltrace: Backport fix for unaligned integer
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
` (4 preceding siblings ...)
2014-11-26 16:22 ` [PATCH 05/11] wic: Update bootimg-partition to use bootimg_dir Armin Kuster
@ 2014-11-26 16:22 ` Armin Kuster
2014-11-26 16:22 ` [PATCH 07/11] shadow-securetty: add ttyAM[0-3] serial ports Armin Kuster
` (5 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2014-11-26 16:22 UTC (permalink / raw)
To: openembedded-core
From: Saul Wold <sgw@linux.intel.com>
[YOCTO #6464]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
...n-t-perform-unaligned-integer-read-writes.patch | 252 +++++++++++++++++++++
meta/recipes-kernel/lttng/babeltrace_1.2.1.bb | 1 +
2 files changed, 253 insertions(+)
create mode 100644 meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch
diff --git a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch
new file mode 100644
index 0000000..ea0aad6
--- /dev/null
+++ b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch
@@ -0,0 +1,252 @@
+From 6a0b6cd5133db9e3c72914d4e5dd7fc792360934 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Wed, 16 Jul 2014 10:58:48 -0400
+Subject: [PATCH] Fix: don't perform unaligned integer read/writes
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+
+Upstream-Status: Backport
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+---
+ formats/ctf/types/integer.c | 108 ++++++++++++++++++++++++++++----------------
+ 1 file changed, 70 insertions(+), 38 deletions(-)
+
+diff --git a/formats/ctf/types/integer.c b/formats/ctf/types/integer.c
+index 189943e..85931be 100644
+--- a/formats/ctf/types/integer.c
++++ b/formats/ctf/types/integer.c
+@@ -62,7 +62,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
+ {
+ uint8_t v;
+
+- v = *(const uint8_t *) ctf_get_pos_addr(pos);
++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
+ integer_definition->value._unsigned = v;
+ break;
+ }
+@@ -70,7 +70,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
+ {
+ uint16_t v;
+
+- v = *(const uint16_t *) ctf_get_pos_addr(pos);
++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
+ integer_definition->value._unsigned =
+ rbo ? GUINT16_SWAP_LE_BE(v) : v;
+ break;
+@@ -79,7 +79,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
+ {
+ uint32_t v;
+
+- v = *(const uint32_t *) ctf_get_pos_addr(pos);
++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
+ integer_definition->value._unsigned =
+ rbo ? GUINT32_SWAP_LE_BE(v) : v;
+ break;
+@@ -88,7 +88,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
+ {
+ uint64_t v;
+
+- v = *(const uint64_t *) ctf_get_pos_addr(pos);
++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
+ integer_definition->value._unsigned =
+ rbo ? GUINT64_SWAP_LE_BE(v) : v;
+ break;
+@@ -102,7 +102,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
+ {
+ int8_t v;
+
+- v = *(const int8_t *) ctf_get_pos_addr(pos);
++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
+ integer_definition->value._signed = v;
+ break;
+ }
+@@ -110,7 +110,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
+ {
+ int16_t v;
+
+- v = *(const int16_t *) ctf_get_pos_addr(pos);
++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
+ integer_definition->value._signed =
+ rbo ? (int16_t) GUINT16_SWAP_LE_BE(v) : v;
+ break;
+@@ -119,7 +119,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
+ {
+ int32_t v;
+
+- v = *(const int32_t *) ctf_get_pos_addr(pos);
++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
+ integer_definition->value._signed =
+ rbo ? (int32_t) GUINT32_SWAP_LE_BE(v) : v;
+ break;
+@@ -128,7 +128,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
+ {
+ int64_t v;
+
+- v = *(const int64_t *) ctf_get_pos_addr(pos);
++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
+ integer_definition->value._signed =
+ rbo ? (int64_t) GUINT64_SWAP_LE_BE(v) : v;
+ break;
+@@ -163,48 +163,80 @@ int _aligned_integer_write(struct bt_stream_pos *ppos,
+ if (pos->dummy)
+ goto end;
+ if (!integer_declaration->signedness) {
+- uint64_t v = integer_definition->value._unsigned;
+-
+ switch (integer_declaration->len) {
+- case 8: *(uint8_t *) ctf_get_pos_addr(pos) = (uint8_t) v;
++ case 8:
++ {
++ uint8_t v = integer_definition->value._unsigned;
++
++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
+ break;
++ }
+ case 16:
+- *(uint16_t *) ctf_get_pos_addr(pos) = rbo ?
+- GUINT16_SWAP_LE_BE((uint16_t) v) :
+- (uint16_t) v;
++ {
++ uint16_t v = integer_definition->value._unsigned;
++
++ if (rbo)
++ v = GUINT16_SWAP_LE_BE(v);
++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
+ break;
++ }
+ case 32:
+- *(uint32_t *) ctf_get_pos_addr(pos) = rbo ?
+- GUINT32_SWAP_LE_BE((uint32_t) v) :
+- (uint32_t) v;
++ {
++ uint32_t v = integer_definition->value._unsigned;
++
++ if (rbo)
++ v = GUINT32_SWAP_LE_BE(v);
++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
+ break;
++ }
+ case 64:
+- *(uint64_t *) ctf_get_pos_addr(pos) = rbo ?
+- GUINT64_SWAP_LE_BE(v) : v;
++ {
++ uint64_t v = integer_definition->value._unsigned;
++
++ if (rbo)
++ v = GUINT64_SWAP_LE_BE(v);
++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
+ break;
++ }
+ default:
+ assert(0);
+ }
+ } else {
+- int64_t v = integer_definition->value._signed;
+-
+ switch (integer_declaration->len) {
+- case 8: *(int8_t *) ctf_get_pos_addr(pos) = (int8_t) v;
++ case 8:
++ {
++ uint8_t v = integer_definition->value._signed;
++
++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
+ break;
++ }
+ case 16:
+- *(int16_t *) ctf_get_pos_addr(pos) = rbo ?
+- (int16_t) GUINT16_SWAP_LE_BE((int16_t) v) :
+- (int16_t) v;
++ {
++ int16_t v = integer_definition->value._signed;
++
++ if (rbo)
++ v = GUINT16_SWAP_LE_BE(v);
++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
+ break;
++ }
+ case 32:
+- *(int32_t *) ctf_get_pos_addr(pos) = rbo ?
+- (int32_t) GUINT32_SWAP_LE_BE((int32_t) v) :
+- (int32_t) v;
++ {
++ int32_t v = integer_definition->value._signed;
++
++ if (rbo)
++ v = GUINT32_SWAP_LE_BE(v);
++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
+ break;
++ }
+ case 64:
+- *(int64_t *) ctf_get_pos_addr(pos) = rbo ?
+- GUINT64_SWAP_LE_BE(v) : v;
++ {
++ int64_t v = integer_definition->value._signed;
++
++ if (rbo)
++ v = GUINT64_SWAP_LE_BE(v);
++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
+ break;
++ }
+ default:
+ assert(0);
+ }
+@@ -237,23 +269,23 @@ int ctf_integer_read(struct bt_stream_pos *ppos, struct bt_definition *definitio
+ if (!integer_declaration->signedness) {
+ if (integer_declaration->byte_order == LITTLE_ENDIAN)
+ bt_bitfield_read_le(mmap_align_addr(pos->base_mma) +
+- pos->mmap_base_offset, unsigned long,
++ pos->mmap_base_offset, unsigned char,
+ pos->offset, integer_declaration->len,
+ &integer_definition->value._unsigned);
+ else
+ bt_bitfield_read_be(mmap_align_addr(pos->base_mma) +
+- pos->mmap_base_offset, unsigned long,
++ pos->mmap_base_offset, unsigned char,
+ pos->offset, integer_declaration->len,
+ &integer_definition->value._unsigned);
+ } else {
+ if (integer_declaration->byte_order == LITTLE_ENDIAN)
+ bt_bitfield_read_le(mmap_align_addr(pos->base_mma) +
+- pos->mmap_base_offset, unsigned long,
++ pos->mmap_base_offset, unsigned char,
+ pos->offset, integer_declaration->len,
+ &integer_definition->value._signed);
+ else
+ bt_bitfield_read_be(mmap_align_addr(pos->base_mma) +
+- pos->mmap_base_offset, unsigned long,
++ pos->mmap_base_offset, unsigned char,
+ pos->offset, integer_declaration->len,
+ &integer_definition->value._signed);
+ }
+@@ -286,23 +318,23 @@ int ctf_integer_write(struct bt_stream_pos *ppos, struct bt_definition *definiti
+ if (!integer_declaration->signedness) {
+ if (integer_declaration->byte_order == LITTLE_ENDIAN)
+ bt_bitfield_write_le(mmap_align_addr(pos->base_mma) +
+- pos->mmap_base_offset, unsigned long,
++ pos->mmap_base_offset, unsigned char,
+ pos->offset, integer_declaration->len,
+ integer_definition->value._unsigned);
+ else
+ bt_bitfield_write_be(mmap_align_addr(pos->base_mma) +
+- pos->mmap_base_offset, unsigned long,
++ pos->mmap_base_offset, unsigned char,
+ pos->offset, integer_declaration->len,
+ integer_definition->value._unsigned);
+ } else {
+ if (integer_declaration->byte_order == LITTLE_ENDIAN)
+ bt_bitfield_write_le(mmap_align_addr(pos->base_mma) +
+- pos->mmap_base_offset, unsigned long,
++ pos->mmap_base_offset, unsigned char,
+ pos->offset, integer_declaration->len,
+ integer_definition->value._signed);
+ else
+ bt_bitfield_write_be(mmap_align_addr(pos->base_mma) +
+- pos->mmap_base_offset, unsigned long,
++ pos->mmap_base_offset, unsigned char,
+ pos->offset, integer_declaration->len,
+ integer_definition->value._signed);
+ }
+--
+1.8.3.1
+
diff --git a/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb b/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb
index dd9961c..1c41e25 100644
--- a/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb
+++ b/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb
@@ -16,6 +16,7 @@ PV = "1.2.1+git${SRCPV}"
SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2 \
file://0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch \
file://Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch \
+ file://0001-Fix-don-t-perform-unaligned-integer-read-writes.patch \
"
S = "${WORKDIR}/git"
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 07/11] shadow-securetty: add ttyAM[0-3] serial ports
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
` (5 preceding siblings ...)
2014-11-26 16:22 ` [PATCH 06/11] babeltrace: Backport fix for unaligned integer Armin Kuster
@ 2014-11-26 16:22 ` Armin Kuster
2014-11-26 16:22 ` [PATCH 08/11] python: Fix CVE-2014-7185 Armin Kuster
` (4 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2014-11-26 16:22 UTC (permalink / raw)
To: openembedded-core; +Cc: Javier Viguera
From: Javier Viguera <javier.viguera@digi.com>
Old version of the ARM AMBA serial port driver creates those device nodes.
(From OE-Core rev: fa17b9ea435f5c49e3bea56524152b21d915d464)
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
meta/recipes-extended/shadow/files/securetty | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/recipes-extended/shadow/files/securetty b/meta/recipes-extended/shadow/files/securetty
index 7fecda1..ecc246f 100644
--- a/meta/recipes-extended/shadow/files/securetty
+++ b/meta/recipes-extended/shadow/files/securetty
@@ -9,6 +9,10 @@ ttyS2
ttyS3
# ARM AMBA SoCs
+ttyAM0
+ttyAM1
+ttyAM2
+ttyAM3
ttyAMA0
ttyAMA1
ttyAMA2
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 08/11] python: Fix CVE-2014-7185
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
` (6 preceding siblings ...)
2014-11-26 16:22 ` [PATCH 07/11] shadow-securetty: add ttyAM[0-3] serial ports Armin Kuster
@ 2014-11-26 16:22 ` Armin Kuster
2014-11-26 16:22 ` [PATCH 09/11] package_manager: DpkgPM fix populate_sdk Armin Kuster
` (3 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2014-11-26 16:22 UTC (permalink / raw)
To: openembedded-core
From: Wenzong Fan <wenzong.fan@windriver.com>
Integer overflow in bufferobject.c in Python before 2.7.8 allows
context-dependent attackers to obtain sensitive information from
process memory via a large size and offset in a "buffer" function.
This back-ported patch fixes CVE-2014-7185
(From OE-Core rev: 49ceed974e39ab8ac4be410e5caa5e1ef7a646d9)
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Conflicts:
meta/recipes-devtools/python/python_2.7.3.bb
hand merged bb file since I did not take previous patch.
---
.../python/python/python-2.7.3-CVE-2014-7185.patch | 75 ++++++++++++++++++++++
meta/recipes-devtools/python/python_2.7.3.bb | 1 +
2 files changed, 76 insertions(+)
create mode 100644 meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
new file mode 100644
index 0000000..60ef145
--- /dev/null
+++ b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
@@ -0,0 +1,75 @@
+From 104eb318283dde5203aa6cf7384287bef181e308 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Wed, 12 Nov 2014 01:58:02 -0500
+Subject: [PATCH] python: fix CVE-2014-7185
+
+Reference: http://bugs.python.org/issue21831
+
+CVE-2014-7185: Integer overflow in bufferobject.c in Python before
+2.7.8 allows context-dependent attackers to obtain sensitive
+information from process memory via a large size and offset in a
+"buffer" function.
+
+Upstream-Status: Backport
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ Lib/test/test_buffer.py | 6 ++++++
+ Misc/NEWS | 3 +++
+ Objects/bufferobject.c | 2 +-
+ 3 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_buffer.py b/Lib/test/test_buffer.py
+index 6bdc34d..3ac1f8c 100644
+--- a/Lib/test/test_buffer.py
++++ b/Lib/test/test_buffer.py
+@@ -4,6 +4,7 @@ For now, tests just new or changed functionality.
+
+ """
+
++import sys
+ import unittest
+ from test import test_support
+
+@@ -21,6 +22,11 @@ class BufferTests(unittest.TestCase):
+ self.assertEqual(b[start:stop:step],
+ s[start:stop:step])
+
++ def test_large_buffer_size_and_offset(self):
++ data = bytearray('hola mundo')
++ buf = buffer(data, sys.maxsize, sys.maxsize)
++ self.assertEqual(buf[:4096], "")
++
+
+ def test_main():
+ with test_support.check_py3k_warnings(("buffer.. not supported",
+diff --git a/Misc/NEWS b/Misc/NEWS
+index e8778ad..77396c5 100644
+--- a/Misc/NEWS
++++ b/Misc/NEWS
+@@ -1896,6 +1896,9 @@ What's New in Python 2.7 Release Candidate 1?
+ Core and Builtins
+ -----------------
+
++- Issue #21831: Avoid integer overflow when large sizes and offsets are given to
++ the buffer type. CVE-2014-7185.
++
+ - Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the
+ start byte and the continuation byte(s) are now considered invalid, instead
+ of the number of bytes specified by the start byte.
+diff --git a/Objects/bufferobject.c b/Objects/bufferobject.c
+index c52f0bc..c542506 100644
+--- a/Objects/bufferobject.c
++++ b/Objects/bufferobject.c
+@@ -88,7 +88,7 @@ get_buf(PyBufferObject *self, void **ptr, Py_ssize_t *size,
+ *size = count;
+ else
+ *size = self->b_size;
+- if (offset + *size > count)
++ if (*size > count - offset)
+ *size = count - offset;
+ }
+ return 1;
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index cc92ebc..2547ea4 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -38,6 +38,7 @@ SRC_URI += "\
file://python-2.7.3-CVE-2014-1912.patch \
file://json-flaw-fix.patch \
file://posix_close.patch \
+ file://python-2.7.3-CVE-2014-7185.patch \
"
S = "${WORKDIR}/Python-${PV}"
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 09/11] package_manager: DpkgPM fix populate_sdk
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
` (7 preceding siblings ...)
2014-11-26 16:22 ` [PATCH 08/11] python: Fix CVE-2014-7185 Armin Kuster
@ 2014-11-26 16:22 ` Armin Kuster
2014-11-26 16:22 ` [PATCH 10/11] xkeyboard-config: Inherit gettext Armin Kuster
` (2 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2014-11-26 16:22 UTC (permalink / raw)
To: openembedded-core
From: Aníbal Limón <anibal.limon@linux.intel.com>
DpkgPM change all_arch_list variable set from PACKAGE_ARCHS to passed
archs variable because is different when is executed from rootfs.py
and sdk.py.
Credits to: Ricardo Ribalda <ricardo.ribalda@gmail.com>
(From OE-Core rev: f6fb8c16f49fd9a2b124ad55f5c4fed82d7e6dca)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
meta/lib/oe/package_manager.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 27fdf26..19895e5 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1477,7 +1477,7 @@ class DpkgPM(PackageManager):
self.apt_args = d.getVar("APT_ARGS", True)
- self.all_arch_list = self.d.getVar('PACKAGE_ARCHS', True).split()
+ self.all_arch_list = archs.split()
all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').split()
self.all_arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in self.all_arch_list)
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 10/11] xkeyboard-config: Inherit gettext
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
` (8 preceding siblings ...)
2014-11-26 16:22 ` [PATCH 09/11] package_manager: DpkgPM fix populate_sdk Armin Kuster
@ 2014-11-26 16:22 ` Armin Kuster
2014-11-26 16:22 ` [PATCH 11/11] qemu: disable the build for mips Armin Kuster
2014-11-26 17:01 ` [PATCH 00/11] Dizzy next #2 Tom Zanussi
11 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2014-11-26 16:22 UTC (permalink / raw)
To: openembedded-core; +Cc: Andrei Gherzan
From: Andrei Gherzan <andrei@gherzan.ro>
In a GPLv3-free build we have two different versions of gettext in sysroot due
to GPLv3 restrictions. In this case we need gettext-native too so we can have
the needed macros and avoid errors like:
"error: possibly undefined macro: AM_GNU_GETTEXT"
The needed dependency is added by gettext class which is prefered because it
takes care of NLS flags too.
(From OE-Core rev: 23d8a4d64e9ff126d6460a69e6d086b1c86e87a9)
Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
meta/recipes-graphics/xorg-lib/xkeyboard-config_2.12.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.12.bb b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.12.bb
index 61e3847..adac0ee 100644
--- a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.12.bb
+++ b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.12.bb
@@ -23,7 +23,7 @@ EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
FILES_${PN} += "${datadir}/X11/xkb"
-inherit autotools pkgconfig
+inherit autotools pkgconfig gettext
do_install_append () {
install -d ${D}${datadir}/X11/xkb/compiled
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 11/11] qemu: disable the build for mips
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
` (9 preceding siblings ...)
2014-11-26 16:22 ` [PATCH 10/11] xkeyboard-config: Inherit gettext Armin Kuster
@ 2014-11-26 16:22 ` Armin Kuster
2014-11-26 17:01 ` [PATCH 00/11] Dizzy next #2 Tom Zanussi
11 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2014-11-26 16:22 UTC (permalink / raw)
To: openembedded-core
From: Robert Yang <liezhi.yang@windriver.com>
Disable it since ICE on mips with wr toolchain only:
translate.c:7838:1: internal compiler error: Segmentation fault
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
meta/recipes-devtools/qemu/qemu_2.1.0.bb | 1 +
meta/recipes-devtools/qemu/qemu_git.bb | 1 +
2 files changed, 2 insertions(+)
diff --git a/meta/recipes-devtools/qemu/qemu_2.1.0.bb b/meta/recipes-devtools/qemu/qemu_2.1.0.bb
index a82d052..e58829e 100644
--- a/meta/recipes-devtools/qemu/qemu_2.1.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.1.0.bb
@@ -13,6 +13,7 @@ SRC_URI[md5sum] = "6726977292b448cbc7f89998fac6983b"
SRC_URI[sha256sum] = "397e23184f4bf613589a8fe0c6542461dc2afdf17ed337e97e6fd2f31e8f8802"
COMPATIBLE_HOST_class-target_mips64 = "null"
+COMPATIBLE_HOST_class-target_mips = "null"
do_sanitize_sources() {
# These .git files point to a nonexistent path "../.git/modules" and will confuse git
diff --git a/meta/recipes-devtools/qemu/qemu_git.bb b/meta/recipes-devtools/qemu/qemu_git.bb
index a30932a..cefed90 100644
--- a/meta/recipes-devtools/qemu/qemu_git.bb
+++ b/meta/recipes-devtools/qemu/qemu_git.bb
@@ -13,3 +13,4 @@ S = "${WORKDIR}/git"
DEFAULT_PREFERENCE = "-1"
COMPATIBLE_HOST_class-target_mips64 = "null"
+COMPATIBLE_HOST_class-target_mips = "null"
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 00/11] Dizzy next #2
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
` (10 preceding siblings ...)
2014-11-26 16:22 ` [PATCH 11/11] qemu: disable the build for mips Armin Kuster
@ 2014-11-26 17:01 ` Tom Zanussi
2014-11-26 22:28 ` akuster808
11 siblings, 1 reply; 14+ messages in thread
From: Tom Zanussi @ 2014-11-26 17:01 UTC (permalink / raw)
To: Armin Kuster; +Cc: Javier Viguera, Andrei Gherzan, openembedded-core
Hi,
Looks fine to me, but it's still missing this (or were you planning on
adding it to your next round?):
commit 4c222d3a67bae265ff42b448ef4a643b0131e578
Author: He Zhe <zhe.he@windriver.com>
Date: Tue Oct 21 17:47:44 2014 +0800
kernel.bbclass: Create modules directory even if there is no modules
install
Which fixes a problem introduced by:
commit 3224472c68865714716305dfbc8efaa59f73958e
Author: Nitin A Kamble <nitin.a.kamble@intel.com>
Date: Tue Sep 30 14:40:05 2014 -0700
kernel.bbclass: enable a link for external module building
Which I'm now also seeing cause problems with the kernel labs.
Thanks,
Tom
On Wed, 2014-11-26 at 08:22 -0800, Armin Kuster wrote:
> Please consider these changes for the next Dizzy.
>
> The following changes since commit 85b8abe50482deaa1af62f265e82f53a54bbcd77:
>
> nss: define MP_USE_UINT_DIGIT when compile mpi_x86.s (2014-11-24 16:38:18 -0800)
>
> are available in the git repository at:
>
> git://git.yoctoproject.org/poky-contrib akuster/dizzy-next
> http://git.yoctoproject.org/cgit.cgi//log/?h=akuster/dizzy-next
>
> Andrei Gherzan (1):
> xkeyboard-config: Inherit gettext
>
> Aníbal Limón (1):
> package_manager: DpkgPM fix populate_sdk
>
> Javier Viguera (1):
> shadow-securetty: add ttyAM[0-3] serial ports
>
> Robert Yang (1):
> qemu: disable the build for mips
>
> Saul Wold (1):
> babeltrace: Backport fix for unaligned integer
>
> Tom Zanussi (5):
> wic: Don't allow mkfs to fail silently in partition command
> wic: Update the help text to include -D (--debug)
> Revert "wic: set bootimg_dir when using image-name artifacts"
> wic: Remove special-case bootimg_dir
> wic: Update bootimg-partition to use bootimg_dir
>
> Wenzong Fan (1):
> python: Fix CVE-2014-7185
>
> meta/lib/oe/package_manager.py | 2 +-
> .../python/python/python-2.7.3-CVE-2014-7185.patch | 75 ++++++
> meta/recipes-devtools/python/python_2.7.3.bb | 1 +
> meta/recipes-devtools/qemu/qemu_2.1.0.bb | 1 +
> meta/recipes-devtools/qemu/qemu_git.bb | 1 +
> meta/recipes-extended/shadow/files/securetty | 4 +
> .../xorg-lib/xkeyboard-config_2.12.bb | 2 +-
> ...n-t-perform-unaligned-integer-read-writes.patch | 252 +++++++++++++++++++++
> meta/recipes-kernel/lttng/babeltrace_1.2.1.bb | 1 +
> scripts/lib/image/engine.py | 42 +---
> scripts/lib/image/help.py | 23 +-
> scripts/lib/wic/imager/direct.py | 5 +-
> .../lib/wic/kickstart/custom_commands/partition.py | 22 +-
> scripts/lib/wic/plugins/imager/direct_plugin.py | 20 +-
> scripts/lib/wic/plugins/source/bootimg-efi.py | 5 +-
> .../lib/wic/plugins/source/bootimg-partition.py | 9 +-
> scripts/lib/wic/plugins/source/bootimg-pcbios.py | 3 +-
> scripts/wic | 13 +-
> 18 files changed, 402 insertions(+), 79 deletions(-)
> create mode 100644 meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
> create mode 100644 meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch
>
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 00/11] Dizzy next #2
2014-11-26 17:01 ` [PATCH 00/11] Dizzy next #2 Tom Zanussi
@ 2014-11-26 22:28 ` akuster808
0 siblings, 0 replies; 14+ messages in thread
From: akuster808 @ 2014-11-26 22:28 UTC (permalink / raw)
To: Tom Zanussi; +Cc: Javier Viguera, Andrei Gherzan, openembedded-core
On 11/26/2014 09:01 AM, Tom Zanussi wrote:
> Hi,
>
> Looks fine to me, but it's still missing this (or were you planning on
> adding it to your next round?):
yeah.
thanks for the reminder.
- Armin
>
> commit 4c222d3a67bae265ff42b448ef4a643b0131e578
> Author: He Zhe <zhe.he@windriver.com>
> Date: Tue Oct 21 17:47:44 2014 +0800
>
> kernel.bbclass: Create modules directory even if there is no modules
> install
>
> Which fixes a problem introduced by:
>
> commit 3224472c68865714716305dfbc8efaa59f73958e
> Author: Nitin A Kamble <nitin.a.kamble@intel.com>
> Date: Tue Sep 30 14:40:05 2014 -0700
>
> kernel.bbclass: enable a link for external module building
>
> Which I'm now also seeing cause problems with the kernel labs.
>
> Thanks,
>
> Tom
>
> On Wed, 2014-11-26 at 08:22 -0800, Armin Kuster wrote:
>> Please consider these changes for the next Dizzy.
>>
>> The following changes since commit 85b8abe50482deaa1af62f265e82f53a54bbcd77:
>>
>> nss: define MP_USE_UINT_DIGIT when compile mpi_x86.s (2014-11-24 16:38:18 -0800)
>>
>> are available in the git repository at:
>>
>> git://git.yoctoproject.org/poky-contrib akuster/dizzy-next
>> http://git.yoctoproject.org/cgit.cgi//log/?h=akuster/dizzy-next
>>
>> Andrei Gherzan (1):
>> xkeyboard-config: Inherit gettext
>>
>> Aníbal Limón (1):
>> package_manager: DpkgPM fix populate_sdk
>>
>> Javier Viguera (1):
>> shadow-securetty: add ttyAM[0-3] serial ports
>>
>> Robert Yang (1):
>> qemu: disable the build for mips
>>
>> Saul Wold (1):
>> babeltrace: Backport fix for unaligned integer
>>
>> Tom Zanussi (5):
>> wic: Don't allow mkfs to fail silently in partition command
>> wic: Update the help text to include -D (--debug)
>> Revert "wic: set bootimg_dir when using image-name artifacts"
>> wic: Remove special-case bootimg_dir
>> wic: Update bootimg-partition to use bootimg_dir
>>
>> Wenzong Fan (1):
>> python: Fix CVE-2014-7185
>>
>> meta/lib/oe/package_manager.py | 2 +-
>> .../python/python/python-2.7.3-CVE-2014-7185.patch | 75 ++++++
>> meta/recipes-devtools/python/python_2.7.3.bb | 1 +
>> meta/recipes-devtools/qemu/qemu_2.1.0.bb | 1 +
>> meta/recipes-devtools/qemu/qemu_git.bb | 1 +
>> meta/recipes-extended/shadow/files/securetty | 4 +
>> .../xorg-lib/xkeyboard-config_2.12.bb | 2 +-
>> ...n-t-perform-unaligned-integer-read-writes.patch | 252 +++++++++++++++++++++
>> meta/recipes-kernel/lttng/babeltrace_1.2.1.bb | 1 +
>> scripts/lib/image/engine.py | 42 +---
>> scripts/lib/image/help.py | 23 +-
>> scripts/lib/wic/imager/direct.py | 5 +-
>> .../lib/wic/kickstart/custom_commands/partition.py | 22 +-
>> scripts/lib/wic/plugins/imager/direct_plugin.py | 20 +-
>> scripts/lib/wic/plugins/source/bootimg-efi.py | 5 +-
>> .../lib/wic/plugins/source/bootimg-partition.py | 9 +-
>> scripts/lib/wic/plugins/source/bootimg-pcbios.py | 3 +-
>> scripts/wic | 13 +-
>> 18 files changed, 402 insertions(+), 79 deletions(-)
>> create mode 100644 meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
>> create mode 100644 meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch
>>
>> --
>> 1.9.1
>>
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-11-26 22:28 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-26 16:22 [PATCH 00/11] Dizzy next #2 Armin Kuster
2014-11-26 16:22 ` [PATCH 01/11] wic: Don't allow mkfs to fail silently in partition command Armin Kuster
2014-11-26 16:22 ` [PATCH 02/11] wic: Update the help text to include -D (--debug) Armin Kuster
2014-11-26 16:22 ` [PATCH 03/11] Revert "wic: set bootimg_dir when using image-name artifacts" Armin Kuster
2014-11-26 16:22 ` [PATCH 04/11] wic: Remove special-case bootimg_dir Armin Kuster
2014-11-26 16:22 ` [PATCH 05/11] wic: Update bootimg-partition to use bootimg_dir Armin Kuster
2014-11-26 16:22 ` [PATCH 06/11] babeltrace: Backport fix for unaligned integer Armin Kuster
2014-11-26 16:22 ` [PATCH 07/11] shadow-securetty: add ttyAM[0-3] serial ports Armin Kuster
2014-11-26 16:22 ` [PATCH 08/11] python: Fix CVE-2014-7185 Armin Kuster
2014-11-26 16:22 ` [PATCH 09/11] package_manager: DpkgPM fix populate_sdk Armin Kuster
2014-11-26 16:22 ` [PATCH 10/11] xkeyboard-config: Inherit gettext Armin Kuster
2014-11-26 16:22 ` [PATCH 11/11] qemu: disable the build for mips Armin Kuster
2014-11-26 17:01 ` [PATCH 00/11] Dizzy next #2 Tom Zanussi
2014-11-26 22:28 ` akuster808
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox