Re: [PATCH] tty: n_hdlc: fix build on SPARC

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

 



On Mon, Sep 30, 2019 at 07:15:12PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> 
> Fix tty driver build on SPARC by not using __exitdata.
> It appears that SPARC does not support section .exit.data.
> 
> Fixes these build errors:
> 
> `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
> `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
> `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
> `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
> 
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
> Fixes: 063246641d4a ("format-security: move static strings to const")
> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

Wow. That commit is from 2.5 years ago. Is the SPARC port still alive?

> Cc: Kees Cook <keescook@xxxxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/tty/n_hdlc.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> --- mmotm-2019-0925-1810.orig/drivers/tty/n_hdlc.c
> +++ mmotm-2019-0925-1810/drivers/tty/n_hdlc.c
> @@ -968,6 +968,11 @@ static int __init n_hdlc_init(void)
>  	
>  }	/* end of init_module() */
>  
> +#ifdef CONFIG_SPARC
> +#undef __exitdata
> +#define __exitdata
> +#endif

Shouldn't this be somewhere else? Any other driver wanting to use
__exitdata would need a similar patch. This feels like it should be
handled where __exitdata is normally defined?

-Kees

> +
>  static const char hdlc_unregister_ok[] __exitdata =
>  	KERN_INFO "N_HDLC: line discipline unregistered\n";
>  static const char hdlc_unregister_fail[] __exitdata =
> 
> 

-- 
Kees Cook



[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux