oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 8173/8441] include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target
@ 2023-08-09 10:27 kernel test robot
  2023-08-09 11:15 ` Marco Elver
  0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2023-08-09 10:27 UTC (permalink / raw)
  To: Marco Elver
  Cc: llvm, oe-kbuild-all, Linux Memory Management List, Andrew Morton

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   21ef7b1e17d039053edaeaf41142423810572741
commit: fee8feb67f0b2954eb7a2a259122e43a15cf3a52 [8173/8441] list_debug: introduce CONFIG_DEBUG_LIST_MINIMAL
config: hexagon-randconfig-r041-20230808 (https://download.01.org/0day-ci/archive/20230809/202308091820.0dPY7D6f-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20230809/202308091820.0dPY7D6f-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308091820.0dPY7D6f-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from arch/hexagon/kernel/asm-offsets.c:12:
   In file included from include/linux/compat.h:14:
   In file included from include/linux/sem.h:5:
   In file included from include/uapi/linux/sem.h:5:
   In file included from include/linux/ipc.h:5:
   In file included from include/linux/spinlock.h:56:
   In file included from include/linux/preempt.h:12:
>> include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
               ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   In file included from arch/hexagon/kernel/asm-offsets.c:12:
   In file included from include/linux/compat.h:14:
   In file included from include/linux/sem.h:5:
   In file included from include/uapi/linux/sem.h:5:
   In file included from include/linux/ipc.h:5:
   In file included from include/linux/spinlock.h:56:
   In file included from include/linux/preempt.h:12:
   include/linux/list.h:96:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   extern bool __list_valid_slowpath __list_del_entry_valid_or_report(struct list_head *entry);
               ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   In file included from arch/hexagon/kernel/asm-offsets.c:15:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from arch/hexagon/kernel/asm-offsets.c:15:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from arch/hexagon/kernel/asm-offsets.c:15:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   8 warnings generated.
--
   In file included from lib/idr.c:5:
   In file included from include/linux/idr.h:15:
   In file included from include/linux/radix-tree.h:13:
>> include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
               ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   In file included from lib/idr.c:5:
   In file included from include/linux/idr.h:15:
   In file included from include/linux/radix-tree.h:13:
   include/linux/list.h:96:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   extern bool __list_valid_slowpath __list_del_entry_valid_or_report(struct list_head *entry);
               ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   2 warnings generated.
--
   In file included from lib/maple_tree.c:54:
   In file included from include/linux/maple_tree.h:12:
   In file included from include/linux/rcupdate.h:27:
   In file included from include/linux/preempt.h:12:
>> include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
               ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   In file included from lib/maple_tree.c:54:
   In file included from include/linux/maple_tree.h:12:
   In file included from include/linux/rcupdate.h:27:
   In file included from include/linux/preempt.h:12:
   include/linux/list.h:96:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   extern bool __list_valid_slowpath __list_del_entry_valid_or_report(struct list_head *entry);
               ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   In file included from lib/maple_tree.c:63:
   In file included from include/trace/events/maple_tree.h:123:
   In file included from include/trace/define_trace.h:102:
   In file included from include/trace/trace_events.h:21:
   In file included from include/linux/trace_events.h:9:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from lib/maple_tree.c:63:
   In file included from include/trace/events/maple_tree.h:123:
   In file included from include/trace/define_trace.h:102:
   In file included from include/trace/trace_events.h:21:
   In file included from include/linux/trace_events.h:9:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from lib/maple_tree.c:63:
   In file included from include/trace/events/maple_tree.h:123:
   In file included from include/trace/define_trace.h:102:
   In file included from include/trace/trace_events.h:21:
   In file included from include/linux/trace_events.h:9:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   lib/maple_tree.c:331:21: warning: unused function 'mte_set_full' [-Wunused-function]
   static inline void *mte_set_full(const struct maple_enode *node)
                       ^
   lib/maple_tree.c:336:21: warning: unused function 'mte_clear_full' [-Wunused-function]
   static inline void *mte_clear_full(const struct maple_enode *node)
                       ^
   lib/maple_tree.c:341:20: warning: unused function 'mte_has_null' [-Wunused-function]
   static inline bool mte_has_null(const struct maple_enode *node)
                      ^
   lib/maple_tree.c:672:29: warning: unused function 'mas_pivot' [-Wunused-function]
   static inline unsigned long mas_pivot(struct ma_state *mas, unsigned char piv)
                               ^
   12 warnings generated.
--
   In file included from lib/radix-tree.c:15:
   In file included from include/linux/cpu.h:17:
   In file included from include/linux/node.h:18:
   In file included from include/linux/device.h:15:
   In file included from include/linux/dev_printk.h:16:
   In file included from include/linux/ratelimit.h:6:
   In file included from include/linux/sched.h:14:
   In file included from include/linux/pid.h:5:
   In file included from include/linux/rculist.h:10:
>> include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
               ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   In file included from lib/radix-tree.c:15:
   In file included from include/linux/cpu.h:17:
   In file included from include/linux/node.h:18:
   In file included from include/linux/device.h:15:
   In file included from include/linux/dev_printk.h:16:
   In file included from include/linux/ratelimit.h:6:
   In file included from include/linux/sched.h:14:
   In file included from include/linux/pid.h:5:
   In file included from include/linux/rculist.h:10:
   include/linux/list.h:96:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   extern bool __list_valid_slowpath __list_del_entry_valid_or_report(struct list_head *entry);
               ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   lib/radix-tree.c:1136:50: warning: parameter 'slot' set but not used [-Wunused-but-set-parameter]
   void __rcu **radix_tree_iter_resume(void __rcu **slot,
                                                    ^
   3 warnings generated.
--
   In file included from lib/test_ida.c:9:
   In file included from include/linux/idr.h:15:
   In file included from include/linux/radix-tree.h:13:
>> include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
               ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   In file included from lib/test_ida.c:9:
   In file included from include/linux/idr.h:15:
   In file included from include/linux/radix-tree.h:13:
   include/linux/list.h:96:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   extern bool __list_valid_slowpath __list_del_entry_valid_or_report(struct list_head *entry);
               ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   lib/test_ida.c:16:6: warning: no previous prototype for function 'ida_dump' [-Wmissing-prototypes]
   void ida_dump(struct ida *ida) { }
        ^
   lib/test_ida.c:16:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void ida_dump(struct ida *ida) { }
   ^
   static 
   3 warnings generated.
--
   In file included from lib/list_debug.c:9:
>> include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
               ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   In file included from lib/list_debug.c:9:
   include/linux/list.h:96:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   extern bool __list_valid_slowpath __list_del_entry_valid_or_report(struct list_head *entry);
               ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
>> lib/list_debug.c:20:1: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   __list_valid_slowpath
   ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   lib/list_debug.c:43:1: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
   __list_valid_slowpath
   ^
   include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
   # define __list_valid_slowpath __cold __preserve_most
                                         ^
   include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
   # define __preserve_most notrace __attribute__((__preserve_most__))
                                                   ^
   4 warnings generated.
..


vim +/__preserve_most__ +53 include/linux/list.h

    48	
    49	/*
    50	 * Performs the full set of list corruption checks before __list_add().
    51	 * On list corruption reports a warning, and returns false.
    52	 */
  > 53	extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
    54								     struct list_head *prev,
    55								     struct list_head *next);
    56	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [linux-next:master 8173/8441] include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target
  2023-08-09 10:27 [linux-next:master 8173/8441] include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target kernel test robot
@ 2023-08-09 11:15 ` Marco Elver
  2023-08-09 15:53   ` Nick Desaulniers
  0 siblings, 1 reply; 7+ messages in thread
From: Marco Elver @ 2023-08-09 11:15 UTC (permalink / raw)
  To: kernel test robot
  Cc: llvm, oe-kbuild-all, Linux Memory Management List, Andrew Morton,
	Miguel Ojeda

On Wed, Aug 09, 2023 at 06:27PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   21ef7b1e17d039053edaeaf41142423810572741
> commit: fee8feb67f0b2954eb7a2a259122e43a15cf3a52 [8173/8441] list_debug: introduce CONFIG_DEBUG_LIST_MINIMAL
> config: hexagon-randconfig-r041-20230808 (https://download.01.org/0day-ci/archive/20230809/202308091820.0dPY7D6f-lkp@intel.com/config)
> compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
> reproduce: (https://download.01.org/0day-ci/archive/20230809/202308091820.0dPY7D6f-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202308091820.0dPY7D6f-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from arch/hexagon/kernel/asm-offsets.c:12:
>    In file included from include/linux/compat.h:14:
>    In file included from include/linux/sem.h:5:
>    In file included from include/uapi/linux/sem.h:5:
>    In file included from include/linux/ipc.h:5:
>    In file included from include/linux/spinlock.h:56:
>    In file included from include/linux/preempt.h:12:
> >> include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
>    extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
>                ^
>    include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
>    # define __list_valid_slowpath __cold __preserve_most
>                                          ^
>    include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
>    # define __preserve_most notrace __attribute__((__preserve_most__))

To silence this warning, we can just guard it based on known-supported architectures:

diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index c88488715a39..c523c6683789 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -128,7 +128,7 @@ static inline void __chk_io_ptr(const volatile void __iomem *ptr) { }
  *
  * clang: https://clang.llvm.org/docs/AttributeReference.html#preserve-most
  */
-#if __has_attribute(__preserve_most__)
+#if __has_attribute(__preserve_most__) && (defined(CONFIG_X86_64) || defined(CONFIG_ARM64))
 # define __preserve_most notrace __attribute__((__preserve_most__))
 #else
 # define __preserve_most

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

* Re: [linux-next:master 8173/8441] include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target
  2023-08-09 11:15 ` Marco Elver
@ 2023-08-09 15:53   ` Nick Desaulniers
  2023-08-09 16:00     ` Marco Elver
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Desaulniers @ 2023-08-09 15:53 UTC (permalink / raw)
  To: Marco Elver
  Cc: kernel test robot, llvm, oe-kbuild-all,
	Linux Memory Management List, Andrew Morton, Miguel Ojeda

On Wed, Aug 9, 2023 at 4:15 AM Marco Elver <elver@google.com> wrote:
>
> On Wed, Aug 09, 2023 at 06:27PM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   21ef7b1e17d039053edaeaf41142423810572741
> > commit: fee8feb67f0b2954eb7a2a259122e43a15cf3a52 [8173/8441] list_debug: introduce CONFIG_DEBUG_LIST_MINIMAL
> > config: hexagon-randconfig-r041-20230808 (https://download.01.org/0day-ci/archive/20230809/202308091820.0dPY7D6f-lkp@intel.com/config)
> > compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
> > reproduce: (https://download.01.org/0day-ci/archive/20230809/202308091820.0dPY7D6f-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202308091820.0dPY7D6f-lkp@intel.com/
> >
> > All warnings (new ones prefixed by >>):
> >
> >    In file included from arch/hexagon/kernel/asm-offsets.c:12:
> >    In file included from include/linux/compat.h:14:
> >    In file included from include/linux/sem.h:5:
> >    In file included from include/uapi/linux/sem.h:5:
> >    In file included from include/linux/ipc.h:5:
> >    In file included from include/linux/spinlock.h:56:
> >    In file included from include/linux/preempt.h:12:
> > >> include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
> >    extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
> >                ^
> >    include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
> >    # define __list_valid_slowpath __cold __preserve_most
> >                                          ^
> >    include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
> >    # define __preserve_most notrace __attribute__((__preserve_most__))
>
> To silence this warning, we can just guard it based on known-supported architectures:

As a band-aid, sure.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Long term, perhaps we can fix in clang what __has_attribute evaluates
to for this attribute depending on the target.  Filed:
https://github.com/ClangBuiltLinux/linux/issues/1908
^ Consider adding a comment linking to that in the sources.

>
> diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
> index c88488715a39..c523c6683789 100644
> --- a/include/linux/compiler_types.h
> +++ b/include/linux/compiler_types.h
> @@ -128,7 +128,7 @@ static inline void __chk_io_ptr(const volatile void __iomem *ptr) { }
>   *
>   * clang: https://clang.llvm.org/docs/AttributeReference.html#preserve-most
>   */
> -#if __has_attribute(__preserve_most__)
> +#if __has_attribute(__preserve_most__) && (defined(CONFIG_X86_64) || defined(CONFIG_ARM64))
>  # define __preserve_most notrace __attribute__((__preserve_most__))
>  #else
>  # define __preserve_most
>


-- 
Thanks,
~Nick Desaulniers

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

* Re: [linux-next:master 8173/8441] include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target
  2023-08-09 15:53   ` Nick Desaulniers
@ 2023-08-09 16:00     ` Marco Elver
  2023-08-09 16:02       ` Nick Desaulniers
  2023-08-10 17:02       ` Andrew Morton
  0 siblings, 2 replies; 7+ messages in thread
From: Marco Elver @ 2023-08-09 16:00 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: kernel test robot, llvm, oe-kbuild-all,
	Linux Memory Management List, Andrew Morton, Miguel Ojeda

On Wed, 9 Aug 2023 at 17:53, Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> On Wed, Aug 9, 2023 at 4:15 AM Marco Elver <elver@google.com> wrote:
> >
> > On Wed, Aug 09, 2023 at 06:27PM +0800, kernel test robot wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > head:   21ef7b1e17d039053edaeaf41142423810572741
> > > commit: fee8feb67f0b2954eb7a2a259122e43a15cf3a52 [8173/8441] list_debug: introduce CONFIG_DEBUG_LIST_MINIMAL
> > > config: hexagon-randconfig-r041-20230808 (https://download.01.org/0day-ci/archive/20230809/202308091820.0dPY7D6f-lkp@intel.com/config)
> > > compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
> > > reproduce: (https://download.01.org/0day-ci/archive/20230809/202308091820.0dPY7D6f-lkp@intel.com/reproduce)
> > >
> > > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > > the same patch/commit), kindly add following tags
> > > | Reported-by: kernel test robot <lkp@intel.com>
> > > | Closes: https://lore.kernel.org/oe-kbuild-all/202308091820.0dPY7D6f-lkp@intel.com/
> > >
> > > All warnings (new ones prefixed by >>):
> > >
> > >    In file included from arch/hexagon/kernel/asm-offsets.c:12:
> > >    In file included from include/linux/compat.h:14:
> > >    In file included from include/linux/sem.h:5:
> > >    In file included from include/uapi/linux/sem.h:5:
> > >    In file included from include/linux/ipc.h:5:
> > >    In file included from include/linux/spinlock.h:56:
> > >    In file included from include/linux/preempt.h:12:
> > > >> include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
> > >    extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
> > >                ^
> > >    include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
> > >    # define __list_valid_slowpath __cold __preserve_most
> > >                                          ^
> > >    include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
> > >    # define __preserve_most notrace __attribute__((__preserve_most__))
> >
> > To silence this warning, we can just guard it based on known-supported architectures:
>
> As a band-aid, sure.
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> Long term, perhaps we can fix in clang what __has_attribute evaluates
> to for this attribute depending on the target.  Filed:
> https://github.com/ClangBuiltLinux/linux/issues/1908
> ^ Consider adding a comment linking to that in the sources.

I will fold it into patch 1/3 of the original series. May I apply your
Reviewed-by there?
I think there needs to be a v4, also because of some other change requests, too.

Andrew, please shout if you'd rather have them as fix patches.

Thanks!

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

* Re: [linux-next:master 8173/8441] include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target
  2023-08-09 16:00     ` Marco Elver
@ 2023-08-09 16:02       ` Nick Desaulniers
  2023-08-10 17:02       ` Andrew Morton
  1 sibling, 0 replies; 7+ messages in thread
From: Nick Desaulniers @ 2023-08-09 16:02 UTC (permalink / raw)
  To: Marco Elver
  Cc: kernel test robot, llvm, oe-kbuild-all,
	Linux Memory Management List, Andrew Morton, Miguel Ojeda

On Wed, Aug 9, 2023 at 9:01 AM Marco Elver <elver@google.com> wrote:
>
> On Wed, 9 Aug 2023 at 17:53, Nick Desaulniers <ndesaulniers@google.com> wrote:
> >
> > On Wed, Aug 9, 2023 at 4:15 AM Marco Elver <elver@google.com> wrote:
> > >
> > > On Wed, Aug 09, 2023 at 06:27PM +0800, kernel test robot wrote:
> > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > > head:   21ef7b1e17d039053edaeaf41142423810572741
> > > > commit: fee8feb67f0b2954eb7a2a259122e43a15cf3a52 [8173/8441] list_debug: introduce CONFIG_DEBUG_LIST_MINIMAL
> > > > config: hexagon-randconfig-r041-20230808 (https://download.01.org/0day-ci/archive/20230809/202308091820.0dPY7D6f-lkp@intel.com/config)
> > > > compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
> > > > reproduce: (https://download.01.org/0day-ci/archive/20230809/202308091820.0dPY7D6f-lkp@intel.com/reproduce)
> > > >
> > > > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > > > the same patch/commit), kindly add following tags
> > > > | Reported-by: kernel test robot <lkp@intel.com>
> > > > | Closes: https://lore.kernel.org/oe-kbuild-all/202308091820.0dPY7D6f-lkp@intel.com/
> > > >
> > > > All warnings (new ones prefixed by >>):
> > > >
> > > >    In file included from arch/hexagon/kernel/asm-offsets.c:12:
> > > >    In file included from include/linux/compat.h:14:
> > > >    In file included from include/linux/sem.h:5:
> > > >    In file included from include/uapi/linux/sem.h:5:
> > > >    In file included from include/linux/ipc.h:5:
> > > >    In file included from include/linux/spinlock.h:56:
> > > >    In file included from include/linux/preempt.h:12:
> > > > >> include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
> > > >    extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
> > > >                ^
> > > >    include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
> > > >    # define __list_valid_slowpath __cold __preserve_most
> > > >                                          ^
> > > >    include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
> > > >    # define __preserve_most notrace __attribute__((__preserve_most__))
> > >
> > > To silence this warning, we can just guard it based on known-supported architectures:
> >
> > As a band-aid, sure.
> > Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> > Long term, perhaps we can fix in clang what __has_attribute evaluates
> > to for this attribute depending on the target.  Filed:
> > https://github.com/ClangBuiltLinux/linux/issues/1908
> > ^ Consider adding a comment linking to that in the sources.
>
> I will fold it into patch 1/3 of the original series. May I apply your
> Reviewed-by there?

Sure! Thanks for checking.

> I think there needs to be a v4, also because of some other change requests, too.
>
> Andrew, please shout if you'd rather have them as fix patches.
>
> Thanks!



-- 
Thanks,
~Nick Desaulniers

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

* Re: [linux-next:master 8173/8441] include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target
  2023-08-09 16:00     ` Marco Elver
  2023-08-09 16:02       ` Nick Desaulniers
@ 2023-08-10 17:02       ` Andrew Morton
  2023-08-10 18:42         ` Marco Elver
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2023-08-10 17:02 UTC (permalink / raw)
  To: Marco Elver
  Cc: Nick Desaulniers, kernel test robot, llvm, oe-kbuild-all,
	Linux Memory Management List, Miguel Ojeda

On Wed, 9 Aug 2023 18:00:32 +0200 Marco Elver <elver@google.com> wrote:

> Andrew, please shout if you'd rather have them as fix patches.

I grabbed it, thanks.

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

* Re: [linux-next:master 8173/8441] include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target
  2023-08-10 17:02       ` Andrew Morton
@ 2023-08-10 18:42         ` Marco Elver
  0 siblings, 0 replies; 7+ messages in thread
From: Marco Elver @ 2023-08-10 18:42 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Nick Desaulniers, kernel test robot, llvm, oe-kbuild-all,
	Linux Memory Management List, Miguel Ojeda

On Thu, 10 Aug 2023 at 19:02, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 9 Aug 2023 18:00:32 +0200 Marco Elver <elver@google.com> wrote:
>
> > Andrew, please shout if you'd rather have them as fix patches.
>
> I grabbed it, thanks.

Thanks! This should help with more -next testing. But as a heads up,
there will be a v4, which includes this but also because of the
Kconfig renaming that Kees asked for. I intend to send it by EOD
tomorrow.

Thanks,
-- Marco

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

end of thread, other threads:[~2023-08-10 18:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09 10:27 [linux-next:master 8173/8441] include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target kernel test robot
2023-08-09 11:15 ` Marco Elver
2023-08-09 15:53   ` Nick Desaulniers
2023-08-09 16:00     ` Marco Elver
2023-08-09 16:02       ` Nick Desaulniers
2023-08-10 17:02       ` Andrew Morton
2023-08-10 18:42         ` Marco Elver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).