Message ID | 168904023542.116016.10540228903086100726.stgit@devnote2 |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp201016vqm; Mon, 10 Jul 2023 19:33:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlG29oM2PLQDJj9dd22Gxe+YrLmNeMvWPXzTjN06FOEu3nol3dz3uzqyCaMgiq5rt+4eI0Ny X-Received: by 2002:a05:6358:7f08:b0:135:57d0:d173 with SMTP id p8-20020a0563587f0800b0013557d0d173mr6314330rwn.20.1689042830281; Mon, 10 Jul 2023 19:33:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689042830; cv=none; d=google.com; s=arc-20160816; b=rOAUNkRPRSPEucKFKpGmfALQ8WgCYTNTlI+WlNNtGIWuhaG9GjDIN4QqcCBOT94pya N2mVlj73A/8FGKQUGIABm94c/hruto8MagCMkireIal8QlElV5GQZj7s8gOpUaxPjZgH eyvwIjiM4yRURto273ns3acKeytmaRhznMMhmBPqo4aQ+VSuCZQv3ZuXI5gvgNXYR68J cu+Brd7Bi3nLPeVSRObRDm7/EnlFKegKZTDagosN1GFZiN/g7tp0A4+0ibk1ZLRNeq8R 815iTZmkT0YBB0nTuze4M5zD3vuRy44ivBusi4pH5oQrOYSxtvzYhtbLyyl8Krpba45h E2Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:subject:cc:to:from:dkim-signature; bh=KtUqTRHNm8P56rMABMgndtu0TMTVfGk8Mazpag/smHY=; fh=B4q89xUy9DRjDdZZ7pfgA4xc0K5nMMNyHs2WNlwRQlk=; b=RUVPWarT6dkZsVFcPmZ7AgdfZb9KanS76PzRJAYvAjDKD55zmTYTOVAQohvdA6SkMg fPeni1+etTwfljZLCQwDbVuz/CrsIALwYPHk26jZHVmTxNtQ7l18wSktoM4ooPzRniCu FkDQLK07oumifW2C3ngIMvQbZxcW1NVLIszUFYgVp1Cb8zIFSjBDI+oAQhr4ikQQDF3m Q4JTuojtqJ4HRZsagkpqC1qz/3fHhTl/XdrD6JK4VNsQ2LAyYFidPoCQZiQXdJGF63Sg 6Nf93sPqShjpMUm7OstOXAagA7wQDsg19lbN7hXdlFG5Frcv+SaHG1nFBWIM+QnAUyUd r7wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k5BcaLv4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s21-20020a656915000000b005533750837csi598331pgq.681.2023.07.10.19.33.37; Mon, 10 Jul 2023 19:33:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k5BcaLv4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230113AbjGKBv0 (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Mon, 10 Jul 2023 21:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjGKBvR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 10 Jul 2023 21:51:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A46EA4; Mon, 10 Jul 2023 18:50:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0811861217; Tue, 11 Jul 2023 01:50:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 832D4C433C7; Tue, 11 Jul 2023 01:50:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689040241; bh=cTcnxfSzuVVM/ut1v16kNJC2utrcIMhUy/MYvzw6ZiY=; h=From:To:Cc:Subject:Date:From; b=k5BcaLv4ER43AGPRZqmLo7SZxdxqYVs9UMsjP/4SI9tQrN15Sfc2/JRCZyivckvqI 3iAoFbakXjgK3TDOAkQ3I08SWC2tw01e0WaIJuBNVIlzInvXPEmy/NJUhtkSu+9Ap2 nvrp0FeyFwYj7E0Dtrm4XK1nEMUyJJspz0UwZjVlcnp7IXS6rd8u8AJX3p13dS+A+n RO/CBQhv04A32sUyF7dySrQVZ5ZZjz7NCq6xBNyZeY53l75V8lgADgJ3u4ADUTDJj+ sB0AMGFBGjVDhVIlihcXnKqJ2ksKptuVzia7wLzVm2IltwcYKFl0AACvQYVE3/75P5 IMFFXNulbpxNQ== From: "Masami Hiramatsu (Google)" <mhiramat@kernel.org> To: Peter Zijlstra <peterz@infradead.org> Cc: Petr Pavlu <petr.pavlu@suse.com>, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, samitolvanen@google.com, x86@kernel.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Masami Hiramatsu <mhiramat@kernel.org> Subject: [PATCH v2 0/2] x86: kprobes: Fix CFI_CLANG related issues Date: Tue, 11 Jul 2023 10:50:35 +0900 Message-Id: <168904023542.116016.10540228903086100726.stgit@devnote2> X-Mailer: git-send-email 2.25.1 User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771037476909763761 X-GMAIL-MSGID: 1771089774771896965 |
Series |
x86: kprobes: Fix CFI_CLANG related issues
|
|
Message
Masami Hiramatsu (Google)
July 11, 2023, 1:50 a.m. UTC
Hi, Here is the 2nd version of the kprobe patches for kernel CFI. Previous version is here; https://lore.kernel.org/all/168899125356.80889.17967397360941194229.stgit@devnote2/ In this version "__pfx_" prefix symbols also are prohibited and that check is done unconditionally [1/2]. - Prohibit probing on __cfi_* and __pfx_* preamble symbols, which have CFI info. - Prohibit probing on compiler generated movl/addl which is used for detecting typeid on x86. Thank you, --- Masami Hiramatsu (Google) (2): kprobes: Prohibit probing on CFI preamble symbol x86/kprobes: Prohibit probing on compiler generated CFI checking code arch/x86/kernel/kprobes/core.c | 34 ++++++++++++++++++++++++++++++++++ kernel/kprobes.c | 14 +++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) -- Masami Hiramatsu (Google) <mhiramat@kernel.org>