stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.4] x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER
@ 2018-02-09 23:21 Eric Biggers
  2018-02-11  0:08 ` Hugh Dickins
  2018-02-13 16:32 ` Patch "x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER" has been added to the 4.4-stable tree gregkh
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Biggers @ 2018-02-09 23:21 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman
  Cc: Alexander Potapenko, Dave Hansen, Hugh Dickins, x86, Eric Biggers

This is a build fix for the 4.4 PTI backport.  4.4 kernels do not have
commit be7635e7287e ("arch, ftrace: for KASAN put hard/soft IRQ entries
into separate sections") which went into 4.6.  Consequently, the
irqentry sections are only created when CONFIG_FUNCTION_GRAPH_TRACER is
enabled, not also when CONFIG_KASAN is enabled.  Therefore, fix the
condition for trying to add a user mapping for this section.

This fixes the following build error:

    arch/x86/mm/kaiser.c: In function ‘kaiser_init’:
    arch/x86/mm/kaiser.c:367:33: error: ‘__irqentry_text_start’ undeclared (first use in this function)
      kaiser_add_user_map_ptrs_early(__irqentry_text_start,
    [...]

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 arch/x86/mm/kaiser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c
index 2298434f7bdb..7a72e32e4806 100644
--- a/arch/x86/mm/kaiser.c
+++ b/arch/x86/mm/kaiser.c
@@ -363,7 +363,7 @@ void __init kaiser_init(void)
 	kaiser_add_user_map_ptrs_early(__entry_text_start, __entry_text_end,
 				       __PAGE_KERNEL_RX);
 
-#if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN)
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
 	kaiser_add_user_map_ptrs_early(__irqentry_text_start,
 				       __irqentry_text_end,
 				       __PAGE_KERNEL_RX);
-- 
2.16.0.rc1.238.g530d649a79-goog

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 4.4] x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER
  2018-02-09 23:21 [PATCH 4.4] x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER Eric Biggers
@ 2018-02-11  0:08 ` Hugh Dickins
  2018-02-13 15:46   ` Greg Kroah-Hartman
  2018-02-13 16:32 ` Patch "x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER" has been added to the 4.4-stable tree gregkh
  1 sibling, 1 reply; 4+ messages in thread
From: Hugh Dickins @ 2018-02-11  0:08 UTC (permalink / raw)
  To: Eric Biggers
  Cc: stable, Greg Kroah-Hartman, Alexander Potapenko, Dave Hansen,
	Hugh Dickins, x86

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1609 bytes --]

On Fri, 9 Feb 2018, Eric Biggers wrote:

> This is a build fix for the 4.4 PTI backport.  4.4 kernels do not have
> commit be7635e7287e ("arch, ftrace: for KASAN put hard/soft IRQ entries
> into separate sections") which went into 4.6.  Consequently, the
> irqentry sections are only created when CONFIG_FUNCTION_GRAPH_TRACER is
> enabled, not also when CONFIG_KASAN is enabled.  Therefore, fix the
> condition for trying to add a user mapping for this section.
> 
> This fixes the following build error:
> 
>     arch/x86/mm/kaiser.c: In function ‘kaiser_init’:
>     arch/x86/mm/kaiser.c:367:33: error: ‘__irqentry_text_start’ undeclared (first use in this function)
>       kaiser_add_user_map_ptrs_early(__irqentry_text_start,
>     [...]
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Yep, sorry about that, thanks Eric:
Acked-by: Hugh Dickins <hughd@google.com>

> ---
>  arch/x86/mm/kaiser.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c
> index 2298434f7bdb..7a72e32e4806 100644
> --- a/arch/x86/mm/kaiser.c
> +++ b/arch/x86/mm/kaiser.c
> @@ -363,7 +363,7 @@ void __init kaiser_init(void)
>  	kaiser_add_user_map_ptrs_early(__entry_text_start, __entry_text_end,
>  				       __PAGE_KERNEL_RX);
>  
> -#if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN)
> +#ifdef CONFIG_FUNCTION_GRAPH_TRACER
>  	kaiser_add_user_map_ptrs_early(__irqentry_text_start,
>  				       __irqentry_text_end,
>  				       __PAGE_KERNEL_RX);
> -- 
> 2.16.0.rc1.238.g530d649a79-goog

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 4.4] x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER
  2018-02-11  0:08 ` Hugh Dickins
@ 2018-02-13 15:46   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2018-02-13 15:46 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: Eric Biggers, stable, Alexander Potapenko, Dave Hansen, x86

On Sat, Feb 10, 2018 at 04:08:16PM -0800, Hugh Dickins wrote:
> On Fri, 9 Feb 2018, Eric Biggers wrote:
> 
> > This is a build fix for the 4.4 PTI backport.  4.4 kernels do not have
> > commit be7635e7287e ("arch, ftrace: for KASAN put hard/soft IRQ entries
> > into separate sections") which went into 4.6.  Consequently, the
> > irqentry sections are only created when CONFIG_FUNCTION_GRAPH_TRACER is
> > enabled, not also when CONFIG_KASAN is enabled.  Therefore, fix the
> > condition for trying to add a user mapping for this section.
> > 
> > This fixes the following build error:
> > 
> >     arch/x86/mm/kaiser.c: In function ‘kaiser_init’:
> >     arch/x86/mm/kaiser.c:367:33: error: ‘__irqentry_text_start’ undeclared (first use in this function)
> >       kaiser_add_user_map_ptrs_early(__irqentry_text_start,
> >     [...]
> > 
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
> 
> Yep, sorry about that, thanks Eric:
> Acked-by: Hugh Dickins <hughd@google.com>

Thanks, now queued up.

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Patch "x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER" has been added to the 4.4-stable tree
  2018-02-09 23:21 [PATCH 4.4] x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER Eric Biggers
  2018-02-11  0:08 ` Hugh Dickins
@ 2018-02-13 16:32 ` gregkh
  1 sibling, 0 replies; 4+ messages in thread
From: gregkh @ 2018-02-13 16:32 UTC (permalink / raw)
  To: ebiggers, dave.hansen, glider, gregkh, hughd; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-kaiser-fix-build-error-with-kasan-function_graph_tracer.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From ebiggers@google.com  Tue Feb 13 16:43:57 2018
From: Eric Biggers <ebiggers@google.com>
Date: Fri,  9 Feb 2018 15:21:31 -0800
Subject: x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER
To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alexander Potapenko <glider@google.com>, Dave Hansen <dave.hansen@linux.intel.com>, Hugh Dickins <hughd@google.com>, x86@kernel.org, Eric Biggers <ebiggers@google.com>
Message-ID: <20180209232131.60555-1-ebiggers@google.com>

From: Eric Biggers <ebiggers@google.com>

This is a build fix for the 4.4 PTI backport.  4.4 kernels do not have
commit be7635e7287e ("arch, ftrace: for KASAN put hard/soft IRQ entries
into separate sections") which went into 4.6.  Consequently, the
irqentry sections are only created when CONFIG_FUNCTION_GRAPH_TRACER is
enabled, not also when CONFIG_KASAN is enabled.  Therefore, fix the
condition for trying to add a user mapping for this section.

This fixes the following build error:

    arch/x86/mm/kaiser.c: In function ‘kaiser_init’:
    arch/x86/mm/kaiser.c:367:33: error: ‘__irqentry_text_start’ undeclared (first use in this function)
      kaiser_add_user_map_ptrs_early(__irqentry_text_start,
    [...]

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/x86/mm/kaiser.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/mm/kaiser.c
+++ b/arch/x86/mm/kaiser.c
@@ -363,7 +363,7 @@ void __init kaiser_init(void)
 	kaiser_add_user_map_ptrs_early(__entry_text_start, __entry_text_end,
 				       __PAGE_KERNEL_RX);
 
-#if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN)
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
 	kaiser_add_user_map_ptrs_early(__irqentry_text_start,
 				       __irqentry_text_end,
 				       __PAGE_KERNEL_RX);


Patches currently in stable-queue which might be from ebiggers@google.com are

queue-4.4/keys-encrypted-fix-buffer-overread-in-valid_master_desc.patch
queue-4.4/x86-kaiser-fix-build-error-with-kasan-function_graph_tracer.patch

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-13 16:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-09 23:21 [PATCH 4.4] x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER Eric Biggers
2018-02-11  0:08 ` Hugh Dickins
2018-02-13 15:46   ` Greg Kroah-Hartman
2018-02-13 16:32 ` Patch "x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER" has been added to the 4.4-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).