From: Borislav Petkov <[email protected]>
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 <[email protected]>
Cc: David Daney <[email protected]>
---
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
Commit-ID: bec1b9e76353ecf05fac6a87f8e4102dfb618cd2
Gitweb: http://git.kernel.org/tip/bec1b9e76353ecf05fac6a87f8e4102dfb618cd2
Author: Borislav Petkov <[email protected]>
AuthorDate: Mon, 15 Apr 2013 12:51:49 +0200
Committer: Ingo Molnar <[email protected]>
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 <[email protected]>
Cc: David Daney <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
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. */
On 04/15/2013 03:51 AM, Borislav Petkov wrote:
> From: Borislav Petkov <[email protected]>
>
> 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 <[email protected]>
> Cc: David Daney <[email protected]>
> ---
> 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
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.
--
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
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
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