lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202312100547.4pJ5OE1O-lkp@intel.com>
Date:   Sun, 10 Dec 2023 05:24:10 +0800
From:   kernel test robot <lkp@...el.com>
To:     Vimal Kumar <vimal.kumar32@...il.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        chinmoyghosh2001@...il.com, badolevishal1116@...il.com,
        mintupatel89@...il.com, Vimal Kumar <vimal.kumar32@...il.com>
Subject: Re: [PATCH] PM / sleep: Mechanism to find source aborting kernel
 suspend transition

Hi Vimal,

kernel test robot noticed the following build errors:

[auto build test ERROR on rafael-pm/linux-next]
[also build test ERROR on rafael-pm/acpi-bus linus/master rafael-pm/devprop v6.7-rc4 next-20231208]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Vimal-Kumar/PM-sleep-Mechanism-to-find-source-aborting-kernel-suspend-transition/20231209-161237
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link:    https://lore.kernel.org/r/20231209081056.1497-1-vimal.kumar32%40gmail.com
patch subject: [PATCH] PM / sleep: Mechanism to find source aborting kernel suspend transition
config: arm-lpc32xx_defconfig (https://download.01.org/0day-ci/archive/20231210/202312100547.4pJ5OE1O-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231210/202312100547.4pJ5OE1O-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312100547.4pJ5OE1O-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/base/power/wakeup.c:607:6: warning: no previous prototype for function 'pm_add_abort_suspend_source' [-Wmissing-prototypes]
     607 | void pm_add_abort_suspend_source(const char *source_name)
         |      ^
   drivers/base/power/wakeup.c:607:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     607 | void pm_add_abort_suspend_source(const char *source_name)
         | ^
         | static 
>> drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
     955 |                         list_for_each_entry(info, &pm_abort_suspend_list, list) {
         |                                             ^
>> drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
>> drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
>> drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
>> drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'; did you mean 'int'?
     955 |                         list_for_each_entry(info, &pm_abort_suspend_list, list) {
         |                                             ^~~~
         |                                             int
   include/linux/list.h:780:29: note: expanded from macro 'list_for_each_entry'
     780 |              pos = list_next_entry(pos, member))
         |                                    ^
   include/linux/list.h:645:14: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |                     ^
   include/linux/list.h:601:15: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |                      ^
   include/linux/container_of.h:19:26: note: expanded from macro 'container_of'
      19 |         void *__mptr = (void *)(ptr);                                   \
         |                                 ^
>> drivers/base/power/wakeup.c:955:4: error: reference to overloaded function could not be resolved; did you mean to call it?
     955 |                         list_for_each_entry(info, &pm_abort_suspend_list, list) {
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:780:13: note: expanded from macro 'list_for_each_entry'
     780 |              pos = list_next_entry(pos, member))
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:645:13: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:601:15: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
   include/linux/container_of.h:19:26: note: expanded from macro 'container_of'
      19 |         void *__mptr = (void *)(ptr);                                   \
         |                                 ^~~
>> drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'; did you mean 'int'?
     955 |                         list_for_each_entry(info, &pm_abort_suspend_list, list) {
         |                                             ^~~~
         |                                             int
   include/linux/list.h:780:29: note: expanded from macro 'list_for_each_entry'
     780 |              pos = list_next_entry(pos, member))
         |                                    ^
   include/linux/list.h:645:14: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |                     ^
   include/linux/list.h:601:15: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |                      ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:376:63: note: expanded from macro '__same_type'
     376 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                                                               ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                                  ^
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^
>> drivers/base/power/wakeup.c:955:4: error: reference to overloaded function could not be resolved; did you mean to call it?
     955 |                         list_for_each_entry(info, &pm_abort_suspend_list, list) {
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:780:13: note: expanded from macro 'list_for_each_entry'
     780 |              pos = list_next_entry(pos, member))
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:645:13: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:601:15: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:376:63: note: expanded from macro '__same_type'
     376 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                                                               ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
>> drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'; did you mean 'int'?
     955 |                         list_for_each_entry(info, &pm_abort_suspend_list, list) {
         |                                             ^~~~
         |                                             int
   include/linux/list.h:780:29: note: expanded from macro 'list_for_each_entry'
     780 |              pos = list_next_entry(pos, member))
         |                                    ^
   include/linux/list.h:645:14: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |                     ^
   include/linux/list.h:601:15: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |                      ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:376:63: note: expanded from macro '__same_type'
     376 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                                                               ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                                  ^
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^
>> drivers/base/power/wakeup.c:955:4: error: reference to overloaded function could not be resolved; did you mean to call it?
     955 |                         list_for_each_entry(info, &pm_abort_suspend_list, list) {
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:780:13: note: expanded from macro 'list_for_each_entry'
     780 |              pos = list_next_entry(pos, member))
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:645:13: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:601:15: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:376:63: note: expanded from macro '__same_type'
     376 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                                                               ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
>> drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'; did you mean 'int'?
     955 |                         list_for_each_entry(info, &pm_abort_suspend_list, list) {
         |                                             ^~~~
         |                                             int
   include/linux/list.h:780:29: note: expanded from macro 'list_for_each_entry'
     780 |              pos = list_next_entry(pos, member))
         |                                    ^
   include/linux/list.h:645:42: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |                                                 ^
   include/linux/list.h:601:20: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |                           ^
   include/linux/container_of.h:23:4: note: expanded from macro 'container_of'
      23 |         ((type *)(__mptr - offsetof(type, member))); })
         |           ^
>> drivers/base/power/wakeup.c:955:4: error: reference to overloaded function could not be resolved; did you mean to call it?
     955 |                         list_for_each_entry(info, &pm_abort_suspend_list, list) {
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:780:13: note: expanded from macro 'list_for_each_entry'
     780 |              pos = list_next_entry(pos, member))
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:645:41: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
   include/linux/list.h:601:20: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
   include/linux/container_of.h:23:4: note: expanded from macro 'container_of'
      23 |         ((type *)(__mptr - offsetof(type, member))); })
         |           ^~~~
>> drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'; did you mean 'int'?
     955 |                         list_for_each_entry(info, &pm_abort_suspend_list, list) {
         |                                             ^~~~
         |                                             int
   include/linux/list.h:780:29: note: expanded from macro 'list_for_each_entry'
     780 |              pos = list_next_entry(pos, member))
         |                                    ^
   include/linux/list.h:645:42: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |                                                 ^
   include/linux/list.h:601:20: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |                           ^
   include/linux/container_of.h:23:30: note: expanded from macro 'container_of'
      23 |         ((type *)(__mptr - offsetof(type, member))); })
         |                                     ^
   include/linux/stddef.h:16:51: note: expanded from macro 'offsetof'
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                                    ^
>> drivers/base/power/wakeup.c:955:4: error: reference to overloaded function could not be resolved; did you mean to call it?
     955 |                         list_for_each_entry(info, &pm_abort_suspend_list, list) {
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:780:13: note: expanded from macro 'list_for_each_entry'
     780 |              pos = list_next_entry(pos, member))
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:645:41: note: expanded from macro 'list_next_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
   include/linux/list.h:601:20: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
   include/linux/container_of.h:23:30: note: expanded from macro 'container_of'
      23 |         ((type *)(__mptr - offsetof(type, member))); })
         |                            ~~~~~~~~~^~~~~~~~~~~~~
   include/linux/stddef.h:16:51: note: expanded from macro 'offsetof'
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                                    ^~~~
>> drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
     955 |                         list_for_each_entry(info, &pm_abort_suspend_list, list) {
         |                                             ^
>> drivers/base/power/wakeup.c:956:5: error: call to undeclared function 'log_suspend_abort_reason'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     956 |                                 log_suspend_abort_reason("ws or subsystem %s aborted suspend\n",
         |                                 ^
   drivers/base/power/wakeup.c:957:7: error: use of undeclared identifier 'info'
     957 |                                                 info->source_triggering_abort_suspend);
         |                                                 ^
>> drivers/base/power/wakeup.c:967:11: error: use of undeclared identifier 'MAX_SUSPEND_ABORT_LEN'
     967 |         char buf[MAX_SUSPEND_ABORT_LEN];
         |                  ^
   1 warning and 18 errors generated.


vim +/info +955 drivers/base/power/wakeup.c

   924	
   925	/**
   926	 * pm_wakeup_pending - Check if power transition in progress should be aborted.
   927	 *
   928	 * Compare the current number of registered wakeup events with its preserved
   929	 * value from the past and return true if new wakeup events have been registered
   930	 * since the old value was stored.  Also return true if the current number of
   931	 * wakeup events being processed is different from zero.
   932	 */
   933	bool pm_wakeup_pending(void)
   934	{
   935		unsigned long flags;
   936		bool ret = false;
   937	
   938		raw_spin_lock_irqsave(&events_lock, flags);
   939		if (events_check_enabled) {
   940			unsigned int cnt, inpr;
   941	
   942			split_counters(&cnt, &inpr);
   943			ret = (cnt != saved_count || inpr > 0);
   944			events_check_enabled = !ret;
   945		}
   946		raw_spin_unlock_irqrestore(&events_lock, flags);
   947	
   948		if (ret) {
   949			pm_pr_dbg("Wakeup pending, aborting suspend\n");
   950			pm_print_active_wakeup_sources();
   951		}
   952	
   953		if (atomic_read(&pm_abort_suspend) > 0) {
   954			if (!list_empty(&pm_abort_suspend_list))
 > 955				list_for_each_entry(info, &pm_abort_suspend_list, list) {
 > 956					log_suspend_abort_reason("ws or subsystem %s aborted suspend\n",
   957							info->source_triggering_abort_suspend);
   958				}
   959		}
   960	
   961		return ret || atomic_read(&pm_abort_suspend) > 0;
   962	}
   963	EXPORT_SYMBOL_GPL(pm_wakeup_pending);
   964	
   965	void pm_system_wakeup(void)
   966	{
 > 967		char buf[MAX_SUSPEND_ABORT_LEN];
   968	
   969		if (pm_suspend_target_state != PM_SUSPEND_ON) {
   970			sprintf(buf, "%ps", __builtin_return_address(0));
   971			if (strcmp(buf, "pm_wakeup_ws_event"))
   972				pm_add_abort_suspend_source(buf);
   973		}
   974	
   975		atomic_inc(&pm_abort_suspend);
   976		s2idle_wake();
   977	}
   978	EXPORT_SYMBOL_GPL(pm_system_wakeup);
   979	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ