From patchwork Fri Mar 11 22:10:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Metcalf X-Patchwork-Id: 8569701 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BE6ABC0554 for ; Fri, 11 Mar 2016 22:14:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B56A2034C for ; Fri, 11 Mar 2016 22:14:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7658220221 for ; Fri, 11 Mar 2016 22:14:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aeVIU-0006Td-Ds; Fri, 11 Mar 2016 22:12:38 +0000 Received: from mail-ve1eur01on0045.outbound.protection.outlook.com ([104.47.1.45] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aeVIM-0006PT-IT for linux-arm-kernel@lists.infradead.org; Fri, 11 Mar 2016 22:12:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=VBOmd0xEGsEPEkGjmrIGU0DZIPJRs6QUehe3D4+80K0=; b=BxgsNjxMKg4BYC88UCBfHRivUlAbwzpx5VlrkdO1o1+8YbvwBpz4ixNVEgLxO99GKpO7TRWFE8cISfw9Fhi5xrfue1VEy9IEMdAlcfPeEFZtiJ0APkr164NFFHySOnImYoAch9ZtoYWrNjZRLbURklLAgma52E013rY9t2COObM= Received: from DB4PR05CA0034.eurprd05.prod.outlook.com (10.160.40.44) by HE1PR05MB1690.eurprd05.prod.outlook.com (10.169.119.156) with Microsoft SMTP Server (TLS) id 15.1.427.16; Fri, 11 Mar 2016 22:12:05 +0000 Received: from AM1FFO11FD025.protection.gbl (2a01:111:f400:7e00::190) by DB4PR05CA0034.outlook.office365.com (2a01:111:e400:9850::44) with Microsoft SMTP Server (TLS) id 15.1.434.16 via Frontend Transport; Fri, 11 Mar 2016 22:12:05 +0000 Authentication-Results: spf=fail (sender IP is 12.216.194.146) smtp.mailfrom=ezchip.com; mellanox.com; dkim=none (message not signed) header.d=none; mellanox.com; dmarc=fail action=none header.from=mellanox.com; Received-SPF: Fail (protection.outlook.com: domain of ezchip.com does not designate 12.216.194.146 as permitted sender) receiver=protection.outlook.com; client-ip=12.216.194.146; helo=ld-1.internal.tilera.com; Received: from ld-1.internal.tilera.com (12.216.194.146) by AM1FFO11FD025.mail.protection.outlook.com (10.174.64.214) with Microsoft SMTP Server (TLS) id 15.1.434.11 via Frontend Transport; Fri, 11 Mar 2016 22:12:04 +0000 Received: (from cmetcalf@localhost) by ld-1.internal.tilera.com (8.14.4/8.14.4/Submit) id u2BMC2jD026295; Fri, 11 Mar 2016 17:12:02 -0500 From: Chris Metcalf To: Gilad Ben Yossef , Steven Rostedt , Ingo Molnar , Peter Zijlstra , Andrew Morton , "Rik van Riel" , Tejun Heo , Frederic Weisbecker , Thomas Gleixner , "Paul E. McKenney" , Christoph Lameter , Viresh Kumar , Catalin Marinas , Will Deacon , Andy Lutomirski , Mark Rutland , , Subject: [PATCH v11 13/13] arch/arm64: enable task isolation functionality Date: Fri, 11 Mar 2016 17:10:23 -0500 Message-ID: <1457734223-26209-14-git-send-email-cmetcalf@mellanox.com> X-Mailer: git-send-email 2.7.2 In-Reply-To: <1457734223-26209-1-git-send-email-cmetcalf@mellanox.com> References: <1457734223-26209-1-git-send-email-cmetcalf@mellanox.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:12.216.194.146; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(47776003)(960300001)(42186005)(2950100001)(87936001)(76176999)(229853001)(50986999)(86362001)(11100500001)(85426001)(4001430100002)(6806005)(104016004)(106466001)(5001770100001)(105606002)(92566002)(5008740100001)(36756003)(5001970100001)(1096002)(1220700001)(586003)(33646002)(48376002)(2201001)(5003940100001)(189998001)(4326007)(107886002)(2906002)(19580395003)(19580405001)(50226001)(50466002)(921003)(83996005)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB1690; H:ld-1.internal.tilera.com; FPR:; SPF:Fail; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD025; 1:MH4Gdqnc9k2Zo2fRw1xIkjB93Wy7j/M776nlp4AkEGg9oEikVq5XKJ0iYz9BQOEoITIaGWdHcQk0wblP/d6LE+WfOD+66Zabw2OwAXkobgNLdKF8e5klq+bPuA1HIFEncFydoFUWwEU30TEEE9BScmfd2RuC/jAq2w8S7FvcvEDJvygzXxHg1aQHCr7KwVM6jvL41vb+zI+oQ2yHnmSOdrKBq+h/g+kx+OmqDqdbK6z52eSvOsgkOhwljiYhlysbEU5OX+EsBBCeDuMkwmtZAEksOZ40Fhad5qJ/DET6Ar2+XuXyU28dKIvD0BycGLFUZqjMyYhNJ8J3hu1t0G+BUr7akvi+cfi0obp7IGl9noXWnofdKaJvK4aUl0hnojcE+VGV3gZmFsGg5l8c7RqZ1GlltJ8r1Ojam+YjmV2o/Z0DwJAcPC4uFbLfNHelbwp572yI9wspzT52njKwUjZKLkL1nyI5cZ+MAEvcg0bKnSBZ5uValMXSjsdkAemeCwmngFnlxCYbZ+BaQReopFlm8EShjalZr99qhoF1DmXyNtZvric2jIHMkXFEfQTjSWmy MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 24ff516c-ff4d-4699-6a0c-08d349fa2da2 X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1690; 2:IBcd6wViLkI551CneoRRWkcAfXZJaKw9d1Rbc1x8Bu1RxzHv1P7GBrZXEBZ+y+togVk1PugyLdHLXXigXvNCIZG2FljGzvJEWLvo8oPrGafD5KqAwDAI+hxfgYu306Xx07iG7S/NOv9Howl3ln2PE677393YKtQoR6ZvRPW2E8ISOjC0V42/+wCaNSwX9FLa; 3:uLBmN5UlHyDFtzwrizb1JU5Q7rfACUlG5kQvRoiCsKhtJRtj+ZfH7zuKlW5Tik7fGV4FhIIhzjUqc3g3XF7Qou/7+lD1DAtoR88B16x31Et9t1AUB82RLIgESRghZdhkEvdG4ZPoX2IvpOZFZb4LtKTu6CzYhX689EBlt0ZNTf9ZoW8IgTk7m7Rce2OIzBEVNy4c3ib1atojOzApOxvqCqAa2nvRu4YD7TDQFJFrph8=; 25:0zpZaHii8qvPzyLEw8wrmxxkMlwmv2+62RZnQ2lI4gOF5F+V5emnXI9v9MSQMKwNblNxHmOgxoVgshHddyDFSk4Ps9vv2+xoYs/s1OoAtidgKyebxQ8r1azUFIW1TiAwiGRUKwxrOkEMB4zVJtadmU5/uGjEX0GDiYYcmM/bn1PNE08SwZf6DXZLDjfGS+MtI6RUXa2dpI9MhYJC95YOB4qEP7xyL9UkQGHE60b/iqvSVnFVeeYvVARcwu1UZ+8Qr7OT0oQxW4N5hNRiE0DeKWLtGM/jyH6sL8zL5yQ7cHVim5C5l+PB/iMsE90aGz4OnirCrnMbrlRoIpciIjXB/Q== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR05MB1690; X-MLNXRule-EZCH-Linux: Rule triggered X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1690; 20:dL+iwyEUlw0VFewWDrt+7dz+gGxNzCVLWj6PmjnONdEtHlZBmyi81NsClUaa57uJvCd/1fKqdttqxO35lHPepoff9+O3IFKiDkbncfNrIdOYBF50b53ijE0O5ueoTrixk5pGHzz+a1zJhpYaTpU2WR0l4w47n4xugDWzhqKnTLu9Zkzc8LMYYeeAyf7/nF5Bc4Ys8+Vk9/ZR+7fjvUFPmMa2BXjDlAC5qKgzuVqMz9IOW1Iidy8X4u09Fy39FjxclEmHjmQogWX6QztJkMoYE5z9rztAcBw1h3G/NclSig29cvBwApLzupr9Seb8ni/JgOzpN0gfJh0tG2GgoPjkV1NPhqeZ9ET2rTxC3lwhQ8y2eexuxXA4AXyNiiuBw9kKWW2XDJzZ9rPcxZMSZVHhF2UE+epLK4XetjThMT6yRoF7j7hyj7dVRfKJ2uLo9TtZooCA4Iw2Xuj7NUcArYGmehQUAnqhJbZ4Zw78nNlLDmwjtBNxFqEn8gZDhY0IFRyS X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(13015025)(13018025)(13024025)(13017025)(13023025)(5005006)(3002001)(10201501046); SRVR:HE1PR05MB1690; BCL:0; PCL:0; RULEID:; SRVR:HE1PR05MB1690; X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1690; 4:xYPv8/hDwACI71mahI+hDiTXEKzhVrDVvmwJ058mKkmUO1CxIV3L1S+v0byT9muOPyo4Dyl3+CWOCVMW6s7DlqyH6wIpk/2hidBxNm+xaKba5WGv3Q3eOSM/LSkCI62sd2C6wnflIi7xig1KgqgXWpUBSZq/2c1nynJdYV+nc28d0LDaS1OomFQbFtmyhvi1FrG/gpS+Xe21OMfmy3ycKxoAryCrArDZ+5YdeNqUXYFwbMSzJoSkbIt3T0STkGOuPtRt0tuEzOfbd1ALMYzJQEDsVkhHw5lUhelRFWLcrG7kuzH/79X6NQJOzwSbTTEJvo4dKjw0BsTK7UAdSNoLqaJi/umOIwXNHugTsN/0zPdwnaOalRyunyBmUszpGytjIVQjNd2nMfKhpvStbhsIMyYLwVXvUpUcDeC7rDXlzaocZvRJLsqfn1JEVMNlgzGbWFe+M7HGKEILvB783Pg+Ww== X-Forefront-PRVS: 087894CD3C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR05MB1690; 23:TBk+KawMSKNfgOJwjw9pstK75/rmZRn8wmWR1qYvU?= =?us-ascii?Q?Mw5C8DzwOvu9ukpQH1H/62Fs76Jkb17m3ByyqOe6AEdzXOBLXK7ErmXA/EWH?= =?us-ascii?Q?wq69Rf3ZWq25POj+2Rt86r2KzCMPXSEOHnNeO4fs1rs80eGuyFP862K/krXF?= =?us-ascii?Q?815AdfEZFOTFt9twwt42aZIdeVEC77JlR+zn9LBWWiVMhyPPZKhQFSS8hkh3?= =?us-ascii?Q?3jaK/5Vs+7BPePDOj46Kq4k0g9g77YwLxeQjOOIcEHCB/CuCQ1OqNr/wq8fs?= =?us-ascii?Q?UG+0R+RUJqKUIPvp2rraHGzsCA7InYEzANhGuXZOdtRpY/qT/8SCvH6epmZj?= =?us-ascii?Q?n5uJheqeCigXFYMYUJghehsEo4oXIbJ3Kn/tZEhCSOofVWtfYCrmCv66AhvB?= =?us-ascii?Q?rOz+iR5N7SMGuAi7Zqj1Fb+9yf7RjYYVVBZHHNfpaPvOUT7lRyRO2c5oeEnm?= =?us-ascii?Q?Drsl9TaQaVT26T8CkvhG3rfht0Ahip58QAbdaNTZP/DaaXXtp0SjkPuth32t?= =?us-ascii?Q?2Yqn7/57FCZ5Ra3o99l1WY8Bu7KOMzHx4Ml2RvbF6OUg4Xc24iwSbRF+6GW7?= =?us-ascii?Q?Z4ZN4Lif4gpJtTM7YSJghMwa0mYogNWyfw1dneI54gKbxHdxq9PDQIutjf3w?= =?us-ascii?Q?5AFusXCtrBgWjMZxEJFBuN9iSDsI3tScewJGqhlJURzrceSMyQq8nC67LFhW?= =?us-ascii?Q?io8+aHShsN/GZ7WivP9uHF6KQBsQvOMghSXGK91GDudeK2ynGkCbIvzkuIji?= =?us-ascii?Q?6vX2DA0loX0e/wOvlWm6hdKyVAb7+V3WX6s3jeo7i2hGM1/Dx+2oyq4bn6Ey?= =?us-ascii?Q?kvVbBztgFums7wxwXkUtEFi/MAAwF6NzrpQL1vTki0aNI/1u+7xMEY/CzK/s?= =?us-ascii?Q?4S6jwxodFZDdxbwZYvvAqdNbE1fP2J892bcXUZXlnpRRHmJiqvcVaep1N8ry?= =?us-ascii?Q?3ge0iKPNV6vfx5/7dKLNsZRSfxF2QZSe+XYZd8S3LCU8VFlJSpYR0IuWRPq7?= =?us-ascii?Q?5estBhVncXsE+beaqkOIF1JmMgvqDjWX2PmFaekkC8VogHxc0fLUiElgXRTL?= =?us-ascii?Q?QqQ5eOD5XTWjYRcG8VrGtAdEpzhcnf9s8hRXQfyI7+Er3KH9mMp4wwF68IE+?= =?us-ascii?Q?Ur+vpMyzjHASBWGO4QfY6RoBzlUeGfa5t+frfw+K/72VrUTFuldUQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1690; 5:F+tZ94ZHc/YuJYAT0iLlJTzgb8CmK6dCy38MtthdOPXP/eJE43+gnM9cB/86EssnjuAD5yOWtHmGjrzUN9PyadxN+k/+lrg3V1BdMs5ET7SphpCqaUjZcibChXpsofunix3w+LiKkwqopEYY2grZOg==; 24:AsFBS5+1boMlAZPcOFq8YlJ0mFtfo+yUYz03HrkNVC7v0T9gg4bT2XpDrhu5GWQLb32DtFRqvgA3fWcbYOts2rRQKGyJ3Lx9FTq1WYEuO/o= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2016 22:12:04.0806 (UTC) X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a652971c-7d2e-4d9b-a6a4-d149256f461b; Ip=[12.216.194.146]; Helo=[ld-1.internal.tilera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB1690 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160311_141231_172006_6071887F X-CRM114-Status: GOOD ( 16.91 ) X-Spam-Score: -2.0 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chris Metcalf Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In do_notify_resume(), call task_isolation_ready() for TIF_TASK_ISOLATION tasks when we are checking the thread-info flags; and after we've handled the other work, call task_isolation_enter() for such tasks. To ensure we always call task_isolation_enter() when returning to userspace, add _TIF_TASK_ISOLATION to _TIF_WORK_MASK, while leaving the old bitmask value as _TIF_WORK_LOOP_MASK to check while looping. We tweak syscall_trace_enter() slightly to carry the "flags" value from current_thread_info()->flags for each of the tests, rather than doing a volatile read from memory for each one. This avoids a small overhead for each test, and in particular avoids that overhead for TIF_NOHZ when TASK_ISOLATION is not enabled. We instrument the smp_cross_call() routine so that it checks for isolated tasks and generates a suitable warning if we are about to disturb one of them in strict or debug mode. Finally, add an explicit check for STRICT mode in do_mem_abort() to handle the case of page faults. Signed-off-by: Chris Metcalf --- arch/arm64/include/asm/thread_info.h | 5 ++++- arch/arm64/kernel/ptrace.c | 15 ++++++++++++--- arch/arm64/kernel/signal.c | 10 ++++++++++ arch/arm64/kernel/smp.c | 2 ++ arch/arm64/mm/fault.c | 4 ++++ 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h index abd64bd1f6d9..bdc6426b9968 100644 --- a/arch/arm64/include/asm/thread_info.h +++ b/arch/arm64/include/asm/thread_info.h @@ -109,6 +109,7 @@ static inline struct thread_info *current_thread_info(void) #define TIF_NEED_RESCHED 1 #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ #define TIF_FOREIGN_FPSTATE 3 /* CPU's FP state is not current's */ +#define TIF_TASK_ISOLATION 4 #define TIF_NOHZ 7 #define TIF_SYSCALL_TRACE 8 #define TIF_SYSCALL_AUDIT 9 @@ -124,6 +125,7 @@ static inline struct thread_info *current_thread_info(void) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) #define _TIF_FOREIGN_FPSTATE (1 << TIF_FOREIGN_FPSTATE) +#define _TIF_TASK_ISOLATION (1 << TIF_TASK_ISOLATION) #define _TIF_NOHZ (1 << TIF_NOHZ) #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) @@ -132,7 +134,8 @@ static inline struct thread_info *current_thread_info(void) #define _TIF_32BIT (1 << TIF_32BIT) #define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \ - _TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE) + _TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE | \ + _TIF_TASK_ISOLATION) #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \ _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \ diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index ff7f13239515..6fbb70112e11 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -1246,14 +1247,22 @@ static void tracehook_report_syscall(struct pt_regs *regs, asmlinkage int syscall_trace_enter(struct pt_regs *regs) { - /* Do the secure computing check first; failures should be fast. */ + unsigned long work = ACCESS_ONCE(current_thread_info()->flags); + + /* In isolation mode, we may prevent the syscall from running. */ + if (work & _TIF_TASK_ISOLATION) { + if (task_isolation_syscall(regs->syscallno) == -1) + return -1; + } + + /* Do the secure computing check early; failures should be fast. */ if (secure_computing() == -1) return -1; - if (test_thread_flag(TIF_SYSCALL_TRACE)) + if (work & _TIF_SYSCALL_TRACE) tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER); - if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) + if (work & _TIF_SYSCALL_TRACEPOINT) trace_sys_enter(regs, regs->syscallno); audit_syscall_entry(regs->syscallno, regs->orig_x0, regs->regs[1], diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index 1f172f8afe47..1e6ee84bd6ca 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -424,9 +425,18 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, if (thread_flags & _TIF_FOREIGN_FPSTATE) fpsimd_restore_current_state(); + + if (thread_flags & _TIF_TASK_ISOLATION) + task_isolation_enter(); } local_irq_disable(); thread_flags = READ_ONCE(current_thread_info()->flags); + + /* Clear task isolation from cached_flags manually. */ + if ((thread_flags & _TIF_TASK_ISOLATION) && + task_isolation_ready()) + thread_flags &= ~_TIF_TASK_ISOLATION; + } while (thread_flags & _TIF_WORK_MASK); } diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index b1adc51b2c2e..dcb3282d04a2 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -632,6 +633,7 @@ static const char *ipi_types[NR_IPI] __tracepoint_string = { static void smp_cross_call(const struct cpumask *target, unsigned int ipinr) { trace_ipi_raise(target, ipi_types[ipinr]); + task_isolation_debug_cpumask(target); __smp_cross_call(target, ipinr); } diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index abe2a9542b3a..d9b5119328eb 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -473,6 +474,9 @@ asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr, const struct fault_info *inf = fault_info + (esr & 63); struct siginfo info; + if (user_mode(regs)) + task_isolation_exception("%s at %#lx", inf->name, addr); + if (!inf->fn(addr, esr, regs)) return;