linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption
       [not found] <20210112205542.1375847-1-natechancellor@gmail.com>
@ 2021-01-13  0:18 ` kernel test robot
  2021-01-13  0:39 ` kernel test robot
  1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-01-13  0:18 UTC (permalink / raw)
  To: Nathan Chancellor, Kees Cook, Andrew Morton
  Cc: kbuild-all, Linux Memory Management List, Nick Desaulniers,
	linux-kernel, clang-built-linux, Nathan Chancellor

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

Hi Nathan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on 7c53f6b671f4aba70ff15e1b05148b10d58c2837]

url:    https://github.com/0day-ci/linux/commits/Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714
base:    7c53f6b671f4aba70ff15e1b05148b10d58c2837
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/775adad26a60878926c0ee6cd460a1375bbe51e6
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714
        git checkout 775adad26a60878926c0ee6cd460a1375bbe51e6
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   lib/ubsan.c:192:6: warning: no previous prototype for '__ubsan_handle_add_overflow' [-Wmissing-prototypes]
     192 | void __ubsan_handle_add_overflow(void *data,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/ubsan.c:200:6: warning: no previous prototype for '__ubsan_handle_sub_overflow' [-Wmissing-prototypes]
     200 | void __ubsan_handle_sub_overflow(void *data,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/ubsan.c:207:6: warning: no previous prototype for '__ubsan_handle_mul_overflow' [-Wmissing-prototypes]
     207 | void __ubsan_handle_mul_overflow(void *data,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/ubsan.c:214:6: warning: no previous prototype for '__ubsan_handle_negate_overflow' [-Wmissing-prototypes]
     214 | void __ubsan_handle_negate_overflow(void *_data, void *old_val)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/ubsan.c:234:6: warning: no previous prototype for '__ubsan_handle_divrem_overflow' [-Wmissing-prototypes]
     234 | void __ubsan_handle_divrem_overflow(void *_data, void *lhs, void *rhs)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/ubsan.c:315:6: warning: no previous prototype for '__ubsan_handle_type_mismatch' [-Wmissing-prototypes]
     315 | void __ubsan_handle_type_mismatch(struct type_mismatch_data *data,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/ubsan.c:329:6: warning: no previous prototype for '__ubsan_handle_type_mismatch_v1' [-Wmissing-prototypes]
     329 | void __ubsan_handle_type_mismatch_v1(void *_data, void *ptr)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/ubsan.c:343:6: warning: no previous prototype for '__ubsan_handle_out_of_bounds' [-Wmissing-prototypes]
     343 | void __ubsan_handle_out_of_bounds(void *_data, void *index)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/ubsan.c:360:6: warning: no previous prototype for '__ubsan_handle_shift_out_of_bounds' [-Wmissing-prototypes]
     360 | void __ubsan_handle_shift_out_of_bounds(void *_data, void *lhs, void *rhs)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/ubsan.c:402:6: warning: no previous prototype for '__ubsan_handle_builtin_unreachable' [-Wmissing-prototypes]
     402 | void __ubsan_handle_builtin_unreachable(void *_data)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/ubsan.c:412:6: warning: no previous prototype for '__ubsan_handle_load_invalid_value' [-Wmissing-prototypes]
     412 | void __ubsan_handle_load_invalid_value(void *_data, void *val)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> lib/ubsan.c:431:6: warning: no previous prototype for '__ubsan_handle_alignment_assumption' [-Wmissing-prototypes]
     431 | void __ubsan_handle_alignment_assumption(void *_data, unsigned long ptr,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/__ubsan_handle_alignment_assumption +431 lib/ubsan.c

   359	
 > 360	void __ubsan_handle_shift_out_of_bounds(void *_data, void *lhs, void *rhs)
   361	{
   362		struct shift_out_of_bounds_data *data = _data;
   363		struct type_descriptor *rhs_type = data->rhs_type;
   364		struct type_descriptor *lhs_type = data->lhs_type;
   365		char rhs_str[VALUE_LENGTH];
   366		char lhs_str[VALUE_LENGTH];
   367		unsigned long ua_flags = user_access_save();
   368	
   369		if (suppress_report(&data->location))
   370			goto out;
   371	
   372		ubsan_prologue(&data->location, "shift-out-of-bounds");
   373	
   374		val_to_string(rhs_str, sizeof(rhs_str), rhs_type, rhs);
   375		val_to_string(lhs_str, sizeof(lhs_str), lhs_type, lhs);
   376	
   377		if (val_is_negative(rhs_type, rhs))
   378			pr_err("shift exponent %s is negative\n", rhs_str);
   379	
   380		else if (get_unsigned_val(rhs_type, rhs) >=
   381			type_bit_width(lhs_type))
   382			pr_err("shift exponent %s is too large for %u-bit type %s\n",
   383				rhs_str,
   384				type_bit_width(lhs_type),
   385				lhs_type->type_name);
   386		else if (val_is_negative(lhs_type, lhs))
   387			pr_err("left shift of negative value %s\n",
   388				lhs_str);
   389		else
   390			pr_err("left shift of %s by %s places cannot be"
   391				" represented in type %s\n",
   392				lhs_str, rhs_str,
   393				lhs_type->type_name);
   394	
   395		ubsan_epilogue();
   396	out:
   397		user_access_restore(ua_flags);
   398	}
   399	EXPORT_SYMBOL(__ubsan_handle_shift_out_of_bounds);
   400	
   401	
   402	void __ubsan_handle_builtin_unreachable(void *_data)
   403	{
   404		struct unreachable_data *data = _data;
   405		ubsan_prologue(&data->location, "unreachable");
   406		pr_err("calling __builtin_unreachable()\n");
   407		ubsan_epilogue();
   408		panic("can't return from __builtin_unreachable()");
   409	}
   410	EXPORT_SYMBOL(__ubsan_handle_builtin_unreachable);
   411	
   412	void __ubsan_handle_load_invalid_value(void *_data, void *val)
   413	{
   414		struct invalid_value_data *data = _data;
   415		char val_str[VALUE_LENGTH];
   416	
   417		if (suppress_report(&data->location))
   418			return;
   419	
   420		ubsan_prologue(&data->location, "invalid-load");
   421	
   422		val_to_string(val_str, sizeof(val_str), data->type, val);
   423	
   424		pr_err("load of value %s is not a valid value for type %s\n",
   425			val_str, data->type->type_name);
   426	
   427		ubsan_epilogue();
   428	}
   429	EXPORT_SYMBOL(__ubsan_handle_load_invalid_value);
   430	
 > 431	void __ubsan_handle_alignment_assumption(void *_data, unsigned long ptr,

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59573 bytes --]

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

* Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption
       [not found] <20210112205542.1375847-1-natechancellor@gmail.com>
  2021-01-13  0:18 ` [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption kernel test robot
@ 2021-01-13  0:39 ` kernel test robot
  2021-01-13  1:31   ` Nathan Chancellor
  1 sibling, 1 reply; 5+ messages in thread
From: kernel test robot @ 2021-01-13  0:39 UTC (permalink / raw)
  To: Nathan Chancellor, Kees Cook, Andrew Morton
  Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
	Nick Desaulniers, linux-kernel, Nathan Chancellor

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

Hi Nathan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on 7c53f6b671f4aba70ff15e1b05148b10d58c2837]

url:    https://github.com/0day-ci/linux/commits/Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714
base:    7c53f6b671f4aba70ff15e1b05148b10d58c2837
config: arm64-randconfig-r031-20210112 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 32bcfcda4e28375e5a85268d2acfabcfcc011abf)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/775adad26a60878926c0ee6cd460a1375bbe51e6
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714
        git checkout 775adad26a60878926c0ee6cd460a1375bbe51e6
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   lib/ubsan.c:192:6: warning: no previous prototype for function '__ubsan_handle_add_overflow' [-Wmissing-prototypes]
   void __ubsan_handle_add_overflow(void *data,
        ^
   lib/ubsan.c:192:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __ubsan_handle_add_overflow(void *data,
   ^
   static 
   lib/ubsan.c:200:6: warning: no previous prototype for function '__ubsan_handle_sub_overflow' [-Wmissing-prototypes]
   void __ubsan_handle_sub_overflow(void *data,
        ^
   lib/ubsan.c:200:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __ubsan_handle_sub_overflow(void *data,
   ^
   static 
   lib/ubsan.c:207:6: warning: no previous prototype for function '__ubsan_handle_mul_overflow' [-Wmissing-prototypes]
   void __ubsan_handle_mul_overflow(void *data,
        ^
   lib/ubsan.c:207:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __ubsan_handle_mul_overflow(void *data,
   ^
   static 
   lib/ubsan.c:214:6: warning: no previous prototype for function '__ubsan_handle_negate_overflow' [-Wmissing-prototypes]
   void __ubsan_handle_negate_overflow(void *_data, void *old_val)
        ^
   lib/ubsan.c:214:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __ubsan_handle_negate_overflow(void *_data, void *old_val)
   ^
   static 
   lib/ubsan.c:234:6: warning: no previous prototype for function '__ubsan_handle_divrem_overflow' [-Wmissing-prototypes]
   void __ubsan_handle_divrem_overflow(void *_data, void *lhs, void *rhs)
        ^
   lib/ubsan.c:234:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __ubsan_handle_divrem_overflow(void *_data, void *lhs, void *rhs)
   ^
   static 
   lib/ubsan.c:315:6: warning: no previous prototype for function '__ubsan_handle_type_mismatch' [-Wmissing-prototypes]
   void __ubsan_handle_type_mismatch(struct type_mismatch_data *data,
        ^
   lib/ubsan.c:315:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __ubsan_handle_type_mismatch(struct type_mismatch_data *data,
   ^
   static 
   lib/ubsan.c:329:6: warning: no previous prototype for function '__ubsan_handle_type_mismatch_v1' [-Wmissing-prototypes]
   void __ubsan_handle_type_mismatch_v1(void *_data, void *ptr)
        ^
   lib/ubsan.c:329:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __ubsan_handle_type_mismatch_v1(void *_data, void *ptr)
   ^
   static 
   lib/ubsan.c:343:6: warning: no previous prototype for function '__ubsan_handle_out_of_bounds' [-Wmissing-prototypes]
   void __ubsan_handle_out_of_bounds(void *_data, void *index)
        ^
   lib/ubsan.c:343:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __ubsan_handle_out_of_bounds(void *_data, void *index)
   ^
   static 
   lib/ubsan.c:360:6: warning: no previous prototype for function '__ubsan_handle_shift_out_of_bounds' [-Wmissing-prototypes]
   void __ubsan_handle_shift_out_of_bounds(void *_data, void *lhs, void *rhs)
        ^
   lib/ubsan.c:360:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __ubsan_handle_shift_out_of_bounds(void *_data, void *lhs, void *rhs)
   ^
   static 
   lib/ubsan.c:402:6: warning: no previous prototype for function '__ubsan_handle_builtin_unreachable' [-Wmissing-prototypes]
   void __ubsan_handle_builtin_unreachable(void *_data)
        ^
   lib/ubsan.c:402:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __ubsan_handle_builtin_unreachable(void *_data)
   ^
   static 
   lib/ubsan.c:412:6: warning: no previous prototype for function '__ubsan_handle_load_invalid_value' [-Wmissing-prototypes]
   void __ubsan_handle_load_invalid_value(void *_data, void *val)
        ^
   lib/ubsan.c:412:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __ubsan_handle_load_invalid_value(void *_data, void *val)
   ^
   static 
>> lib/ubsan.c:431:6: warning: no previous prototype for function '__ubsan_handle_alignment_assumption' [-Wmissing-prototypes]
   void __ubsan_handle_alignment_assumption(void *_data, unsigned long ptr,
        ^
   lib/ubsan.c:431:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __ubsan_handle_alignment_assumption(void *_data, unsigned long ptr,
   ^
   static 
   12 warnings generated.


vim +/__ubsan_handle_alignment_assumption +431 lib/ubsan.c

   411	
 > 412	void __ubsan_handle_load_invalid_value(void *_data, void *val)
   413	{
   414		struct invalid_value_data *data = _data;
   415		char val_str[VALUE_LENGTH];
   416	
   417		if (suppress_report(&data->location))
   418			return;
   419	
   420		ubsan_prologue(&data->location, "invalid-load");
   421	
   422		val_to_string(val_str, sizeof(val_str), data->type, val);
   423	
   424		pr_err("load of value %s is not a valid value for type %s\n",
   425			val_str, data->type->type_name);
   426	
   427		ubsan_epilogue();
   428	}
   429	EXPORT_SYMBOL(__ubsan_handle_load_invalid_value);
   430	
 > 431	void __ubsan_handle_alignment_assumption(void *_data, unsigned long ptr,

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31723 bytes --]

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

* Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption
  2021-01-13  0:39 ` kernel test robot
@ 2021-01-13  1:31   ` Nathan Chancellor
  2021-01-13  1:39     ` Nick Desaulniers
  0 siblings, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2021-01-13  1:31 UTC (permalink / raw)
  To: kernel test robot
  Cc: Kees Cook, Andrew Morton, kbuild-all, clang-built-linux,
	Linux Memory Management List, Nick Desaulniers, linux-kernel

On Wed, Jan 13, 2021 at 08:39:52AM +0800, kernel test robot wrote:
> Hi Nathan,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on 7c53f6b671f4aba70ff15e1b05148b10d58c2837]
> 
> url:    https://github.com/0day-ci/linux/commits/Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714
> base:    7c53f6b671f4aba70ff15e1b05148b10d58c2837
> config: arm64-randconfig-r031-20210112 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 32bcfcda4e28375e5a85268d2acfabcfcc011abf)
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # install arm64 cross compiling tool for clang build
>         # apt-get install binutils-aarch64-linux-gnu
>         # https://github.com/0day-ci/linux/commit/775adad26a60878926c0ee6cd460a1375bbe51e6
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714
>         git checkout 775adad26a60878926c0ee6cd460a1375bbe51e6
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    lib/ubsan.c:192:6: warning: no previous prototype for function '__ubsan_handle_add_overflow' [-Wmissing-prototypes]
>    void __ubsan_handle_add_overflow(void *data,
>         ^
>    lib/ubsan.c:192:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>    void __ubsan_handle_add_overflow(void *data,
>    ^
>    static 
>    lib/ubsan.c:200:6: warning: no previous prototype for function '__ubsan_handle_sub_overflow' [-Wmissing-prototypes]
>    void __ubsan_handle_sub_overflow(void *data,
>         ^
>    lib/ubsan.c:200:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>    void __ubsan_handle_sub_overflow(void *data,
>    ^

Given that these are compiler inserted functions, there is not much of a
point to having prototypes to them. If people feel shutting these
warnings up is worthwhile, we can just add the prototypes right above
the function definition in a follow up patch.

Cheers,
Nathan


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

* Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption
  2021-01-13  1:31   ` Nathan Chancellor
@ 2021-01-13  1:39     ` Nick Desaulniers
  2021-01-27 22:26       ` Nick Desaulniers
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Desaulniers @ 2021-01-13  1:39 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: kernel test robot, Kees Cook, Andrew Morton, kbuild-all,
	clang-built-linux, Linux Memory Management List, LKML

On Tue, Jan 12, 2021 at 5:31 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> On Wed, Jan 13, 2021 at 08:39:52AM +0800, kernel test robot wrote:
> > Hi Nathan,
> >
> > I love your patch! Perhaps something to improve:
> >
> > [auto build test WARNING on 7c53f6b671f4aba70ff15e1b05148b10d58c2837]
> >
> > url:    https://github.com/0day-ci/linux/commits/Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714
> > base:    7c53f6b671f4aba70ff15e1b05148b10d58c2837
> > config: arm64-randconfig-r031-20210112 (attached as .config)
> > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 32bcfcda4e28375e5a85268d2acfabcfcc011abf)
> > reproduce (this is a W=1 build):
> >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         # install arm64 cross compiling tool for clang build
> >         # apt-get install binutils-aarch64-linux-gnu
> >         # https://github.com/0day-ci/linux/commit/775adad26a60878926c0ee6cd460a1375bbe51e6
> >         git remote add linux-review https://github.com/0day-ci/linux
> >         git fetch --no-tags linux-review Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714
> >         git checkout 775adad26a60878926c0ee6cd460a1375bbe51e6
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All warnings (new ones prefixed by >>):
> >
> >    lib/ubsan.c:192:6: warning: no previous prototype for function '__ubsan_handle_add_overflow' [-Wmissing-prototypes]
> >    void __ubsan_handle_add_overflow(void *data,
> >         ^
> >    lib/ubsan.c:192:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> >    void __ubsan_handle_add_overflow(void *data,
> >    ^
> >    static
> >    lib/ubsan.c:200:6: warning: no previous prototype for function '__ubsan_handle_sub_overflow' [-Wmissing-prototypes]
> >    void __ubsan_handle_sub_overflow(void *data,
> >         ^
> >    lib/ubsan.c:200:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> >    void __ubsan_handle_sub_overflow(void *data,
> >    ^
>
> Given that these are compiler inserted functions, there is not much of a
> point to having prototypes to them. If people feel shutting these
> warnings up is worthwhile, we can just add the prototypes right above
> the function definition in a follow up patch.

Same as stpcpy; it would be nice though. ;)
-- 
Thanks,
~Nick Desaulniers


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

* Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption
  2021-01-13  1:39     ` Nick Desaulniers
@ 2021-01-27 22:26       ` Nick Desaulniers
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Desaulniers @ 2021-01-27 22:26 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: kernel test robot, Kees Cook, Andrew Morton, kbuild-all,
	clang-built-linux, Linux Memory Management List, LKML

On Tue, Jan 12, 2021 at 5:39 PM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> On Tue, Jan 12, 2021 at 5:31 PM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> >
> > On Wed, Jan 13, 2021 at 08:39:52AM +0800, kernel test robot wrote:
> > > Hi Nathan,
> > >
> > > I love your patch! Perhaps something to improve:
> > >
> > > [auto build test WARNING on 7c53f6b671f4aba70ff15e1b05148b10d58c2837]
> > >
> > > url:    https://github.com/0day-ci/linux/commits/Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714
> > > base:    7c53f6b671f4aba70ff15e1b05148b10d58c2837
> > > config: arm64-randconfig-r031-20210112 (attached as .config)
> > > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 32bcfcda4e28375e5a85268d2acfabcfcc011abf)
> > > reproduce (this is a W=1 build):
> > >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > >         chmod +x ~/bin/make.cross
> > >         # install arm64 cross compiling tool for clang build
> > >         # apt-get install binutils-aarch64-linux-gnu
> > >         # https://github.com/0day-ci/linux/commit/775adad26a60878926c0ee6cd460a1375bbe51e6
> > >         git remote add linux-review https://github.com/0day-ci/linux
> > >         git fetch --no-tags linux-review Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714
> > >         git checkout 775adad26a60878926c0ee6cd460a1375bbe51e6
> > >         # save the attached .config to linux build tree
> > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
> > >
> > > If you fix the issue, kindly add following tag as appropriate
> > > Reported-by: kernel test robot <lkp@intel.com>
> > >
> > > All warnings (new ones prefixed by >>):
> > >
> > >    lib/ubsan.c:192:6: warning: no previous prototype for function '__ubsan_handle_add_overflow' [-Wmissing-prototypes]
> > >    void __ubsan_handle_add_overflow(void *data,
> > >         ^
> > >    lib/ubsan.c:192:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> > >    void __ubsan_handle_add_overflow(void *data,
> > >    ^
> > >    static
> > >    lib/ubsan.c:200:6: warning: no previous prototype for function '__ubsan_handle_sub_overflow' [-Wmissing-prototypes]
> > >    void __ubsan_handle_sub_overflow(void *data,
> > >         ^
> > >    lib/ubsan.c:200:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> > >    void __ubsan_handle_sub_overflow(void *data,
> > >    ^
> >
> > Given that these are compiler inserted functions, there is not much of a
> > point to having prototypes to them. If people feel shutting these
> > warnings up is worthwhile, we can just add the prototypes right above
> > the function definition in a follow up patch.
>
> Same as stpcpy; it would be nice though. ;)

If you would be so kind, I'd be happy to sign off on such a v3.

> --
> Thanks,
> ~Nick Desaulniers



-- 
Thanks,
~Nick Desaulniers


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

end of thread, other threads:[~2021-01-27 22:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210112205542.1375847-1-natechancellor@gmail.com>
2021-01-13  0:18 ` [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption kernel test robot
2021-01-13  0:39 ` kernel test robot
2021-01-13  1:31   ` Nathan Chancellor
2021-01-13  1:39     ` Nick Desaulniers
2021-01-27 22:26       ` Nick Desaulniers

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