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: <20200723221641.GA12405@linux.intel.com>
Date:   Fri, 24 Jul 2020 01:16:41 +0300
From:   Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:     linux-kernel@...r.kernel.org
Cc:     Andi Kleen <ak@...ux.intel.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Mike Rapoport <rppt@...ux.ibm.com>,
        Jiri Olsa <jolsa@...hat.com>
Subject: Re: [PATCH v4 5/7] arch/x86: kprobes: Use text_alloc() in
 alloc_insn_page()

On Fri, Jul 17, 2020 at 06:04:19AM +0300, Jarkko Sakkinen wrote:
> Use text_alloc() as part of the arch specific implementation for
> alloc_insn_page().
> 
> Cc: Andi Kleen <ak@...ux.intel.com>
> Cc: Masami Hiramatsu <mhiramat@...nel.org>
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>Im
> ---
>  arch/x86/kernel/kprobes/core.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
> index ada39ddbc922..0f20a3e52a06 100644
> --- a/arch/x86/kernel/kprobes/core.c
> +++ b/arch/x86/kernel/kprobes/core.c
> @@ -423,7 +423,7 @@ void *alloc_insn_page(void)
>  {
>  	void *page;
>  
> -	page = module_alloc(PAGE_SIZE);
> +	page = text_alloc(PAGE_SIZE);
>  	if (!page)
>  		return NULL;
>  
> @@ -443,12 +443,6 @@ void *alloc_insn_page(void)
>  	return page;
>  }
>  
> -/* Recover page to RW mode before releasing it */
> -void free_insn_page(void *page)
> -{
> -	module_memfree(page);

This must be a mistake. Should be just changed to call text_memfree().

Probably just my clumsiness when refactoring the series.

> -}
> -
>  static int arch_copy_kprobe(struct kprobe *p)
>  {
>  	struct insn insn;
> -- 
> 2.25.1
> 

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ