lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181207234731.f52a8c1eff6c0e72c073ad40@kernel.org>
Date:   Fri, 7 Dec 2018 23:47:31 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Andrea Righi <righi.andrea@...il.com>
Cc:     "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
        Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
        "David S. Miller" <davem@...emloft.net>,
        Yonghong Song <yhs@...com>, Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kprobes: x86_64: blacklist non-attachable interrupt
 functions

On Thu, 6 Dec 2018 10:56:48 +0100
Andrea Righi <righi.andrea@...il.com> wrote:

> 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 <righi.andrea@...il.com>

For the short term, this is OK. But this is not the best way to cover
other functions which are also prohibited by arch_within_kprobe_blacklist().
I'll fix this issue later.

Acked-by: Masami Hiramatsu <mhiramat@...nel.org>

Thank you,

> ---
>  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


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ