From 1bb5bb8aa86d403e9a77072c7aba60fa0908d865 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Mon, 11 Jan 2016 21:46:37 +0000 Subject: =?UTF-8?q?Merge=20from=20head=20r292743,=20r293627=20by=20dchagin?= =?UTF-8?q?:=20-----------------------------------------------------------?= =?UTF-8?q?-------------=20r292743=20|=20dchagin=20|=202015-12-26=2001:04:?= =?UTF-8?q?47=20-0800=20(=D1=81=D0=B1,=2026=20=D0=B4=D0=B5=D0=BA.=202015)?= =?UTF-8?q?=20|=205=20lines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not allow access to emuldata for non Linux processes. ------------------------------------------------------------------------ r293627 | dchagin | 2016-01-09 23:36:43 -0800 (сб, 09 янв. 2016) | 6 lines Unlock process lock when return error from getrobustlist call and add an forgotten dtrace probe when return the same error. --- sys/compat/linux/linux_futex.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 56275d3b80e9..4573f73edf97 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -1100,6 +1100,12 @@ linux_get_robust_list(struct thread *td, struct linux_get_robust_list_args *args ESRCH); return (ESRCH); } + if (SV_PROC_ABI(td2->td_proc) != SV_ABI_LINUX) { + LIN_SDT_PROBE1(futex, linux_get_robust_list, return, + EPERM); + PROC_UNLOCK(td2->td_proc); + return (EPERM); + } em = em_find(td2); KASSERT(em != NULL, ("get_robust_list: emuldata notfound.\n")); -- cgit v1.2.3