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]
Date:   Wed, 8 Mar 2017 15:07:08 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     linux-kernel@...r.kernel.org
Cc:     Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Todd Brandt <todd.e.brandt@...ux.intel.com>,
        linux-mm@...ck.org, Vlastimil Babka <vbabka@...e.cz>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [RFC][PATCH 4/4] ftrace: Allow for function tracing to record
 init functions on boot up


Dear mm folks,

Are you OK with this change? I need a hook to when the init sections
are being freed along with the address that are being freed. As each
arch frees their own init sections I need a single location to place my
hook. The archs all call free_reserved_area(). As this isn't a critical
section (ie. one that needs to be really fast), calling into ftrace
with the freed address should not be an issue. The ftrace code uses a
binary search within the blocks of locations so it is rather fast
itself.

Thoughts? Acks? :-)

-- Steve


> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2c6d5f64feca..95ac03de4cda 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -64,6 +64,7 @@
>  #include <linux/page_owner.h>
>  #include <linux/kthread.h>
>  #include <linux/memcontrol.h>
> +#include <linux/ftrace.h>
>  
>  #include <asm/sections.h>
>  #include <asm/tlbflush.h>
> @@ -6441,6 +6442,9 @@ unsigned long free_reserved_area(void *start, void *end, int poison, char *s)
>  	void *pos;
>  	unsigned long pages = 0;
>  
> +	/* This may be .init text, inform ftrace to remove it */
> +	ftrace_free_mem(start, end);
> +
>  	start = (void *)PAGE_ALIGN((unsigned long)start);
>  	end = (void *)((unsigned long)end & PAGE_MASK);
>  	for (pos = start; pos < end; pos += PAGE_SIZE, pages++) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ