Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1020615yba; Thu, 4 Apr 2019 02:35:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1wAKtby6Xryn6nb1OxQznDFJFLyKYFRItf1Z6IYABtpu83x3qO2T709wJJiwHp5GzYyAb X-Received: by 2002:a17:902:854c:: with SMTP id d12mr5406602plo.150.1554370532769; Thu, 04 Apr 2019 02:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554370532; cv=none; d=google.com; s=arc-20160816; b=BuLyIUdKUWsqjl9n6B7Wtpc1jyP9YjEbR3N+eJRZjtS+W/VJuH9Y6wQxF1GP1rJB/0 hJWUCINDFcAmVgj4ba+Dz42wFcDu/Z/4Tbv4np77RA8HiCjuy96UCdTtAe1XMcBMjzLi 4imjHQ2vnouIcS/YD4M0JGNeqdbEpzuNCFSZIZjvp6zGvnuggKOcol5zWjJzIc8bV7GE l+iNZNontepsh/NucaZUy4WzzSi4QE/hD3I2raFxLGgzdp9N6ErFsZwjLBRnOXE3ufiK XC9LNqWXYlTNvhuEGCp+1MzsgOAqajCTvm4bKjJNHq2lhXj31GBwReT/l5sIdC9Zg3Dx 8XWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=E13Ag54REgoZIwA2WuoljFU1oVI8QqMEcqjrYryC6C4=; b=HWV24dCEJuLQ1EAsx3QTe4aRb9wXP/QPdvbvX2PxyvsoC5xu/3CzMT4d7gPeCvzPff m0IU11jkGUZI0gGJukPC+Dnw9av/Xkg5s7Xhwqh84fKzST5l1ImmGjtZazxD8ymkOAHL 34+CjO0A0jSqm+o+plKFHoAICfRZlEoNwqbJ/ZHvclxhFHy4UlKBf0Jg7YdTF4O6SnDh DSSuw1RV16rk8Y9k6rxhLYZq5HMQzW03N7ufsTqP+keMnTiJpqoJ6VheY1vJlgrtUbe2 +s80EL1/pbQTfo1krknnsxkT/GVHjKDUPAVZ3lhw5LVZN89Jk+RFgRW+0w6AtEpQ5v4j xuLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XZoHGif7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m72si16684011pfj.279.2019.04.04.02.35.17; Thu, 04 Apr 2019 02:35:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XZoHGif7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732100AbfDDJHi (ORCPT + 99 others); Thu, 4 Apr 2019 05:07:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:46402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731858AbfDDJHg (ORCPT ); Thu, 4 Apr 2019 05:07:36 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 88A8D214AF; Thu, 4 Apr 2019 09:07:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368856; bh=NFdyG0c28uum+R0yFwpuAZGgwWWE8lGHF5IbpBx6O9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XZoHGif7nyR78HfJpxiwHMFZVIl+sRH7t8Hy4soPz1QRhMLe6Sw9HlPZYEqP9+V8p t/Wd3UznZ2TzEANveTxi3Y+mvm1dVWyUm2MKFV88jgPl8VwZ3mJiF1g8IcF28v5Nu/ eJxqvH0kgHixm1xMXoqQ7kQOO9M/Oq5ttzzblOB4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrea Righi , Andy Lutomirski , Anil S Keshavamurthy , Borislav Petkov , "David S. Miller" , Linus Torvalds , Masami Hiramatsu , "Naveen N. Rao" , Peter Zijlstra , Thomas Gleixner , Yonghong Song , Ingo Molnar , Sasha Levin Subject: [PATCH 4.19 187/187] kprobes/x86: Blacklist non-attachable interrupt functions Date: Thu, 4 Apr 2019 10:48:44 +0200 Message-Id: <20190404084611.921138608@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit a50480cb6d61d5c5fc13308479407b628b6bc1c5 ] These interrupt functions are already non-attachable by kprobes. Blacklist them explicitly so that they can show up in /sys/kernel/debug/kprobes/blacklist and tools like BCC can use this additional information. Signed-off-by: Andrea Righi Cc: Andy Lutomirski Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: David S. Miller Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yonghong Song Link: http://lkml.kernel.org/r/20181206095648.GA8249@Dell Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/entry/entry_64.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index f95dcb209fdf..617df50a11d9 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -627,6 +627,7 @@ ENTRY(interrupt_entry) ret END(interrupt_entry) +_ASM_NOKPROBE(interrupt_entry) /* Interrupt entry/exit. */ @@ -826,6 +827,7 @@ native_irq_return_ldt: jmp native_irq_return_iret #endif END(common_interrupt) +_ASM_NOKPROBE(common_interrupt) /* * APIC interrupts. @@ -840,6 +842,7 @@ ENTRY(\sym) call \do_sym /* rdi points to pt_regs */ jmp ret_from_intr END(\sym) +_ASM_NOKPROBE(\sym) .endm /* Make sure APIC interrupt handlers end up in the irqentry section: */ @@ -984,6 +987,7 @@ ENTRY(\sym) jmp error_exit .endif +_ASM_NOKPROBE(\sym) END(\sym) .endm -- 2.19.1