Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10493411imu; Thu, 6 Dec 2018 01:59:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/UqYUhomPmJsuJIR7cELk6xLRYRIHpliopH/uBgGdyo7F7i7EWwiQpj2PM6dnzQic0yJabo X-Received: by 2002:a62:be15:: with SMTP id l21mr15274284pff.51.1544090359088; Thu, 06 Dec 2018 01:59:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544090359; cv=none; d=google.com; s=arc-20160816; b=D+kEuMzJi8WIa9eHtHjZlPHn5SLPLXiIIiBYQtboi97JkoPBxb0nyaQX73K4DGg1oA B/GQs/UHvIaKMwbhx7qGmZ5vEARYtHh2CXk/XjwOnZ43t22GggoaICwuWL+fQM5yjaly +g71GWhATECUKdn9PWDpLTCs7DCMQ/E/CrXaPbo1UlPPMhVb4tjUx+WpMaVIjOHWgtpF 2btO8xnAjFv5OM1sNfp6aHID8tsIH+hqPfoYldGLtKwmwls3O8ZQgbncKRe3dfl3k0SI BJTJPJCGxrbaZ85ZXgeWKThM43925TB4lMlYCIx3sLLgtuvBJ/OXAaUkPAm80K4XOrxy BEag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=Y1O0i4LsrdJRLR5xupdJwfh3yMg1QXWfDUS+Qohz1NU=; b=XgLynlKsRg1q+h+9ZBLqUlBNInwtFJpSfn51LmoQZXsZQVYEhmZSp/Y13fOOR0DA45 Gwn8jkQyPuHPKcB+IbFARA7sM8ulCOSyxIncZxz2s2aI0hg6oxBNJD0t2qWoIMQjuMO2 7uTblkbxGOvggxhEXmcXRaujAvMD+NpFHJuTfO5jqEsaNH9IZua0H2MXKb6QsDwhYUj/ lFfVaWAvHRvblDMbEJxmtxdT3t++1V386Z4FLWDsi1doUqXZ47fOW33r4014opV7aidi kHxDAAIBtbBW+DbO+Y6YKJQcZWJfDSTxO7dD/O7efJ14MOIeC4hSQkZlASKhcl2BR/1Z AHyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m36ndSYH; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si21401754plt.394.2018.12.06.01.59.03; Thu, 06 Dec 2018 01:59:19 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=m36ndSYH; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729376AbeLFJ4w (ORCPT + 99 others); Thu, 6 Dec 2018 04:56:52 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39386 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728161AbeLFJ4v (ORCPT ); Thu, 6 Dec 2018 04:56:51 -0500 Received: by mail-wr1-f67.google.com with SMTP id t27so22583628wra.6 for ; Thu, 06 Dec 2018 01:56:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=Y1O0i4LsrdJRLR5xupdJwfh3yMg1QXWfDUS+Qohz1NU=; b=m36ndSYHhatelG/LGALpZcBP8+UyUVRWbWm/hkJ5gXXj4HN/OmyoCTUYrwZsDOCn4L HfB3dvaa+3BsXHD9OFTdBMuLz5goSPtbPRaCs3DEK+xaDHL5YXBTkphC/SzFm0ce7KcI oe6fkvTEqgsPHYW9j/vprkWGYRYNKm9DPUAYYpuXL32O5rpK2PRbL0DVZN2yktDmB26V CO/9qXHIwPRn8y7puddkoY0dEgOmnvrz0nvLczLJr/Dbux2YhkUuIYhepT4Cq5rnJIYv U9DAYdDKDozX2zNYQ0AB+nFGL60nVQn8evYJ1aPMJOV4uYhQK6Tc3Z4WlP0Zo4uEtsdT arNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=Y1O0i4LsrdJRLR5xupdJwfh3yMg1QXWfDUS+Qohz1NU=; b=oD1QoSP8eAr9//6H23D4Fa0VuNXp7UaKU/FpAPlXqud05p3Hes061VgDJrIZXxc191 NEr3BNyNMDrl0psFCNHim2ZaKahkBzGHEHULRopYVt3//RI6ALJ9aUKnKLKYlbbyINvS 85VtML7IeZWwX3eBA6cIJ86tPwc0zHbjaVyjxY9ntGvXK6t/4AWBJor+PvAd5Ek6NcA6 DI50rYUj7IQRcXvqU1ZxgHwXXAUOBz71HpIukrjk7soVWFQfo9PNH0pcbge9EFkj4hFw B8J2rfTNXcDio0ygvOE220jhZzd61EN2IWzXWTgAaRwknbq0f+D3ZyQk3sdctUehYuBx kRfQ== X-Gm-Message-State: AA+aEWYopGnM7WxWUmReT+OhaLIovzSeG1OV/m/ELkCURW6fdJ9EqQ6p DwcgGzBMSBNmrweX8FYYLA== X-Received: by 2002:a5d:6b09:: with SMTP id v9mr26156859wrw.304.1544090209864; Thu, 06 Dec 2018 01:56:49 -0800 (PST) Received: from localhost (host34-126-dynamic.27-79-r.retail.telecomitalia.it. [79.27.126.34]) by smtp.gmail.com with ESMTPSA id b16sm21618452wrm.41.2018.12.06.01.56.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Dec 2018 01:56:49 -0800 (PST) Date: Thu, 6 Dec 2018 10:56:48 +0100 From: Andrea Righi To: "Naveen N. Rao" , Anil S Keshavamurthy , "David S. Miller" , Masami Hiramatsu Cc: Yonghong Song , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] kprobes: x86_64: blacklist non-attachable interrupt functions Message-ID: <20181206095648.GA8249@Dell> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 ce25d84023c0..1f0efdb7b629 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -566,6 +566,7 @@ ENTRY(interrupt_entry) ret END(interrupt_entry) +_ASM_NOKPROBE(interrupt_entry) /* Interrupt entry/exit. */ @@ -766,6 +767,7 @@ native_irq_return_ldt: jmp native_irq_return_iret #endif END(common_interrupt) +_ASM_NOKPROBE(common_interrupt) /* * APIC interrupts. @@ -780,6 +782,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: */ @@ -960,6 +963,7 @@ ENTRY(\sym) jmp error_exit .endif +_ASM_NOKPROBE(\sym) END(\sym) .endm -- 2.17.1