Re: linux-next: Tree for Oct 28 (objtool)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/28/19 9:02 AM, Josh Poimboeuf wrote:
> On Mon, Oct 28, 2019 at 08:31:28AM -0700, Randy Dunlap wrote:
>> On 10/28/19 1:51 AM, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Changes since 20191025:
>>>
>>
>>
>> on x86_64:
>>
>> kernel/exit.o: warning: objtool: __x64_sys_exit_group()+0x14: unreachable instruction
>>
>> .o file is attached.
> 
> Silly GCC.  Does this fix it?

Yes, thanks.

Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> # build-tested

> diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h
> index 4b1c3b664f51..d58587391b96 100644
> --- a/include/linux/sched/task.h
> +++ b/include/linux/sched/task.h
> @@ -83,7 +83,7 @@ static inline void exit_thread(struct task_struct *tsk)
>  {
>  }
>  #endif
> -extern void do_group_exit(int);
> +extern void __noreturn do_group_exit(int);
>  
>  extern void exit_files(struct task_struct *);
>  extern void exit_itimers(struct signal_struct *);
> diff --git a/kernel/exit.c b/kernel/exit.c
> index f2d20ab74422..bdc4122d904d 100644
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -894,7 +894,7 @@ SYSCALL_DEFINE1(exit, int, error_code)
>   * Take down every thread in the group.  This is called by fatal signals
>   * as well as by sys_exit_group (below).
>   */
> -void
> +void __noreturn
>  do_group_exit(int exit_code)
>  {
>  	struct signal_struct *sig = current->signal;
> @@ -931,7 +931,6 @@ SYSCALL_DEFINE1(exit_group, int, error_code)
>  {
>  	do_group_exit((error_code & 0xff) << 8);
>  	/* NOTREACHED */
> -	return 0;
>  }
>  
>  struct waitid_info {
> diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> index 543c068096b1..97919469c787 100644
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -135,6 +135,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
>  		"__stack_chk_fail",
>  		"panic",
>  		"do_exit",
> +		"do_group_exit",
>  		"do_task_dead",
>  		"__module_put_and_exit",
>  		"complete_and_exit",
> 


-- 
~Randy



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux