public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] extable: Flip the sorting message
@ 2013-04-15 10:51 Borislav Petkov
  2013-04-15 11:42 ` [tip:x86/asm] " tip-bot for Borislav Petkov
  2013-04-25 21:54 ` [PATCH] " H. Peter Anvin
  0 siblings, 2 replies; 7+ messages in thread
From: Borislav Petkov @ 2013-04-15 10:51 UTC (permalink / raw)
  To: LKML; +Cc: H. Peter Anvin, X86 ML, Borislav Petkov, David Daney

From: Borislav Petkov <bp@suse.de>

Now that we do sort the __extable at build time, we actually are
interested only in the case where we still do need to sort it.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: David Daney <david.daney@cavium.com>
---
 kernel/extable.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/extable.c b/kernel/extable.c
index fe35a634bf76..67460b93b1a1 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -41,10 +41,10 @@ u32 __initdata main_extable_sort_needed = 1;
 /* Sort the kernel's built-in exception table */
 void __init sort_main_extable(void)
 {
-	if (main_extable_sort_needed)
+	if (main_extable_sort_needed) {
+		pr_notice("Sorting __ex_table...\n");
 		sort_extable(__start___ex_table, __stop___ex_table);
-	else
-		pr_notice("__ex_table already sorted, skipping sort\n");
+	}
 }
 
 /* Given an address, look for it in the exception tables. */
-- 
1.8.2.135.g7b592fa


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

* [tip:x86/asm] extable: Flip the sorting message
  2013-04-15 10:51 [PATCH] extable: Flip the sorting message Borislav Petkov
@ 2013-04-15 11:42 ` tip-bot for Borislav Petkov
  2013-04-25 21:54 ` [PATCH] " H. Peter Anvin
  1 sibling, 0 replies; 7+ messages in thread
From: tip-bot for Borislav Petkov @ 2013-04-15 11:42 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, david.daney, tglx, bp

Commit-ID:  bec1b9e76353ecf05fac6a87f8e4102dfb618cd2
Gitweb:     http://git.kernel.org/tip/bec1b9e76353ecf05fac6a87f8e4102dfb618cd2
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Mon, 15 Apr 2013 12:51:49 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 15 Apr 2013 13:25:16 +0200

extable: Flip the sorting message

Now that we do sort the __extable at build time, we actually are
interested only in the case where we still do need to sort it.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: David Daney <david.daney@cavium.com>
Link: http://lkml.kernel.org/r/1366023109-12098-1-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/extable.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/extable.c b/kernel/extable.c
index fe35a63..67460b9 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -41,10 +41,10 @@ u32 __initdata main_extable_sort_needed = 1;
 /* Sort the kernel's built-in exception table */
 void __init sort_main_extable(void)
 {
-	if (main_extable_sort_needed)
+	if (main_extable_sort_needed) {
+		pr_notice("Sorting __ex_table...\n");
 		sort_extable(__start___ex_table, __stop___ex_table);
-	else
-		pr_notice("__ex_table already sorted, skipping sort\n");
+	}
 }
 
 /* Given an address, look for it in the exception tables. */

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

* Re: [PATCH] extable: Flip the sorting message
  2013-04-15 10:51 [PATCH] extable: Flip the sorting message Borislav Petkov
  2013-04-15 11:42 ` [tip:x86/asm] " tip-bot for Borislav Petkov
@ 2013-04-25 21:54 ` H. Peter Anvin
  2013-04-25 22:05   ` Borislav Petkov
  1 sibling, 1 reply; 7+ messages in thread
From: H. Peter Anvin @ 2013-04-25 21:54 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: LKML, X86 ML, Borislav Petkov, David Daney

On 04/15/2013 03:51 AM, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> 
> Now that we do sort the __extable at build time, we actually are
> interested only in the case where we still do need to sort it.
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: David Daney <david.daney@cavium.com>
> ---
>  kernel/extable.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/extable.c b/kernel/extable.c
> index fe35a634bf76..67460b93b1a1 100644
> --- a/kernel/extable.c
> +++ b/kernel/extable.c
> @@ -41,10 +41,10 @@ u32 __initdata main_extable_sort_needed = 1;
>  /* Sort the kernel's built-in exception table */
>  void __init sort_main_extable(void)
>  {
> -	if (main_extable_sort_needed)
> +	if (main_extable_sort_needed) {
> +		pr_notice("Sorting __ex_table...\n");
>  		sort_extable(__start___ex_table, __stop___ex_table);
> -	else
> -		pr_notice("__ex_table already sorted, skipping sort\n");
> +	}
>  }
>  

On some architectures we sort at runtime, on others we sort at build time.

Is there any reason for a message at all here?

	-hpa



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

* Re: [PATCH] extable: Flip the sorting message
  2013-04-25 21:54 ` [PATCH] " H. Peter Anvin
@ 2013-04-25 22:05   ` Borislav Petkov
  2013-04-25 22:07     ` H. Peter Anvin
  0 siblings, 1 reply; 7+ messages in thread
From: Borislav Petkov @ 2013-04-25 22:05 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: LKML, X86 ML, Borislav Petkov, David Daney

On Thu, Apr 25, 2013 at 02:54:45PM -0700, H. Peter Anvin wrote:
> On some architectures we sort at runtime, on others we sort at build
> time.
>
> Is there any reason for a message at all here?

The original pr_notice was arguably a debugging aid to verify that the
build-time sorting has actually happened. I flipped it because it wasn't
telling us anything interesting and we know that the sorting works -
we've been staring at that message for a couple of kernel releases
already :-)

One possible reason for having it flipped is to encourage runtime
sorting arches to convert to build time sorting.

But silencing this completely is also ok with me - I don't care all that
much.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH] extable: Flip the sorting message
  2013-04-25 22:05   ` Borislav Petkov
@ 2013-04-25 22:07     ` H. Peter Anvin
  2013-04-25 22:15       ` David Daney
  0 siblings, 1 reply; 7+ messages in thread
From: H. Peter Anvin @ 2013-04-25 22:07 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: LKML, X86 ML, Borislav Petkov, David Daney

On 04/25/2013 03:05 PM, Borislav Petkov wrote:
> 
> One possible reason for having it flipped is to encourage runtime
> sorting arches to convert to build time sorting.
> 

This is actually somewhat valid, plus it is the point in time when
something actually is *happening*.  A message saying "nothing happened"
isn't actually all that interesting...

	-hpa


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

* Re: [PATCH] extable: Flip the sorting message
  2013-04-25 22:07     ` H. Peter Anvin
@ 2013-04-25 22:15       ` David Daney
  2013-04-25 22:17         ` H. Peter Anvin
  0 siblings, 1 reply; 7+ messages in thread
From: David Daney @ 2013-04-25 22:15 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Borislav Petkov, LKML, X86 ML, Borislav Petkov, David Daney

On 04/25/2013 03:07 PM, H. Peter Anvin wrote:
> On 04/25/2013 03:05 PM, Borislav Petkov wrote:
>>
>> One possible reason for having it flipped is to encourage runtime
>> sorting arches to convert to build time sorting.
>>
>
> This is actually somewhat valid, plus it is the point in time when
> something actually is *happening*.  A message saying "nothing happened"
> isn't actually all that interesting...
>

Good points.  As the original author of the whole mess, I don't have a 
strong preference.  Certainly printing the message, that nothing is 
happening, goes against one of the main reasons for doing the sort in 
the first place:  Speeding up booting.

David Daney


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

* Re: [PATCH] extable: Flip the sorting message
  2013-04-25 22:15       ` David Daney
@ 2013-04-25 22:17         ` H. Peter Anvin
  0 siblings, 0 replies; 7+ messages in thread
From: H. Peter Anvin @ 2013-04-25 22:17 UTC (permalink / raw)
  To: David Daney; +Cc: Borislav Petkov, LKML, X86 ML, Borislav Petkov, David Daney

On 04/25/2013 03:15 PM, David Daney wrote:
> 
> Good points.  As the original author of the whole mess, I don't have a
> strong preference.  Certainly printing the message, that nothing is
> happening, goes against one of the main reasons for doing the sort in
> the first place:  Speeding up booting.
> 

Yes, not to mention making early trap overrides doable.

	-hpa



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

end of thread, other threads:[~2013-04-25 22:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-15 10:51 [PATCH] extable: Flip the sorting message Borislav Petkov
2013-04-15 11:42 ` [tip:x86/asm] " tip-bot for Borislav Petkov
2013-04-25 21:54 ` [PATCH] " H. Peter Anvin
2013-04-25 22:05   ` Borislav Petkov
2013-04-25 22:07     ` H. Peter Anvin
2013-04-25 22:15       ` David Daney
2013-04-25 22:17         ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox