5.5.2-stable review
Subsystems (2)
Greg Kroah-Hartman
maintainercover 5.5.2-stable review
This is the start of the stable review cycle for the 5.5.2 release. There are 23 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 05 Feb 2020 16:17:59 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.2-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.5.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.5.2-rc1
Michal Koutný <[email protected]>
cgroup: Prevent double killing of css when enabling threaded cgroup
Dan Carpenter <[email protected]>
Bluetooth: Fix race condition in hci_release_sock()
Zhenzhong Duan <[email protected]>
ttyprintk: fix a potential deadlock in interrupt context issue
Tetsuo Handa <[email protected]>
tomoyo: Use atomic_t for statistics counter
Hans Verkuil <[email protected]>
media: dvb-usb/dvb-usb-urb.c: initialize actlen to 0
Hans Verkuil <[email protected]>
media: gspca: zero usb_buf
Sean Young <[email protected]>
media: vp7045: do not read uninitialized values if usb transfer fails
Sean Young <[email protected]>
media: af9005: uninitialized variable printked
Sean Young <[email protected]>
media: digitv: don't continue if remote control state can't be read
Jan Kara <[email protected]>
reiserfs: Fix memory leak of journal device string
Dan Carpenter <[email protected]>
mm/mempolicy.c: fix out of bounds write in mpol_parse_str()
Dirk Behme <[email protected]>
arm64: kbuild: remove compressed images on 'make ARCH=arm64 (dist)clean'
Vitaly Chikunov <[email protected]>
tools lib: Fix builds when glibc contains strlcpy()
Chanwoo Choi <[email protected]>
PM / devfreq: Add new name attribute for sysfs
Andres Freund <[email protected]>
perf c2c: Fix return type for histogram sorting comparision functions
Andy Shevchenko <[email protected]>
lib/test_bitmap: correct test data offsets for 32-bit
Andreas Gruenbacher <[email protected]>
gfs2: Another gfs2_find_jhead fix
David Michael <[email protected]>
KVM: PPC: Book3S PR: Fix -Werror=return-type build failure
Xiaochen Shen <[email protected]>
x86/resctrl: Fix use-after-free due to inaccurate refcount of rdtgroup
Xiaochen Shen <[email protected]>
x86/resctrl: Fix use-after-free when deleting resource groups
Xiaochen Shen <[email protected]>
x86/resctrl: Fix a deadlock due to inaccurate reference
Ronnie Sahlberg <[email protected]>
cifs: fix soft mounts hanging in the reconnect code
Al Viro <[email protected]>
vfs: fix do_last() regression
-------------
Diffstat:
Documentation/ABI/testing/sysfs-class-devfreq | 7 +++ Makefile | 4 +- arch/arm64/boot/Makefile | 2 +- arch/powerpc/kvm/book3s_pr.c | 1 + arch/x86/kernel/cpu/resctrl/rdtgroup.c | 32 ++++++++----- drivers/char/ttyprintk.c | 15 +++--- drivers/devfreq/devfreq.c | 9 ++++ drivers/media/usb/dvb-usb/af9005.c | 2 +- drivers/media/usb/dvb-usb/digitv.c | 10 ++-- drivers/media/usb/dvb-usb/dvb-usb-urb.c | 2 +- drivers/media/usb/dvb-usb/vp7045.c | 21 ++++++--- drivers/media/usb/gspca/gspca.c | 2 +- fs/cifs/smb2pdu.c | 2 +- fs/gfs2/lops.c | 68 +++++++++++++++++---------- fs/namei.c | 4 +- fs/reiserfs/super.c | 2 + kernel/cgroup/cgroup.c | 11 +++-- lib/test_bitmap.c | 9 ++-- mm/mempolicy.c | 6 +-- net/bluetooth/hci_sock.c | 3 ++ security/tomoyo/common.c | 11 ++--- tools/include/linux/string.h | 8 ++++ tools/lib/string.c | 7 +++ tools/perf/builtin-c2c.c | 10 ++-- 24 files changed, 164 insertions(+), 84 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/23 vfs: fix do_last() regression
From: Al Viro <[email protected]>
commit 6404674acd596de41fd3ad5f267b4525494a891a upstream.
Brown paperbag time: fetching ->i_uid/->i_mode really should've been done from nd->inode. I even suggested that, but the reason for that has slipped through the cracks and I went for dir->d_inode instead - made for more "obvious" patch.
Analysis:
- at the entry into do_last() and all the way to step_into(): dir (aka nd->path.dentry) is known not to have been freed; so's nd->inode and it's equal to dir->d_inode unless we are already doomed to -ECHILD. inode of the file to get opened is not known.
- after step_into(): inode of the file to get opened is known; dir might be pointing to freed memory/be negative/etc.
- at the call of may_create_in_sticky(): guaranteed to be out of RCU mode; inode of the file to get opened is known and pinned; dir might be garbage.
The last was the reason for the original patch. Except that at the do_last() entry we can be in RCU mode and it is possible that nd->path.dentry->d_inode has already changed under us.
In that case we are going to fail with -ECHILD, but we need to be careful; nd->inode is pointing to valid struct inode and it's the same as nd->path.dentry->d_inode in "won't fail with -ECHILD" case, so we should use that.
Wearing-brown-paperbag: Al Viro <[email protected]>
--- fs/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/namei.c +2 -2
@@ -3202,8 +3202,8 @@ static int do_last(struct nameidata *nd, struct file *file, const struct open_flags *op) { struct dentry *dir = nd->path.dentry; -kuid_t dir_uid = dir->d_inode->i_uid; -umode_t dir_mode = dir->d_inode->i_mode; +kuid_t dir_uid = nd->inode->i_uid; +umode_t dir_mode = nd->inode->i_mode;int open_flag = op->open_flag;bool will_truncate = (open_flag &O_TRUNC ) !=0 ;bool got_write = false;
Greg Kroah-Hartman
maintainerPATCH 2/23 cifs: fix soft mounts hanging in the reconnect code
In reply to Greg Kroah-HartmanFrom: Ronnie Sahlberg <[email protected]>
commit c54849ddd832ae0a45cab16bcd1ed2db7da090d7 upstream.
RHBZ: 1795429
In recent DFS updates we have a new variable controlling how many times we will retry to reconnect the share.
If DFS is not used, then this variable is initialized to 0 in:
static inline intdfs_cache_get_nr_tgts(const struct dfs_cache_tgt_list *tl)
{
return tl ? tl->tl_numtgts : 0;
}This means that in the reconnect loop in smb2_reconnect() we will immediately wrap retries to -1 and never actually get to pass this conditional:
if (--retries)
continue;The effect is that we no longer reach the point where we fail the commands with -EHOSTDOWN and basically the kernel threads are virtually hung and unkillable.
--- fs/cifs/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/smb2pdu.c +1 -1
@@ -312,7 +312,7 @@ smb2_reconnect(__le16 smb2_command, struif (server->tcpStatus != CifsNeedReconnect)break ; -if (--retries) +if (retries && --retries)continue ;/*
Greg Kroah-Hartman
maintainerPATCH 3/23 x86/resctrl: Fix a deadlock due to inaccurate reference
In reply to Greg Kroah-HartmanFrom: Xiaochen Shen <[email protected]>
[ Upstream commit 334b0f4e9b1b4a1d475f803419d202f6c5e4d18e ]
There is a race condition which results in a deadlock when rmdir and mkdir execute concurrently:
$ ls /sys/fs/resctrl/c1/mon_groups/m1/ cpus cpus_list mon_data tasks
Thread 1: rmdir /sys/fs/resctrl/c1
Thread 2: mkdir /sys/fs/resctrl/c1/mon_groups/m1
3 locks held by mkdir/48649:
#0: (sb_writers#17){.+.+}, at: [<ffffffffb4ca2aa0>] mnt_want_write+0x20/0x50
#1: (&type->i_mutex_dir_key#8/1){+.+.}, at: [<ffffffffb4c8c13b>] filename_create+0x7b/0x170
#2: (rdtgroup_mutex){+.+.}, at: [<ffffffffb4a4389d>] rdtgroup_kn_lock_live+0x3d/0x704 locks held by rmdir/48652:
#0: (sb_writers#17){.+.+}, at: [<ffffffffb4ca2aa0>] mnt_want_write+0x20/0x50
#1: (&type->i_mutex_dir_key#8/1){+.+.}, at: [<ffffffffb4c8c3cf>] do_rmdir+0x13f/0x1e0
#2: (&type->i_mutex_dir_key#8){++++}, at: [<ffffffffb4c86d5d>] vfs_rmdir+0x4d/0x120
#3: (rdtgroup_mutex){+.+.}, at: [<ffffffffb4a4389d>] rdtgroup_kn_lock_live+0x3d/0x70Thread 1 is deleting control group "c1". Holding rdtgroup_mutex, kernfs_remove() removes all kernfs nodes under directory "c1" recursively, then waits for sub kernfs node "mon_groups" to drop active reference.
Thread 2 is trying to create a subdirectory "m1" in the "mon_groups" directory. The wrapper kernfs_iop_mkdir() takes an active reference to the "mon_groups" directory but the code drops the active reference to the parent directory "c1" instead.
As a result, Thread 1 is blocked on waiting for active reference to drop and never release rdtgroup_mutex, while Thread 2 is also blocked on trying to get rdtgroup_mutex.
Thread 1 (rdtgroup_rmdir) Thread 2 (rdtgroup_mkdir) (rmdir /sys/fs/resctrl/c1) (mkdir /sys/fs/resctrl/c1/mon_groups/m1) ------------------------- -------------------------
kernfs_iop_mkdir
/*
* kn: "m1", parent_kn: "mon_groups",
* prgrp_kn: parent_kn->parent: "c1", *
* "mon_groups", parent_kn->active++: 1 */
kernfs_get_active(parent_kn)kernfs_iop_rmdir
/* "c1", kn->active++ */
kernfs_get_active(kn)
rdtgroup_kn_lock_live
atomic_inc(&rdtgrp->waitcount)
/* "c1", kn->active-- */
kernfs_break_active_protection(kn)
mutex_lock rdtgroup_rmdir_ctrl
free_all_child_rdtgrp
sentry->flags = RDT_DELETED
rdtgroup_ctrl_remove
rdtgrp->flags = RDT_DELETED
kernfs_get(kn)
kernfs_remove(rdtgrp->kn)
__kernfs_remove
/* "mon_groups", sub_kn */
atomic_add(KN_DEACTIVATED_BIAS, &sub_kn->active)
kernfs_drain(sub_kn)
/*
* sub_kn->active == KN_DEACTIVATED_BIAS + 1,
* waiting on sub_kn->active to drop, but it
* never drops in Thread 2 which is blocked
* on getting rdtgroup_mutex.
*/Thread 1 hangs here ---->
wait_event(sub_kn->active == KN_DEACTIVATED_BIAS)
...
rdtgroup_mkdir
rdtgroup_mkdir_mon(parent_kn, prgrp_kn)
mkdir_rdt_prepare(parent_kn, prgrp_kn)
rdtgroup_kn_lock_live(prgrp_kn)
atomic_inc(&rdtgrp->waitcount) /*
* "c1", prgrp_kn->active-- *
* The active reference on "c1" is
* dropped, but not matching the
* actual active reference taken
* on "mon_groups", thus causing
* Thread 1 to wait forever while
* holding rdtgroup_mutex. */
kernfs_break_active_protection(
prgrp_kn)
/*
* Trying to get rdtgroup_mutex
* which is held by Thread 1. */
Thread 2 hangs here ----> mutex_lock
...
The problem is that the creation of a subdirectory in the "mon_groups" directory incorrectly releases the active protection of its parent directory instead of itself before it starts waiting for rdtgroup_mutex. This is triggered by the rdtgroup_mkdir() flow calling rdtgroup_kn_lock_live()/rdtgroup_kn_unlock() with kernfs node of the parent control group ("c1") as argument. It should be called with kernfs node "mon_groups" instead. What is currently missing is that the kn->priv of "mon_groups" is NULL instead of pointing to the rdtgrp.
Fix it by pointing kn->priv to rdtgrp when "mon_groups" is created. Then it could be passed to rdtgroup_kn_lock_live()/rdtgroup_kn_unlock() instead. And then it operates on the same rdtgroup structure but handles the active reference of kernfs node "mon_groups" to prevent deadlock. The same changes are also made to the "mon_data" directories.
This results in some unused function parameters that will be cleaned up in follow-up patch as the focus here is on the fix only in support of backporting efforts.
--- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/x86/kernel/cpu/resctrl/rdtgroup.c +8 -8
@@ -1970,7 +1970,7 @@ static int rdt_get_tree(struct fs_context *fc)if (rdt_mon_capable) { ret =mongroup_create_dir (rdtgroup_default.kn, -NULL ,"mon_groups" , + &rdtgroup_default,"mon_groups" , &kn_mongrp);if (ret <0 ) goto out_info;
@@ -2446,7 +2446,7 @@ static int mkdir_mondata_all(struct kernfs_node *parent_kn,/* * Create the mon_data directory first. */ - ret =mongroup_create_dir (parent_kn,NULL ,"mon_data" , &kn); + ret =mongroup_create_dir (parent_kn, prgrp,"mon_data" , &kn);if (ret)return ret;
@@ -2645,7 +2645,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,uint files =0 ;int ret; - prdtgrp =rdtgroup_kn_lock_live (prgrp_kn); + prdtgrp =rdtgroup_kn_lock_live (parent_kn);if (!prdtgrp) { ret = -ENODEV ; goto out_unlock;
@@ -2718,7 +2718,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,kernfs_activate (kn);/* -* The caller unlocks the prgrp_kn upon success. +* The caller unlocks the parent_kn upon success. */ return 0 ;
@@ -2729,7 +2729,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn, out_free_rgrp:kfree (rdtgrp); out_unlock: -rdtgroup_kn_unlock (prgrp_kn); +rdtgroup_kn_unlock (parent_kn);return ret; }
@@ -2767,7 +2767,7 @@ static int rdtgroup_mkdir_mon(struct kernfs_node *parent_kn,*/ list_add_tail (&rdtgrp->mon.crdtgrp_list, &prgrp->mon.crdtgrp_list); -rdtgroup_kn_unlock (prgrp_kn); +rdtgroup_kn_unlock (parent_kn);return ret; }
@@ -2810,7 +2810,7 @@ static int rdtgroup_mkdir_ctrl_mon(struct kernfs_node *parent_kn,* Create an empty mon_groups directory to hold the subset * of tasks and cpus to monitor. */ - ret =mongroup_create_dir (kn,NULL ,"mon_groups" ,NULL ); + ret =mongroup_create_dir (kn, rdtgrp,"mon_groups" ,NULL );if (ret) {rdt_last_cmd_puts ("kernfs subdir error\n" ); goto out_del_list;
@@ -2826,7 +2826,7 @@ static int rdtgroup_mkdir_ctrl_mon(struct kernfs_node *parent_kn, out_common_fail:mkdir_rdt_prepare_clean (rdtgrp); out_unlock: -rdtgroup_kn_unlock (prgrp_kn); +rdtgroup_kn_unlock (parent_kn);return ret; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 4/23 x86/resctrl: Fix use-after-free when deleting resource groups
In reply to Greg Kroah-HartmanFrom: Xiaochen Shen <[email protected]>
[ Upstream commit b8511ccc75c033f6d54188ea4df7bf1e85778740 ]
A resource group (rdtgrp) contains a reference count (rdtgrp->waitcount) that indicates how many waiters expect this rdtgrp to exist. Waiters could be waiting on rdtgroup_mutex or some work sitting on a task's workqueue for when the task returns from kernel mode or exits.
The deletion of a rdtgrp is intended to have two phases:
(1) while holding rdtgroup_mutex the necessary cleanup is done and rdtgrp->flags is set to RDT_DELETED,
(2) after releasing the rdtgroup_mutex, the rdtgrp structure is freed only if there are no waiters and its flag is set to RDT_DELETED. Upon gaining access to rdtgroup_mutex or rdtgrp, a waiter is required to check for the RDT_DELETED flag.
When unmounting the resctrl file system or deleting ctrl_mon groups, all of the subdirectories are removed and the data structure of rdtgrp is forcibly freed without checking rdtgrp->waitcount. If at this point there was a waiter on rdtgrp then a use-after-free issue occurs when the waiter starts running and accesses the rdtgrp structure it was waiting on.
See kfree() calls in [1], [2] and [3] in these two call paths in following scenarios:
(1) rdt_kill_sb() -> rmdir_all_sub() -> free_all_child_rdtgrp()
(2) rdtgroup_rmdir() -> rdtgroup_rmdir_ctrl() -> free_all_child_rdtgrp()
There are several scenarios that result in use-after-free issue in following:
Scenario 1:
-----------
In Thread 1, rdtgroup_tasks_write() adds a task_work callback move_myself(). If move_myself() is scheduled to execute after Thread 2 rdt_kill_sb() is finished, referring to earlier rdtgrp memory (rdtgrp->waitcount) which was already freed in Thread 2 results in use-after-free issue.
Thread 1 (rdtgroup_tasks_write) Thread 2 (rdt_kill_sb)
------------------------------- ----------------------rdtgroup_kn_lock_live
atomic_inc(&rdtgrp->waitcount)
mutex_lockrdtgroup_move_task
__rdtgroup_move_task
/*
* Take an extra refcount, so rdtgrp cannot be freed
* before the call back move_myself has been invoked
*/
atomic_inc(&rdtgrp->waitcount)
/* Callback move_myself will be scheduled for later */
task_work_add(move_myself)rdtgroup_kn_unlock
mutex_unlock
atomic_dec_and_test(&rdtgrp->waitcount)
&& (flags & RDT_DELETED)
mutex_lock
rmdir_all_sub
/*
* sentry and rdtgrp are freed
* without checking refcount
*/
free_all_child_rdtgrp
kfree(sentry)*[1]
kfree(rdtgrp)*[2]
mutex_unlock/*
* Callback is scheduled to execute
* after rdt_kill_sb is finished
*/move_myself
/*
* Use-after-free: refer to earlier rdtgrp
* memory which was freed in [1] or [2].
*/
atomic_dec_and_test(&rdtgrp->waitcount)
&& (flags & RDT_DELETED)
kfree(rdtgrp)
Scenario 2:
-----------
In Thread 1, rdtgroup_tasks_write() adds a task_work callback move_myself(). If move_myself() is scheduled to execute after Thread 2 rdtgroup_rmdir() is finished, referring to earlier rdtgrp memory (rdtgrp->waitcount) which was already freed in Thread 2 results in use-after-free issue.
Thread 1 (rdtgroup_tasks_write) Thread 2 (rdtgroup_rmdir)
------------------------------- -------------------------rdtgroup_kn_lock_live
atomic_inc(&rdtgrp->waitcount)
mutex_lockrdtgroup_move_task
__rdtgroup_move_task
/*
* Take an extra refcount, so rdtgrp cannot be freed
* before the call back move_myself has been invoked
*/
atomic_inc(&rdtgrp->waitcount)
/* Callback move_myself will be scheduled for later */
task_work_add(move_myself)rdtgroup_kn_unlock
mutex_unlock
atomic_dec_and_test(&rdtgrp->waitcount)
&& (flags & RDT_DELETED)
rdtgroup_kn_lock_live
atomic_inc(&rdtgrp->waitcount)
mutex_lock
rdtgroup_rmdir_ctrl
free_all_child_rdtgrp
/*
* sentry is freed without
* checking refcount
*/
kfree(sentry)*[3]
rdtgroup_ctrl_remove
rdtgrp->flags = RDT_DELETED
rdtgroup_kn_unlock
mutex_unlock
atomic_dec_and_test(
&rdtgrp->waitcount)
&& (flags & RDT_DELETED)
kfree(rdtgrp)/*
* Callback is scheduled to execute
* after rdt_kill_sb is finished
*/move_myself
/*
* Use-after-free: refer to earlier rdtgrp
* memory which was freed in [3].
*/
atomic_dec_and_test(&rdtgrp->waitcount)
&& (flags & RDT_DELETED)
kfree(rdtgrp)
If CONFIG_DEBUG_SLAB=y, Slab corruption on kmalloc-2k can be observed like following. Note that "0x6b" is POISON_FREE after kfree(). The corrupted bits "0x6a", "0x64" at offset 0x424 correspond to waitcount member of struct rdtgroup which was freed:
Slab corruption (Not tainted): kmalloc-2k start=ffff9504c5b0d000, len=2048 420: 6b 6b 6b 6b 6a 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkjkkkkkkkkkkk Single bit error detected. Probably bad RAM.
Run memtest86+ or a similar memory test tool.
Next obj: start=ffff9504c5b0d800, len=2048
000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk 010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
Slab corruption (Not tainted): kmalloc-2k start=ffff9504c58ab800, len=2048 420: 6b 6b 6b 6b 64 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkdkkkkkkkkkkk Prev obj: start=ffff9504c58ab000, len=2048
000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk 010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
Fix this by taking reference count (waitcount) of rdtgrp into account in the two call paths that currently do not do so. Instead of always freeing the resource group it will only be freed if there are no waiters on it. If there are waiters, the resource group will have its flags set to RDT_DELETED.
It will be left to the waiter to free the resource group when it starts running and finding that it was the last waiter and the resource group has been removed (rdtgrp->flags & RDT_DELETED) since. (1) rdt_kill_sb() -> rmdir_all_sub() -> free_all_child_rdtgrp() (2) rdtgroup_rmdir() -> rdtgroup_rmdir_ctrl() -> free_all_child_rdtgrp()
--- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/resctrl/rdtgroup.c +10 -2
@@ -2205,7 +2205,11 @@ static void free_all_child_rdtgrp(struct rdtgroup *rdtgrp)list_for_each_entry_safe (sentry, stmp, head, mon.crdtgrp_list) {free_rmid (sentry->mon.rmid);list_del (&sentry->mon.crdtgrp_list); -kfree (sentry); + +if (atomic_read (&sentry->waitcount) !=0 ) + sentry->flags =RDT_DELETED ; +else +kfree (sentry); } }
@@ -2243,7 +2247,11 @@ static void rmdir_all_sub(void)kernfs_remove (rdtgrp->kn);list_del (&rdtgrp->rdtgroup_list); -kfree (rdtgrp); + +if (atomic_read (&rdtgrp->waitcount) !=0 ) + rdtgrp->flags =RDT_DELETED ; +else +kfree (rdtgrp); }/* Notify online CPUs to update per cpu storage and PQR_ASSOC MSR */ update_closid_rmid (cpu_online_mask, &rdtgroup_default);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 5/23 x86/resctrl: Fix use-after-free due to inaccurate refcount of rdtgroup
In reply to Greg Kroah-HartmanFrom: Xiaochen Shen <[email protected]>
[ Upstream commit 074fadee59ee7a9d2b216e9854bd4efb5dad679f ]
There is a race condition in the following scenario which results in an use-after-free issue when reading a monitoring file and deleting the parent ctrl_mon group concurrently:
Thread 1 calls atomic_inc() to take refcount of rdtgrp and then calls kernfs_break_active_protection() to drop the active reference of kernfs node in rdtgroup_kn_lock_live().
In Thread 2, kernfs_remove() is a blocking routine. It waits on all sub kernfs nodes to drop the active reference when removing all subtree kernfs nodes recursively. Thread 2 could block on kernfs_remove() until Thread 1 calls kernfs_break_active_protection(). Only after kernfs_remove() completes the refcount of rdtgrp could be trusted.
Before Thread 1 calls atomic_inc() and kernfs_break_active_protection(), Thread 2 could call kfree() when the refcount of rdtgrp (sentry) is 0 instead of 1 due to the race.
In Thread 1, in rdtgroup_kn_unlock(), referring to earlier rdtgrp memory (rdtgrp->waitcount) which was already freed in Thread 2 results in use-after-free issue.
Thread 1 (rdtgroup_mondata_show) Thread 2 (rdtgroup_rmdir) -------------------------------- ------------------------- rdtgroup_kn_lock_live
/*
* kn active protection until
* kernfs_break_active_protection(kn)
*/
rdtgrp = kernfs_to_rdtgroup(kn)
rdtgroup_kn_lock_live
atomic_inc(&rdtgrp->waitcount)
mutex_lock
rdtgroup_rmdir_ctrl
free_all_child_rdtgrp
/*
* sentry->waitcount should be 1
* but is 0 now due to the race.
*/
kfree(sentry)*[1]
/*
* Only after kernfs_remove()
* completes, the refcount of
* rdtgrp could be trusted.
*/
atomic_inc(&rdtgrp->waitcount)
/* kn->active-- */
kernfs_break_active_protection(kn)
rdtgroup_ctrl_remove
rdtgrp->flags = RDT_DELETED
/*
* Blocking routine, wait for
* all sub kernfs nodes to drop
* active reference in
* kernfs_break_active_protection.
*/
kernfs_remove(rdtgrp->kn)
rdtgroup_kn_unlock
mutex_unlock
atomic_dec_and_test(
&rdtgrp->waitcount)
&& (flags & RDT_DELETED)
kernfs_unbreak_active_protection(kn)
kfree(rdtgrp) mutex_lockmon_event_readrdtgroup_kn_unlock
mutex_unlock
/*
* Use-after-free: refer to earlier rdtgrp
* memory which was freed in [1].
*/
atomic_dec_and_test(&rdtgrp->waitcount)
&& (flags & RDT_DELETED)
/* kn->active++ */
kernfs_unbreak_active_protection(kn)
kfree(rdtgrp)Fix it by moving free_all_child_rdtgrp() to after kernfs_remove() in rdtgroup_rmdir_ctrl() to ensure it has the accurate refcount of rdtgrp.
--- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/resctrl/rdtgroup.c +2 -2
@@ -2960,13 +2960,13 @@ static int rdtgroup_rmdir_ctrl(struct kernfs_node *kn, struct rdtgroup *rdtgrp,closid_free (rdtgrp->closid);free_rmid (rdtgrp->mon.rmid); +rdtgroup_ctrl_remove (kn, rdtgrp); +/* * Free all the child monitor group rmids. */ free_all_child_rdtgrp (rdtgrp); -rdtgroup_ctrl_remove (kn, rdtgrp); -return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 6/23 KVM: PPC: Book3S PR: Fix -Werror=return-type build failure
In reply to Greg Kroah-HartmanFrom: David Michael <[email protected]>
[ Upstream commit fd24a8624eb29d3b6b7df68096ce0321b19b03c6 ]
--- arch/powerpc/kvm/book3s_pr.c | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/kvm/book3s_pr.c +1 -0
@@ -2030,6 +2030,7 @@ static int kvm_vm_ioctl_get_smmu_info_pr(struct kvm *kvm, {/* We should not get called */ BUG (); +return 0 ; }#endif /* CONFIG_PPC64 */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 7/23 gfs2: Another gfs2_find_jhead fix
In reply to Greg Kroah-HartmanFrom: Andreas Gruenbacher <[email protected]>
commit eed0f953b90e86e765197a1dad06bb48aedc27fe upstream.
On filesystems with a block size smaller than the page size, gfs2_find_jhead can split a page across two bios (for example, when blocks are not allocated consecutively). When that happens, the first bio that completes will unlock the page in its bi_end_io handler even though the page hasn't been read completely yet. Fix that by using a chained bio for the rest of the page.
While at it, clean up the sector calculation logic in gfs2_log_alloc_bio. In gfs2_find_jhead, simplify the disk block and offset calculation logic and fix a variable name.
--- fs/gfs2/lops.c | 68 ++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 24 deletions(-)
fs/gfs2/lops.c +44 -24
@@ -259,7 +259,7 @@ static struct bio *gfs2_log_alloc_bio(ststruct super_block *sb = sdp->sd_vfs;struct bio *bio =bio_alloc (GFP_NOIO ,BIO_MAX_PAGES ); - bio->bi_iter.bi_sector = blkno * (sb->s_blocksize >>9 ); + bio->bi_iter.bi_sector = blkno << (sb->s_blocksize_bits -9 );bio_set_dev (bio, sb->s_bdev); bio->bi_end_io = end_io; bio->bi_private = sdp;
@@ -472,6 +472,20 @@ static void gfs2_jhead_process_page(struput_page (page);/* Once more for find_or_create_page */ } +static struct bio *gfs2_chain_bio (struct bio *prev,unsigned int nr_iovecs) +{ +struct bio *new; + + new =bio_alloc (GFP_NOIO , nr_iovecs); +bio_copy_dev (new, prev); + new->bi_iter.bi_sector =bio_end_sector (prev); + new->bi_opf = prev->bi_opf; + new->bi_write_hint = prev->bi_write_hint; +bio_chain (new, prev); +submit_bio (prev); +return new; +} +/** * gfs2_find_jhead - find the head of a log * @jd: The journal descriptor
@@ -488,15 +502,15 @@ int gfs2_find_jhead(struct gfs2_jdesc *jstruct gfs2_sbd *sdp =GFS2_SB (jd->jd_inode);struct address_space *mapping = jd->jd_inode->i_mapping;unsigned int block =0 , blocks_submitted =0 , blocks_read =0 ; -unsigned int bsize = sdp->sd_sb.sb_bsize; +unsigned int bsize = sdp->sd_sb.sb_bsize, off;unsigned int bsize_shift = sdp->sd_sb.sb_bsize_shift;unsigned int shift =PAGE_SHIFT - bsize_shift; -unsigned int readhead_blocks =BIO_MAX_PAGES << shift; +unsigned int readahead_blocks =BIO_MAX_PAGES << shift;struct gfs2_journal_extent *je;int sz, ret =0 ;struct bio *bio =NULL ;struct page *page =NULL ; -bool done = false; +bool bio_chained = false, done = false;errseq_t since;memset (head,0 ,sizeof (*head));
@@ -505,9 +519,9 @@ int gfs2_find_jhead(struct gfs2_jdesc *j since =filemap_sample_wb_err (mapping);list_for_each_entry (je, &jd->extent_list, list) { -for (; block < je->lblock + je->blocks; block++) { -u64 dblock; +u64 dblock = je->dblock; +for (; block < je->lblock + je->blocks; block++, dblock++) {if (!page) { page =find_or_create_page (mapping, block >> shift,GFP_NOFS );
@@ -516,35 +530,41 @@ int gfs2_find_jhead(struct gfs2_jdesc *j done = true; goto out; } + off =0 ; } -if (bio) { -unsigned int off; - - off = (block << bsize_shift) & ~PAGE_MASK ; +if (!bio || (bio_chained && !off)) { +/* start new bio */ + }else { sz =bio_add_page (bio, page, bsize, off); -if (sz == bsize) {/* block added */ -if (off + bsize ==PAGE_SIZE ) { - page =NULL ; - goto page_added; - } -continue ; +if (sz == bsize) + goto block_added; +if (off) { +unsigned int blocks = + (PAGE_SIZE - off) >> bsize_shift; + + bio =gfs2_chain_bio (bio, blocks); + bio_chained = true; + goto add_block_to_new_bio; } + } + +if (bio) { blocks_submitted = block +1 ;submit_bio (bio); - bio =NULL ; } - dblock = je->dblock + (block - je->lblock); bio =gfs2_log_alloc_bio (sdp, dblock, gfs2_end_log_read); bio->bi_opf =REQ_OP_READ ; - sz =bio_add_page (bio, page, bsize,0 ); -gfs2_assert_warn (sdp, sz == bsize); -if (bsize ==PAGE_SIZE ) + bio_chained = false; +add_block_to_new_bio: + sz =bio_add_page (bio, page, bsize, off); +BUG_ON (sz != bsize); +block_added: + off += bsize; +if (off ==PAGE_SIZE ) page =NULL ; - -page_added: -if (blocks_submitted < blocks_read + readhead_blocks) { +if (blocks_submitted < blocks_read + readahead_blocks) {/* Keep at least one bio in flight */ continue ; }
Greg Kroah-Hartman
maintainerPATCH 8/23 lib/test_bitmap: correct test data offsets for 32-bit
In reply to Greg Kroah-HartmanFrom: Andy Shevchenko <[email protected]>
commit 69334ca530da80c1563ac6a3bd32afa40884ccd3 upstream.
On 32-bit platform the size of long is only 32 bits which makes wrong offset in the array of 64 bit size.
Calculate offset based on BITS_PER_LONG.
--- lib/test_bitmap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
lib/test_bitmap.c +5 -4
@@ -275,22 +275,23 @@ static void __init test_copy(void)static void __init test_replace (void ) {unsigned int nbits =64 ; +unsigned int nlongs =DIV_ROUND_UP (nbits,BITS_PER_LONG );DECLARE_BITMAP (bmap,1024 );bitmap_zero (bmap,1024 ); -bitmap_replace (bmap, &exp2[0 ], &exp2[1 ], exp2_to_exp3_mask, nbits); +bitmap_replace (bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits);expect_eq_bitmap (bmap, exp3_0_1, nbits);bitmap_zero (bmap,1024 ); -bitmap_replace (bmap, &exp2[1 ], &exp2[0 ], exp2_to_exp3_mask, nbits); +bitmap_replace (bmap, &exp2[1 * nlongs], &exp2[0 * nlongs], exp2_to_exp3_mask, nbits);expect_eq_bitmap (bmap, exp3_1_0, nbits);bitmap_fill (bmap,1024 ); -bitmap_replace (bmap, &exp2[0 ], &exp2[1 ], exp2_to_exp3_mask, nbits); +bitmap_replace (bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits);expect_eq_bitmap (bmap, exp3_0_1, nbits);bitmap_fill (bmap,1024 ); -bitmap_replace (bmap, &exp2[1 ], &exp2[0 ], exp2_to_exp3_mask, nbits); +bitmap_replace (bmap, &exp2[1 * nlongs], &exp2[0 * nlongs], exp2_to_exp3_mask, nbits);expect_eq_bitmap (bmap, exp3_1_0, nbits); }
Greg Kroah-Hartman
maintainerPATCH 9/23 perf c2c: Fix return type for histogram sorting comparision functions
In reply to Greg Kroah-HartmanFrom: Andres Freund <[email protected]>
commit c1c8013ec34d7163431d18367808ea40b2e305f8 upstream.
Commit 722ddfde366f ("perf tools: Fix time sorting") changed - correctly so - hist_entry__sort to return int64. Unfortunately several of the builtin-c2c.c comparison routines only happened to work due the cast caused by the wrong return type.
This causes meaningless ordering of both the cacheline list, and the cacheline details page. E.g a simple:
perf c2c record -a sleep 3
perf c2c report
will result in cacheline table like
=================================================
Shared Data Cache Line Table
=================================================
#
# ------- Cacheline ---------- Total Tot - LLC Load Hitm - - Store Reference - - Load Dram - LLC Total - Core Load Hit - - LLC Load Hit - # Index Address Node PA cnt records Hitm Total Lcl Rmt Total L1Hit L1Miss Lcl Rmt Ld Miss Loads FB L1 L2 Llc Rmt # ..... .............. .... ...... ....... ...... ..... ..... ... .... ..... ...... ...... .... ...... ..... ..... ..... ... .... .......
0 0x7f0d27ffba00 N/A 0 52 0.12% 13 6 7 12 12 0 0 7 14 40 4 16 0 0 0
1 0x7f0d27ff61c0 N/A 0 6353 14.04% 1475 801 674 779 779 0 0 718 1392 5574 1299 1967 0 115 0
2 0x7f0d26d3ec80 N/A 0 71 0.15% 16 4 12 13 13 0 0 12 24 58 1 20 0 9 0
3 0x7f0d26d3ec00 N/A 0 98 0.22% 23 17 6 19 19 0 0 6 12 79 0 40 0 10 0i.e. with the list not being ordered by Total Hitm.
--- tools/perf/builtin-c2c.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
tools/perf/builtin-c2c.c +6 -4
@@ -595,8 +595,8 @@ tot_hitm_cmp(struct perf_hpp_fmt *fmt __ {struct c2c_hist_entry *c2c_left;struct c2c_hist_entry *c2c_right; -unsigned int tot_hitm_left; -unsigned int tot_hitm_right; +uint64_t tot_hitm_left; +uint64_t tot_hitm_right; c2c_left = container_of(left, struct c2c_hist_entry, he); c2c_right = container_of(right, struct c2c_hist_entry, he);
@@ -629,7 +629,8 @@ __f ## _cmp(struct perf_hpp_fmt *fmt __m \ c2c_left = container_of(left, struct c2c_hist_entry, he); \ c2c_right = container_of(right, struct c2c_hist_entry, he); \ -return c2c_left->stats.__f - c2c_right->stats.__f; \ +return (uint64_t ) c2c_left->stats.__f - \ + (uint64_t ) c2c_right->stats.__f; \ }#define STAT_FN (__f) \
@@ -682,7 +683,8 @@ ld_llcmiss_cmp(struct perf_hpp_fmt *fmt c2c_left = container_of(left, struct c2c_hist_entry, he); c2c_right = container_of(right, struct c2c_hist_entry, he); -return llc_miss (&c2c_left->stats) -llc_miss (&c2c_right->stats); +return (uint64_t )llc_miss (&c2c_left->stats) - + (uint64_t )llc_miss (&c2c_right->stats); }static uint64_t total_records (struct c2c_stats *stats)
Greg Kroah-Hartman
maintainerPATCH 10/23 PM / devfreq: Add new name attribute for sysfs
In reply to Greg Kroah-HartmanFrom: Chanwoo Choi <[email protected]>
commit 2fee1a7cc6b1ce6634bb0f025be2c94a58dfa34d upstream.
The commit 4585fbcb5331 ("PM / devfreq: Modify the device name as devfreq(X) for sysfs") changed the node name to devfreq(x). After this commit, it is not possible to get the device name through /sys/class/devfreq/devfreq(X)/*.
Add new name attribute in order to get device name.
--- Documentation/ABI/testing/sysfs-class-devfreq | 7 +++++++ drivers/devfreq/devfreq.c | 9 +++++++++ 2 files changed, 16 insertions(+)
Documentation/ABI/testing/sysfs-class-devfreq +7 -0
@@ -7,6 +7,13 @@ Description: The name of devfreq object denoted as ... is same as the name of device using devfreq. +What: /sys/class/devfreq/.../name +Date: November 2019 +Contact: Chanwoo Choi <[email protected]> +Description: + The /sys/class/devfreq/.../name shows the name of device + of the corresponding devfreq object. + What: /sys/class/devfreq/.../governor Date: September 2011 Contact: MyungJoo Ham <[email protected]>
drivers/devfreq/devfreq.c +9 -0
@@ -1259,6 +1259,14 @@ err_out: }EXPORT_SYMBOL (devfreq_remove_governor); +static ssize_t name_show (struct device *dev, +struct device_attribute *attr,char *buf) +{ +struct devfreq *devfreq =to_devfreq (dev); +return sprintf (buf,"%s\n" ,dev_name (devfreq->dev.parent)); +} +static DEVICE_ATTR_RO (name); +static ssize_t governor_show (struct device *dev,struct device_attribute *attr,char *buf) {
@@ -1592,6 +1600,7 @@ static ssize_t trans_stat_show(struct destatic DEVICE_ATTR_RO (trans_stat);static struct attribute *devfreq_attrs[] = { + &dev_attr_name.attr, &dev_attr_governor.attr, &dev_attr_available_governors.attr, &dev_attr_cur_freq.attr,
Greg Kroah-Hartman
maintainerPATCH 11/23 tools lib: Fix builds when glibc contains strlcpy()
In reply to Greg Kroah-HartmanFrom: Vitaly Chikunov <[email protected]>
commit 6c4798d3f08b81c2c52936b10e0fa872590c96ae upstream.
Disable a couple of compilation warnings (which are treated as errors) on strlcpy() definition and declaration, allowing users to compile perf and kernel (objtool) when:
1. glibc have strlcpy() (such as in ALT Linux since 2004) objtool and perf build fails with this (in gcc):
In file included from exec-cmd.c:3:
tools/include/linux/string.h:20:15: error: redundant redeclaration of ‘strlcpy’ [-Werror=redundant-decls]
20 | extern size_t strlcpy(char *dest, const char *src, size_t size);
2. clang ignores `-Wredundant-decls', but produces another warning when building perf:
CC util/string.o
../lib/string.c:99:8: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] size_t __weak strlcpy(char *dest, const char *src, size_t size) ../../tools/include/linux/compiler.h:66:34: note: expanded from macro '__weak'
# define __weak __attribute__((weak)) /usr/include/bits/string_fortified.h:151:8: note: previous definition is here __NTH (strlcpy (char *__restrict __dest, const char *__restrict __src,
Committer notes:
The
#pragma GCC diagnostic
directive was introduced in gcc 4.6, so check for that as well.
Resolves: https://bugzilla.kernel.org/show_bug.cgi?id=118481
--- tools/include/linux/string.h | 8 ++++++++ tools/lib/string.c | 7 +++++++ 2 files changed, 15 insertions(+)
tools/include/linux/string.h +8 -0
@@ -17,7 +17,15 @@ int strtobool(const char *s, bool *res);* However uClibc headers also define __GLIBC__ hence the hack below */ #if defined(__GLIBC__) && !defined(__UCLIBC__) +// pragma diagnostic was introduced in gcc 4.6 +#if __GNUC__ >4 || (__GNUC__ ==4 && __GNUC_MINOR__ >=6 ) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wredundant-decls" +#endif extern size_t strlcpy (char *dest,const char *src,size_t size); +#if __GNUC__ >4 || (__GNUC__ ==4 && __GNUC_MINOR__ >=6 ) +#pragma GCC diagnostic pop +#endif #endif char *str_error_r (int errnum,char *buf,size_t buflen);
tools/lib/string.c +7 -0
@@ -96,6 +96,10 @@ int strtobool(const char *s, bool *res)* If libc has strlcpy() then that version will override this * implementation: */ +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wignored-attributes" +#endif size_t __weak strlcpy (char *dest,const char *src,size_t size) {size_t ret =strlen (src);
@@ -107,6 +111,9 @@ size_t __weak strlcpy(char *dest, const }return ret; } +#ifdef __clang__ +#pragma clang diagnostic pop +#endif /** * skip_spaces - Removes leading whitespace from @str.
Greg Kroah-Hartman
maintainerPATCH 12/23 arm64: kbuild: remove compressed images on make ARCH=arm64 (dist)clean
In reply to Greg Kroah-HartmanFrom: Dirk Behme <[email protected]>
commit d7bbd6c1b01cb5dd13c245d4586a83145c1d5f52 upstream.
Since v4.3-rc1 commit 0723c05fb75e44 ("arm64: enable more compressed Image formats"), it is possible to build Image.{bz2,lz4,lzma,lzo} AArch64 images. However, the commit missed adding support for removing those images on 'make ARCH=arm64 (dist)clean'.
Fix this by adding them to the target list.
Make sure to match the order of the recipes in the makefile.
--- arch/arm64/boot/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/Makefile +1 -1
@@ -16,7 +16,7 @@ OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S -targets := Image Image.gz +targets := Image Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo $(obj)/Image: vmlinux FORCE $(call if_changed,objcopy)
Greg Kroah-Hartman
maintainerPATCH 13/23 mm/mempolicy.c: fix out of bounds write in mpol_parse_str()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit c7a91bc7c2e17e0a9c8b9745a2cb118891218fd1 upstream.
What we are trying to do is change the '=' character to a NUL terminator and then at the end of the function we restore it back to an '='. The problem is there are two error paths where we jump to the end of the function before we have replaced the '=' with NUL.
We end up putting the '=' in the wrong place (possibly one element before the start of the buffer).
Dmitry Vyukov <[email protected]>
--- mm/mempolicy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
mm/mempolicy.c +3 -3
@@ -2821,6 +2821,9 @@ int mpol_parse_str(char *str, struct memchar *flags =strchr (str,'=' );int err =1 , mode; +if (flags) + *flags++ ='\0' ;/* terminate mode string */ +if (nodelist) {/* NUL-terminate mode or flags string */ *nodelist++ ='\0' ;
@@ -2831,9 +2834,6 @@ int mpol_parse_str(char *str, struct mem }else nodes_clear (nodes); -if (flags) - *flags++ ='\0' ;/* terminate mode string */ - mode =match_string (policy_modes,MPOL_MAX , str);if (mode <0 ) goto out;
Greg Kroah-Hartman
maintainerPATCH 14/23 reiserfs: Fix memory leak of journal device string
In reply to Greg Kroah-HartmanFrom: Jan Kara <[email protected]>
commit 5474ca7da6f34fa95e82edc747d5faa19cbdfb5c upstream.
When a filesystem is mounted with jdev mount option, we store the journal device name in an allocated string in superblock. However we fail to ever free that string. Fix it.
--- fs/reiserfs/super.c | 2 ++ 1 file changed, 2 insertions(+)
fs/reiserfs/super.c +2 -0
@@ -629,6 +629,7 @@ static void reiserfs_put_super(struct sureiserfs_write_unlock (s);mutex_destroy (&REISERFS_SB (s)->lock);destroy_workqueue (REISERFS_SB (s)->commit_wq); +kfree (REISERFS_SB (s)->s_jdev);kfree (s->s_fs_info); s->s_fs_info =NULL ; }
@@ -2240,6 +2241,7 @@ error_unlocked: kfree(qf_names[j]); }#endif +kfree (sbi->s_jdev);kfree (sbi); s->s_fs_info =NULL ;
Greg Kroah-Hartman
maintainerPATCH 15/23 media: digitv: dont continue if remote control state cant be read
In reply to Greg Kroah-HartmanFrom: Sean Young <[email protected]>
commit eecc70d22ae51225de1ef629c1159f7116476b2e upstream.
This results in an uninitialized variable read.
--- drivers/media/usb/dvb-usb/digitv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/media/usb/dvb-usb/digitv.c +7 -3
@@ -230,18 +230,22 @@ static struct rc_map_table rc_map_digitvstatic int digitv_rc_query (struct dvb_usb_device *d,u32 *event,int *state) { -int i; +int ret, i;u8 key[5 ];u8 b[4 ] = {0 }; *event =0 ; *state =REMOTE_NO_KEY_PRESSED ; -digitv_ctrl_msg (d,USB_READ_REMOTE ,0 ,NULL ,0 ,&key[1 ],4 ); + ret =digitv_ctrl_msg (d,USB_READ_REMOTE ,0 ,NULL ,0 , &key[1 ],4 ); +if (ret) +return ret;/* Tell the device we've read the remote. Not sure how necessary this is, but the Nebula SDK does it. */ -digitv_ctrl_msg (d,USB_WRITE_REMOTE ,0 ,b,4 ,NULL ,0 ); + ret =digitv_ctrl_msg (d,USB_WRITE_REMOTE ,0 , b,4 ,NULL ,0 ); +if (ret) +return ret;/* if something is inside the buffer, simulate key press */ if (key[1 ] !=0 )
Greg Kroah-Hartman
maintainerPATCH 16/23 media: af9005: uninitialized variable printked
In reply to Greg Kroah-HartmanFrom: Sean Young <[email protected]>
commit 51d0c99b391f0cac61ad7b827c26f549ee55672c upstream.
If usb_bulk_msg() fails, actual_length can be uninitialized.
--- drivers/media/usb/dvb-usb/af9005.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/usb/dvb-usb/af9005.c +1 -1
@@ -554,7 +554,7 @@ static int af9005_boot_packet(struct usb u8 *buf, int size) {u16 checksum; -int act_len, i, ret; +int act_len =0 , i, ret;memset (buf,0 , size); buf[0 ] = (u8) (FW_BULKOUT_SIZE &0xff );
Greg Kroah-Hartman
maintainerPATCH 17/23 media: vp7045: do not read uninitialized values if usb transfer fails
In reply to Greg Kroah-HartmanFrom: Sean Young <[email protected]>
commit 26cff637121d8bb866ebd6515c430ac890e6ec80 upstream.
It is not a fatal error if reading the mac address or the remote control decoder state fails.
--- drivers/media/usb/dvb-usb/vp7045.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
drivers/media/usb/dvb-usb/vp7045.c +14 -7
@@ -96,10 +96,14 @@ static int vp7045_power_ctrl(struct dvb_static int vp7045_rc_query (struct dvb_usb_device *d) { +int ret;u8 key; -vp7045_usb_op (d,RC_VAL_READ ,NULL ,0 ,&key,1 ,20 ); -deb_rc ("remote query key: %x %d\n" ,key,key); + ret =vp7045_usb_op (d,RC_VAL_READ ,NULL ,0 , &key,1 ,20 ); +if (ret) +return ret; + +deb_rc ("remote query key: %x\n" , key);if (key !=0x44 ) {/*
@@ -115,15 +119,18 @@ static int vp7045_rc_query(struct dvb_usstatic int vp7045_read_eeprom (struct dvb_usb_device *d,u8 *buf,int len,int offset) { -int i =0 ; -u8 v,br[2 ]; +int i, ret; +u8 v, br[2 ];for (i=0 ; i < len; i++) { v = offset + i; -vp7045_usb_op (d,GET_EE_VALUE ,&v,1 ,br,2 ,5 ); + ret =vp7045_usb_op (d,GET_EE_VALUE , &v,1 , br,2 ,5 ); +if (ret) +return ret; + buf[i] = br[1 ]; } -deb_info ("VP7045 EEPROM read (offs: %d, len: %d) : " ,offset, i); -debug_dump (buf,i,deb_info); +deb_info ("VP7045 EEPROM read (offs: %d, len: %d) : " , offset, i); +debug_dump (buf, i, deb_info);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 18/23 media: gspca: zero usb_buf
In reply to Greg Kroah-HartmanFrom: Hans Verkuil <[email protected]>
commit de89d0864f66c2a1b75becfdd6bf3793c07ce870 upstream.
Allocate gspca_dev->usb_buf with kzalloc instead of kmalloc to ensure it is property zeroed. This fixes various syzbot errors about uninitialized data.
Syzbot links:
https://syzkaller.appspot.com/bug?extid=32310fc2aea76898d074
https://syzkaller.appspot.com/bug?extid=99706d6390be1ac542a2
https://syzkaller.appspot.com/bug?extid=64437af5c781a7f0e08e
--- drivers/media/usb/gspca/gspca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/usb/gspca/gspca.c +1 -1
@@ -1461,7 +1461,7 @@ int gspca_dev_probe2(struct usb_interfacpr_err ("couldn't kzalloc gspca struct\n" );return -ENOMEM ; } - gspca_dev->usb_buf =kmalloc (USB_BUF_SZ ,GFP_KERNEL ); + gspca_dev->usb_buf =kzalloc (USB_BUF_SZ ,GFP_KERNEL );if (!gspca_dev->usb_buf) {pr_err ("out of memory\n" ); ret = -ENOMEM ;
Greg Kroah-Hartman
maintainerPATCH 19/23 media: dvb-usb/dvb-usb-urb.c: initialize actlen to 0
In reply to Greg Kroah-HartmanFrom: Hans Verkuil <[email protected]>
commit 569bc8d6a6a50acb5fcf07fb10b8d2d461fdbf93 upstream.
This fixes a syzbot failure since actlen could be uninitialized, but it was still used.
Syzbot link:
https://syzkaller.appspot.com/bug?extid=6bf9606ee955b646c0e1
--- drivers/media/usb/dvb-usb/dvb-usb-urb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/usb/dvb-usb/dvb-usb-urb.c +1 -1
@@ -12,7 +12,7 @@int dvb_usb_generic_rw (struct dvb_usb_device *d,u8 *wbuf,u16 wlen,u8 *rbuf,u16 rlen,int delay_ms) { -int actlen,ret = -ENOMEM ; +int actlen =0 , ret = -ENOMEM ;if (!d || wbuf ==NULL || wlen ==0 )return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 20/23 tomoyo: Use atomic_t for statistics counter
In reply to Greg Kroah-HartmanFrom: Tetsuo Handa <[email protected]>
commit a8772fad0172aeae339144598b809fd8d4823331 upstream.
syzbot is reporting that there is a race at tomoyo_stat_update() [1]. Although it is acceptable to fail to track exact number of times policy was updated, convert to atomic_t because this is not a hot path.
[1] https://syzkaller.appspot.com/bug?id=a4d7b973972eeed410596e6604580e0133b0fc04
--- security/tomoyo/common.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
security/tomoyo/common.c +4 -7
@@ -2322,9 +2322,9 @@ static const char * const tomoyo_memory_ [TOMOYO_MEMORY_QUERY] = "query message:", }; -/* Timestamp counter for last updated. */ -static unsigned int tomoyo_stat_updated[TOMOYO_MAX_POLICY_STAT ];/* Counter for number of updates. */ +static atomic_t tomoyo_stat_updated[TOMOYO_MAX_POLICY_STAT ]; +/* Timestamp counter for last updated. */ static time64_t tomoyo_stat_modified[TOMOYO_MAX_POLICY_STAT ];/**
@@ -2336,10 +2336,7 @@ static time64_t tomoyo_stat_modified[TOM*/ void tomoyo_update_stat (const u8 index) { -/* -* I don't use atomic operations because race condition is not fatal. -*/ - tomoyo_stat_updated[index]++; +atomic_inc (&tomoyo_stat_updated[index]); tomoyo_stat_modified[index] =ktime_get_real_seconds (); }
@@ -2360,7 +2357,7 @@ static void tomoyo_read_stat(struct tomofor (i =0 ; i <TOMOYO_MAX_POLICY_STAT ; i++) {tomoyo_io_printf (head,"Policy %-30s %10u" , tomoyo_policy_headers[i], - tomoyo_stat_updated[i]); +atomic_read (&tomoyo_stat_updated[i]));if (tomoyo_stat_modified[i]) {struct tomoyo_time stamp;
Greg Kroah-Hartman
maintainerPATCH 21/23 ttyprintk: fix a potential deadlock in interrupt context issue
In reply to Greg Kroah-HartmanFrom: Zhenzhong Duan <[email protected]>
commit 9a655c77ff8fc65699a3f98e237db563b37c439b upstream.
tpk_write()/tpk_close() could be interrupted when holding a mutex, then in timer handler tpk_write() may be called again trying to acquire same mutex, lead to deadlock.
Google syzbot reported this issue with CONFIG_DEBUG_ATOMIC_SLEEP enabled:
BUG: sleeping function called from invalid context at
kernel/locking/mutex.c:938in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/1 1 lock held by swapper/1/0:
...
Call Trace: <IRQ> dump_stack+0x197/0x210 ___might_sleep.cold+0x1fb/0x23e __might_sleep+0x95/0x190 __mutex_lock+0xc5/0x13c0 mutex_lock_nested+0x16/0x20 tpk_write+0x5d/0x340 resync_tnc+0x1b6/0x320 call_timer_fn+0x1ac/0x780 run_timer_softirq+0x6c3/0x1790 __do_softirq+0x262/0x98c irq_exit+0x19b/0x1e0 smp_apic_timer_interrupt+0x1a3/0x610 apic_timer_interrupt+0xf/0x20 </IRQ>
See link https://syzkaller.appspot.com/bug?extid=2eeef62ee31f9460ad65 for more details.
Fix it by using spinlock in process context instead of mutex and having interrupt disabled in critical section.
--- drivers/char/ttyprintk.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/char/ttyprintk.c +9 -6
@@ -15,10 +15,11 @@#include <linux/serial.h> #include <linux/tty.h> #include <linux/module.h> +#include <linux/spinlock.h> struct ttyprintk_port {struct tty_port port; -struct mutex port_write_mutex; +spinlock_t spinlock; };static struct ttyprintk_port tpk_port;
@@ -99,11 +100,12 @@ static int tpk_open(struct tty_struct *tstatic void tpk_close (struct tty_struct *tty,struct file *filp) {struct ttyprintk_port *tpkp = tty->driver_data; +unsigned long flags; -mutex_lock (&tpkp->port_write_mutex); +spin_lock_irqsave (&tpkp->spinlock, flags);/* flush tpk_printk buffer */ tpk_printk (NULL ,0 ); -mutex_unlock (&tpkp->port_write_mutex); +spin_unlock_irqrestore (&tpkp->spinlock, flags);tty_port_close (&tpkp->port, tty, filp); }
@@ -115,13 +117,14 @@ static int tpk_write(struct tty_struct * const unsigned char *buf, int count) {struct ttyprintk_port *tpkp = tty->driver_data; +unsigned long flags;int ret;/* exclusive use of tpk_printk within this tty */ -mutex_lock (&tpkp->port_write_mutex); +spin_lock_irqsave (&tpkp->spinlock, flags); ret =tpk_printk (buf, count); -mutex_unlock (&tpkp->port_write_mutex); +spin_unlock_irqrestore (&tpkp->spinlock, flags);return ret; }
@@ -171,7 +174,7 @@ static int __init ttyprintk_init(void) {int ret = -ENOMEM ; -mutex_init (&tpk_port.port_write_mutex); +spin_lock_init (&tpk_port.spinlock); ttyprintk_driver = tty_alloc_driver(1, TTY_DRIVER_RESET_TERMIOS |
Greg Kroah-Hartman
maintainerPATCH 22/23 Bluetooth: Fix race condition in hci_release_sock()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 11eb85ec42dc8c7a7ec519b90ccf2eeae9409de8 upstream.
Syzbot managed to trigger a use after free "KASAN: use-after-free Write in hci_sock_bind". I have reviewed the code manually and one possibly cause I have found is that we are not holding lock_sock(sk) when we do the hci_dev_put(hdev) in hci_sock_release(). My theory is that the bind and the release are racing against each other which results in this use after free.
--- net/bluetooth/hci_sock.c | 3 +++ 1 file changed, 3 insertions(+)
net/bluetooth/hci_sock.c +3 -0
@@ -831,6 +831,8 @@ static int hci_sock_release(struct sockeif (!sk)return 0 ; +lock_sock (sk); +switch (hci_pi (sk)->channel) {case HCI_CHANNEL_MONITOR :atomic_dec (&monitor_promisc);
@@ -878,6 +880,7 @@ static int hci_sock_release(struct sockeskb_queue_purge (&sk->sk_receive_queue);skb_queue_purge (&sk->sk_write_queue); +release_sock (sk);sock_put (sk);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 23/23 cgroup: Prevent double killing of css when enabling threaded cgroup
In reply to Greg Kroah-HartmanFrom: Michal Koutný <[email protected]>
commit 3bc0bb36fa30e95ca829e9cf480e1ef7f7638333 upstream.
The test_cgcore_no_internal_process_constraint_on_threads selftest when running with subsystem controlling noise triggers two warnings:
Quoted 2 lines
[ 597.443115] WARNING: CPU: 1 PID: 28167 at kernel/cgroup/cgroup.c:3131 cgroup_apply_control_enable+0xe0/0x3f0 [ 597.443413] WARNING: CPU: 1 PID: 28167 at kernel/cgroup/cgroup.c:3177 cgroup_apply_control_disable+0xa6/0x160
Both stem from a call to cgroup_type_write. The first warning was also triggered by syzkaller.
When we're switching cgroup to threaded mode shortly after a subsystem was disabled on it, we can see the respective subsystem css dying there.
The warning in cgroup_apply_control_enable is harmless in this case since we're not adding new subsys anyway.
The warning in cgroup_apply_control_disable indicates an attempt to kill css of recently disabled subsystem repeatedly.
The commit prevents these situations by making cgroup_type_write wait for all dying csses to go away before re-applying subtree controls. When at it, the locations of WARN_ON_ONCE calls are moved so that warning is triggered only when we are about to misuse the dying css.
--- kernel/cgroup/cgroup.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
kernel/cgroup/cgroup.c +6 -5
@@ -3055,8 +3055,6 @@ static int cgroup_apply_control_enable(sfor_each_subsys (ss, ssid) {struct cgroup_subsys_state *css =cgroup_css (dsct, ss); -WARN_ON_ONCE (css &&percpu_ref_is_dying (&css->refcnt)); -if (!(cgroup_ss_mask (dsct) & (1 << ss->id)))continue ;
@@ -3066,6 +3064,8 @@ static int cgroup_apply_control_enable(sreturn PTR_ERR (css); } +WARN_ON_ONCE (percpu_ref_is_dying (&css->refcnt)); +if (css_visible (css)) { ret =css_populate_dir (css);if (ret)
@@ -3101,11 +3101,11 @@ static void cgroup_apply_control_disablefor_each_subsys (ss, ssid) {struct cgroup_subsys_state *css =cgroup_css (dsct, ss); -WARN_ON_ONCE (css &&percpu_ref_is_dying (&css->refcnt)); -if (!css)continue ; +WARN_ON_ONCE (percpu_ref_is_dying (&css->refcnt)); +if (css->parent && !(cgroup_ss_mask (dsct) & (1 << ss->id))) {kill_css (css);
@@ -3392,7 +3392,8 @@ static ssize_t cgroup_type_write(structif (strcmp (strstrip (buf),"threaded" ))return -EINVAL ; - cgrp =cgroup_kn_lock_live (of->kn, false); +/* drain dying csses before we re-apply (threaded) subtree control */ + cgrp =cgroup_kn_lock_live (of->kn, true);if (!cgrp)return -ENOENT ;
Jon Hunter
maintainerQuoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.2 release. There are 23 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 05 Feb 2020 16:17:59 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.5.y
and the diffstat can be found below.thanks,
greg k-h
All tests are passing for Tegra ...
Test results for stable-v5.5:
13 builds: 13 pass, 0 fail
22 boots: 22 pass, 0 fail
40 tests: 40 pass, 0 failLinux version: 5.5.2-rc1-g8dc0cb8ae177
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04Cheers
Jon
Signature · 1 line
nvpublic
Greg Kroah-Hartman
maintainerQuoted 27 lines · Jon Hunter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.2 release. There are 23 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 05 Feb 2020 16:17:59 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.5.y
and the diffstat can be found below.thanks,
greg k-h
All tests are passing for Tegra ...
Test results for stable-v5.5:
13 builds: 13 pass, 0 fail 22 boots: 22 pass, 0 fail 40 tests: 40 pass, 0 fail
Quoted 6 lines
Linux version: 5.5.2-rc1-g8dc0cb8ae177
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,tegra194-p2972-0000, tegra20-ventana, tegra210-p2371-2180, tegra210-p3450-0000, tegra30-cardhu-a04
Thanks for testing all of these so quickly and letting me know.
greg k-h
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.2 release. There are 23 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 05 Feb 2020 16:17:59 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.5.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------------------------------------------
kernel: 5.5.2-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-5.5.y
git commit: 4ff4fd2d564ba792fa27ff72393eb5a4b5bd78e7
git describe: v5.5.1-25-g4ff4fd2d564b
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-5.5-oe/build/v5.5.1-25-g4ff4fd2d564b
No regressions (compared to build v5.5.1)
No fixes (compared to build v5.5.1)
Ran 11148 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c
- hi6220-hikey
- i386
- juno-r2
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15
- x86
Test Suites
-----------
* build
* install-android-platform-tools-r2600
* linux-log-parser
* ltp-commands-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-syscalls-tests
* kselftest
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* ltp-cap_bounds-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* network-basic-tests
* perf
* spectre-meltdown-checker-test
* v4l2-compliance
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 17 lines · Naresh Kamboju
Quoted 15 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.2 release. There are 23 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 05 Feb 2020 16:17:59 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.5.y
and the diffstat can be found below.
Quoted 6 lines
Quoted 3 lines
thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.
Thanks for testing all of these and letting me know.
It would be interesting to figure out how all of the different build errors on this "round" of releases did not trip up your systems...
thanks,
greg k-h
Hello!
Quoted 23 lines · Greg Kroah-Hartman
Quoted 21 lines · Naresh Kamboju
Quoted 18 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.2 release. There are 23 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 05 Feb 2020 16:17:59 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.5.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.5.y
and the diffstat can be found below.thanks,
greg k-h
Quoted 7 lines
Quoted 2 lines
Results from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.Thanks for testing all of these and letting me know.
It would be interesting to figure out how all of the different build errors on this "round" of releases did not trip up your systems...
We're not building these configs:
allyesconfig allmodconfig omap2plus_defconfig imx_v6_v7_defconfig
nor building for ARCH=riscv, which were the ones failing.
Greetings!
Daniel Díaz
[email protected]
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.2 release. There are 23 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 05 Feb 2020 16:17:59 +0000. Anything received after that time might be too late.
Build results:
total: 157 pass: 157 fail: 0 Qemu test results: total: 393 pass: 393 fail: 0
Guenter
Greg Kroah-Hartman
maintainerQuoted 6 lines · Guenter Roeck
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.5.2 release. There are 23 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Quoted 3 lines
Responses should be made by Wed, 05 Feb 2020 16:17:59 +0000. Anything received after that time might be too late.
Build results:
total: 157 pass: 157 fail: 0 Qemu test results: total: 393 pass: 393 fail: 0
Yeah, one is right. I'll tackle the rest of these tomorrow, thanks for all of the testing and reports.
greg k-h