mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arch/x86: add __noreturn __cold to fortify_panic()
@ 2018-01-01 21:36 Joey Pabalinas
  2018-01-01 21:41 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Joey Pabalinas @ 2018-01-01 21:36 UTC (permalink / raw)
  To: x86; +Cc: hpa, tglx, mingo, linux-kernel, Joey Pabalinas

[-- Attachment #1: Type: text/plain, Size: 794 bytes --]

Definition of `fortify_panic()` doesn't match the declaration
in include/linux/string.h. Add the missing __noreturn __cold
attributes to `fortify_panic()`.

Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
---
 arch/x86/boot/compressed/misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index 98761a1576ceb5c21b..707cf3f339e37f7f8c 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -428,7 +428,7 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap,
 	return output;
 }
 
-void fortify_panic(const char *name)
+void __noreturn __cold fortify_panic(const char *name)
 {
 	error("detected buffer overflow");
 }
-- 
2.15.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] arch/x86: add __noreturn __cold to fortify_panic()
  2018-01-01 21:36 [PATCH] arch/x86: add __noreturn __cold to fortify_panic() Joey Pabalinas
@ 2018-01-01 21:41 ` Joe Perches
  2018-01-01 21:46   ` Joey Pabalinas
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2018-01-01 21:41 UTC (permalink / raw)
  To: Joey Pabalinas, x86; +Cc: hpa, tglx, mingo, linux-kernel

On Mon, 2018-01-01 at 11:36 -1000, Joey Pabalinas wrote:
> Definition of `fortify_panic()` doesn't match the declaration
> in include/linux/string.h. Add the missing __noreturn __cold
> attributes to `fortify_panic()`.

This should not be necessary as the prototype
has those attributes.

Otherwise, all the __printf attributes would
also have to be added to the definitions and
not the just the declarations.

> Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
> ---
>  arch/x86/boot/compressed/misc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
> index 98761a1576ceb5c21b..707cf3f339e37f7f8c 100644
> --- a/arch/x86/boot/compressed/misc.c
> +++ b/arch/x86/boot/compressed/misc.c
> @@ -428,7 +428,7 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap,
>  	return output;
>  }
>  
> -void fortify_panic(const char *name)
> +void __noreturn __cold fortify_panic(const char *name)
>  {
>  	error("detected buffer overflow");
>  }

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

* Re: [PATCH] arch/x86: add __noreturn __cold to fortify_panic()
  2018-01-01 21:41 ` Joe Perches
@ 2018-01-01 21:46   ` Joey Pabalinas
  0 siblings, 0 replies; 3+ messages in thread
From: Joey Pabalinas @ 2018-01-01 21:46 UTC (permalink / raw)
  To: Joe Perches; +Cc: x86, hpa, tglx, mingo, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

On Mon, Jan 01, 2018 at 01:41:55PM -0800, Joe Perches wrote:
> This should not be necessary as the prototype
> has those attributes.
> 
> Otherwise, all the __printf attributes would
> also have to be added to the definitions and
> not the just the declarations.

Ah I see, gotcha.

-- 
Joey Pabalinas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2018-01-01 21:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-01 21:36 [PATCH] arch/x86: add __noreturn __cold to fortify_panic() Joey Pabalinas
2018-01-01 21:41 ` Joe Perches
2018-01-01 21:46   ` Joey Pabalinas

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

Powered by JetHome