Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp54400lqo; Tue, 7 May 2024 11:56:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUeLNflioy69Z5NDs2JXYvkH7ghe5V9CWt+MwKnOS/9zvMGMsjaZOIhWoFTgb0kDjtmsyngzco1u1PGJfw6y1wXxvrcecHm9mpiL0ofaA== X-Google-Smtp-Source: AGHT+IER1rYJW4Xfyl6J2ysKv64PVFd7OG2IW6ATmpAc6wlwRmNqh5yxOvMxKHbgM5OCe9x5GqFR X-Received: by 2002:a17:902:a508:b0:1eb:1fdc:25e7 with SMTP id d9443c01a7336-1eeb01a3fa4mr5261325ad.19.1715108197281; Tue, 07 May 2024 11:56:37 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i9-20020a17090332c900b001e6401b263asi11199011plr.121.2024.05.07.11.56.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 11:56:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171993-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=WL4fSDCu; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=MU2+bulk; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-171993-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171993-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 406DDB24ECE for ; Tue, 7 May 2024 18:38:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40E4B16D9B0; Tue, 7 May 2024 18:37:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="WL4fSDCu"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="MU2+bulk" Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0894D6CDC2; Tue, 7 May 2024 18:37:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715107049; cv=fail; b=TMqQ3DlxpqKZkx5DFk1yqfmHi9v/RjeeuWWxBwr/C8dAY1320W1jO+djTF+gTQYZy4qWBobOcbzHUt1yCc1vxC/84EraKWBe8a/rDrYXt5Wxai1RL5Hi6tho+S8HfvBZLiVlUPphbok5DhxVS+Hy43YSd15JLFeEkML593uxn0o= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715107049; c=relaxed/simple; bh=tVSeIf6jLE8Th0LQMoL76hJ3nD1kQFbQgxjcugr5FmU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: Content-Type:MIME-Version; b=PpZdeLbpN1XITxSeAlqp9YZHcqm/CucDq3Z5C5OkN7vwDM8zCDhaOCfHqK5pEDjZdsx3yeorm8M6+Ucut4re/zMEuhMLSLHDz0zZlWnOM9UIcwYfd8QrWsovVOxQN3slOhxHchgXfb3MGnxzdX1Vo5/1LK8U/IG2C1cmug7teks= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=WL4fSDCu; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=MU2+bulk; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 447IK7WP026216; Tue, 7 May 2024 18:36:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : in-reply-to : references : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=+NSfvSZq2CrY+rd+lSMoaVY+9pa/iDvVFk9ybBAz1Uo=; b=WL4fSDCuTlQ7boD0bHFUX+FcX5xDta1jJkhAnHtGy9xCKM0fyTGq2FtgT/mXnPqXo9Bw CH8L/WocXZNQ1RIG0g9LsdEi7ptES9gNIgkY9zGBO1jjQBoP1DCILgXkfAnfJYpd6D/K J2/dYnAw4+zwGDPm6+H9j52QMw4f24ItDcUiUmzSYxyYoadKr9TusQTLhFVhuoG6B0DR K3yc5qa1h2ZGnLU3bCzn1xnb62D5/V/C1R69PZQxLC7K0spP0dIh3kKjz8BKZsz1sJAt nBfmA/ori6SY7Dx8CeIGq/1Q9ePYr3zxWN5xJoBt0JPW9lFno7WQYeO9ho/H38HqZK1T 8g== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xysfvg1be-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 May 2024 18:36:32 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 447IJ1KN030927; Tue, 7 May 2024 18:36:31 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3xysfk0pxb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 May 2024 18:36:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hli/8+9nF9PDwC6oCEyFjrzC8UXPQJLxkm2Z+wBMf7lCGNdO0pHSvy1sdMB9IL4Hz2OBjund8OLuipznCO3FxRvmPmH15qRAgFobgjTP84dTxhi1C9Hasa0C5SMH6RaLIzNbIU81Wm7KahVz8jTbCUHa98KNSymeBZjldGfViRfp2U+dEoOB/j+23Lc67XmlBsBKl/6eHj0JUQGcn19HHDZN1deGkgy1HSy9s48oHyQW892fL+XPReTmTGs9EjySxqqHQfFc2sA4p1FNs7anxK2aNzGWcga3KG1dzSJLubfSMjlwTyT35ey51nyA7aDLTp2S0h7jDlQzuTAgjMHh4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+NSfvSZq2CrY+rd+lSMoaVY+9pa/iDvVFk9ybBAz1Uo=; b=Nph4N1R9zW9UY2VNMkzqJ5q6P/SE3I4Rw4Cv5Zya15jg6UZAIwiOfIemn8QI9PaM7X0AcRLBV28QdGb7OdBnV/+G3f0yMN5HhG4Why0arSULajSPdlIyUr09rBxR4ZFISDgc00yC3bxBtMCUXYc3fksSD+ujy5QgvGTgV86ZbLkNQ3XnE7oqIB8dQ8XIkktbywDswi/RGOmfQJ3jsBl5Uh4XR458Jq8Hp1Hyx3vFt8BMyLG/a48vkmv6VxCI92lAJ1raLZBIaL7SLn6MJvs2rkfr4gA6+2I+YsdMYTh/3K9mWy2JfuOSj2T1L4kJW0SXRlJuSjx1oqMJkIoOh0G9Vw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+NSfvSZq2CrY+rd+lSMoaVY+9pa/iDvVFk9ybBAz1Uo=; b=MU2+bulkRRXqhtacPUuHMNjzkCyYM/WS6TT2aZ6QaO56trABCmQd8u0hJbAgQIXuM9ZZR063kdmT5oRaY7TB0fvWeNYpRGD8m6aiGJIXYGQi7aJntP9EjJTFKA2iQhBO8duDNeDzYfjQm+zNSAxbLoT2TFnhMQU5zTNqL+GASQg= Received: from PH8PR10MB6597.namprd10.prod.outlook.com (2603:10b6:510:226::20) by BN0PR10MB5175.namprd10.prod.outlook.com (2603:10b6:408:115::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.43; Tue, 7 May 2024 18:36:25 +0000 Received: from PH8PR10MB6597.namprd10.prod.outlook.com ([fe80::6874:4af6:bf0a:6ca]) by PH8PR10MB6597.namprd10.prod.outlook.com ([fe80::6874:4af6:bf0a:6ca%3]) with mapi id 15.20.7544.041; Tue, 7 May 2024 18:36:25 +0000 From: Stephen Brennan To: Christophe Leroy , Steven Rostedt , Masami Hiramatsu , Mark Rutland Cc: Guo Ren , Huacai Chen , WANG Xuerui , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Nicholas Piggin , "Aneesh Kumar K.V" , "Naveen N. Rao" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "x86@kernel.org" , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , "linux-trace-kernel@vger.kernel.org" , "linux-csky@vger.kernel.org" , "loongarch@lists.linux.dev" , "linux-parisc@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-riscv@lists.infradead.org" , "linux-s390@vger.kernel.org" Subject: Re: [PATCH v3] kprobe/ftrace: bail out if ftrace was killed In-Reply-To: References: <20240501162956.229427-1-stephen.s.brennan@oracle.com> Date: Tue, 07 May 2024 11:36:22 -0700 Message-ID: <87ttj9h3kp.fsf@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BL1PR13CA0150.namprd13.prod.outlook.com (2603:10b6:208:2bb::35) To PH8PR10MB6597.namprd10.prod.outlook.com (2603:10b6:510:226::20) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR10MB6597:EE_|BN0PR10MB5175:EE_ X-MS-Office365-Filtering-Correlation-Id: ded9d75e-bc25-49eb-49f4-08dc6ec4996d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|7416005|376005|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?RGVwZkRRaW96TWg1QVlpakpJMjFwU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dVMThLelQ3REpMei82WnlKb3EyMTFkNTgvNHRLek84?= =?utf-8?B?QVJkUHAyck05YkFrSG92MHhoVUo3MklIaUlVV3hDVzZTMmZPeVJ0MWp1MnRJ?= =?utf-8?B?VmdwQWtHMldkdStkaUN1OC8ycFN6SGJ0S2tKc1dkQjNPWlIwODFqQWpPTTFp?= =?utf-8?B?WmdVR1hOTEs1Y2lNVHB6RVNvU085MXZ4akdFa0hTR3REMXRQK0NlVUw2Mmpo?= =?utf-8?B?ajlIRGUvVncvVGREdVV3Y2dPOTlXSVVpMjY3dmQ5T280czFCVVVDV0tHanF1?= =?utf-8?B?WnIwdlF4NitERDNBMWc0R042MjNWMllsWVllMStaYVdrTDMzUjY3K21SQnhp?= =?utf-8?B?NEFraDBEVzFtNS96NE84THB1V2orUzBibCtBeG1ybGp5cjVCVFdtdnFaNkFJ?= =?utf-8?B?ck9kWi8yai83a2F4RmJaSHdYRkpwdXd4RXhMMnB2K1RBUmJUYlBjb1I4ZXFF?= =?utf-8?B?eFM4UGM5K0xoY3FlcXZUZkhmck1saTJydjlxbHZVdTVZT3p0cHJ3bDVYaHJu?= =?utf-8?B?bE9LUE9uVlZpeTdSTVkrbENxdWVWdVI0c0N5cEhMck9CcW1GMlNnRWFlRlZs?= =?utf-8?B?QTRCRU5Wd2dvNjZEUXBabmVDVVh6T1UzS01CekxBajQyVUFUK1BySVVrWGtn?= =?utf-8?B?Z2QwbFNqck54SEtEL2k0N290c1JNdkhtNms2ZWZVbWhuVXpQaXJxR1hkci9l?= =?utf-8?Q?2f7+Q0sLsVgDn+Y9Q9w7OEAm+5kASeFZVr6g+NB03e/k=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR10MB6597.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(7416005)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 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3RtZ0e1Nkvk+k6AbEhaz4l4634maaaasbJBFLkRJSl52BH8voN6PRZgpQPkiPbt+YMBaRA/PjO55kzki0QVEJL9XfWa7VC+Vx/cG2Ikt9587A/qvOR75XQx3gBlftOmizLHUs2Kqp/2ReQKDGOYI= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ded9d75e-bc25-49eb-49f4-08dc6ec4996d X-MS-Exchange-CrossTenant-AuthSource: PH8PR10MB6597.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 18:36:24.9008 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WwOZnOdTcj9ULTuqz/0avjVKx9btM5qxYc0NMnjYQFMlaisO/0u5IjF03NoaoJjK95a7QmQlppYstMra0ggegeG22juA3e7wn+gl49mVWfI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5175 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-07_11,2024-05-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 phishscore=0 suspectscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405070130 X-Proofpoint-ORIG-GUID: wo5v_Q4_FFO82DYzsVnZnT63OzaEeOFg X-Proofpoint-GUID: wo5v_Q4_FFO82DYzsVnZnT63OzaEeOFg Christophe Leroy writes: > Le 01/05/2024 =C3=A0 18:29, Stephen Brennan a =C3=A9crit=C2=A0: >> If an error happens in ftrace, ftrace_kill() will prevent disarming >> kprobes. Eventually, the ftrace_ops associated with the kprobes will be >> freed, yet the kprobes will still be active, and when triggered, they >> will use the freed memory, likely resulting in a page fault and panic. >>=20 >> This behavior can be reproduced quite easily, by creating a kprobe and >> then triggering a ftrace_kill(). For simplicity, we can simulate an >> ftrace error with a kernel module like [1]: >>=20 >> [1]: https://github.com/brenns10/kernel_stuff/tree/master/ftrace_killer >>=20 >> sudo perf probe --add commit_creds >> sudo perf trace -e probe:commit_creds >> # In another terminal >> make >> sudo insmod ftrace_killer.ko # calls ftrace_kill(), simulating bug >> # Back to perf terminal >> # ctrl-c >> sudo perf probe --del commit_creds >>=20 >> After a short period, a page fault and panic would occur as the kprobe >> continues to execute and uses the freed ftrace_ops. While ftrace_kill() >> is supposed to be used only in extreme circumstances, it is invoked in >> FTRACE_WARN_ON() and so there are many places where an unexpected bug >> could be triggered, yet the system may continue operating, possibly >> without the administrator noticing. If ftrace_kill() does not panic the >> system, then we should do everything we can to continue operating, >> rather than leave a ticking time bomb. >>=20 >> Signed-off-by: Stephen Brennan >> --- >> Changes in v3: >> Don't expose ftrace_is_dead(). Create a "kprobe_ftrace_disabled" >> variable and check it directly in the kprobe handlers. > > Isn't it safer to provide a fonction rather than a direct access to a=20 > variable ? Is the concern that other code could modify this variable? If so, then I suppose the function call is safer. But the variable is not exported and I think built-in code can be trusted not to muck with it. Maybe I'm missing your point about safety though? > By the way, wouldn't it be more performant to use a static branch (jump=20 > label) ? I agree with Steven's concern that text modification would unfortunately not be a good way to handle an error in text modification. Especially, I believe there could be deadlock risks, as static key enablement requires taking the text_mutex and the jump_label_mutex. I'd be concerned that the text_mutex could already be held in some situations where ftrace_kill() is called. But I'm not certain about that. Thanks for taking a look! Stephen