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
| ||
|
Date: Sun, 5 Mar 2023 15:57:08 +0800 From: kernel test robot <lkp@...el.com> To: Manish Bhardwaj <bhardwajmanish18@...il.com> Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev, Manish Bhardwaj <bhardwajmanish18@...il.com>, Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>, Mark Rutland <mark.rutland@....com>, Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, Namhyung Kim <namhyung@...nel.org>, Ian Rogers <irogers@...gle.com>, linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH] perf/core: introduced stub APIs for exported APIs Hi Manish, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/perf/core] [also build test WARNING on acme/perf/core tip/master tip/auto-latest linus/master v6.2 next-20230303] [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/Manish-Bhardwaj/perf-core-introduced-stub-APIs-for-exported-APIs/20230305-134024 patch link: https://lore.kernel.org/r/20230305053934.9948-1-bhardwajmanish18%40gmail.com patch subject: [PATCH] perf/core: introduced stub APIs for exported APIs config: riscv-randconfig-r033-20230305 (https://download.01.org/0day-ci/archive/20230305/202303051534.Ni7GS2vf-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7) 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 riscv cross compiling tool for clang build # apt-get install binutils-riscv-linux-gnu # https://github.com/intel-lab-lkp/linux/commit/2636181e6d3f39c8485077cb15927f84f00a617c git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Manish-Bhardwaj/perf-core-introduced-stub-APIs-for-exported-APIs/20230305-134024 git checkout 2636181e6d3f39c8485077cb15927f84f00a617c # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/kernel/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@...el.com> | Link: https://lore.kernel.org/oe-kbuild-all/202303051534.Ni7GS2vf-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from arch/riscv/kernel/ptrace.c:23: In file included from include/trace/events/syscalls.h:73: 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:10: >> include/linux/perf_event.h:1702:13: warning: no previous prototype for function 'perf_pmu_unregister' [-Wmissing-prototypes] extern void perf_pmu_unregister(struct pmu *pmu) { } ^ include/linux/perf_event.h:1702:8: note: declare 'static' if the function is not intended to be used outside of this translation unit extern void perf_pmu_unregister(struct pmu *pmu) { } ^ include/linux/perf_event.h:1682:13: warning: unused function 'perf_event_addr_filters_sync' [-Wunused-function] static void perf_event_addr_filters_sync(struct perf_event *event) { } ^ include/linux/perf_event.h:1683:12: warning: unused function 'perf_event_read_value' [-Wunused-function] static u64 perf_event_read_value(struct perf_event *event, ^ include/linux/perf_event.h:1688:13: warning: unused function 'perf_event_update_userpage' [-Wunused-function] static void perf_event_update_userpage(struct perf_event *event) { } ^ include/linux/perf_event.h:1689:13: warning: unused function 'perf_register_guest_info_callbacks' [-Wunused-function] static void perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *cbs) { } ^ include/linux/perf_event.h:1690:13: warning: unused function 'perf_unregister_guest_info_callbacks' [-Wunused-function] static void perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *cbs) { } ^ include/linux/perf_event.h:1691:13: warning: unused function 'perf_report_aux_output_id' [-Wunused-function] static void perf_report_aux_output_id(struct perf_event *event, u64 hw_id) { } ^ include/linux/perf_event.h:1692:13: warning: unused function 'perf_tp_event' [-Wunused-function] static void perf_tp_event(u16 event_type, u64 count, void *record, ^ include/linux/perf_event.h:1698:12: warning: unused function 'perf_pmu_register' [-Wunused-function] static int perf_pmu_register(struct pmu *pmu, const char *name, int type) ^ include/linux/perf_event.h:1704:1: warning: unused function 'perf_event_create_kernel_counter' [-Wunused-function] perf_event_create_kernel_counter(struct perf_event_attr *attr, ^ include/linux/perf_event.h:1712:13: warning: unused function 'perf_pmu_migrate_context' [-Wunused-function] static void perf_pmu_migrate_context(struct pmu *pmu, int src_cpu, int dst_cpu) { } ^ include/linux/perf_event.h:1713:16: warning: unused function 'perf_event_sysfs_show' [-Wunused-function] static ssize_t perf_event_sysfs_show(struct device *dev, struct device_attribute *attr, ^ 12 warnings generated. -- In file included from arch/riscv/kernel/signal.c:12: In file included from include/linux/syscalls.h:88: In file included from include/trace/syscall.h:7: In file included from include/linux/trace_events.h:10: >> include/linux/perf_event.h:1702:13: warning: no previous prototype for function 'perf_pmu_unregister' [-Wmissing-prototypes] extern void perf_pmu_unregister(struct pmu *pmu) { } ^ include/linux/perf_event.h:1702:8: note: declare 'static' if the function is not intended to be used outside of this translation unit extern void perf_pmu_unregister(struct pmu *pmu) { } ^ arch/riscv/kernel/signal.c:319:27: warning: no previous prototype for function 'do_work_pending' [-Wmissing-prototypes] asmlinkage __visible void do_work_pending(struct pt_regs *regs, ^ arch/riscv/kernel/signal.c:319:22: note: declare 'static' if the function is not intended to be used outside of this translation unit asmlinkage __visible void do_work_pending(struct pt_regs *regs, ^ static In file included from arch/riscv/kernel/signal.c:12: In file included from include/linux/syscalls.h:88: In file included from include/trace/syscall.h:7: In file included from include/linux/trace_events.h:10: include/linux/perf_event.h:1682:13: warning: unused function 'perf_event_addr_filters_sync' [-Wunused-function] static void perf_event_addr_filters_sync(struct perf_event *event) { } ^ include/linux/perf_event.h:1683:12: warning: unused function 'perf_event_read_value' [-Wunused-function] static u64 perf_event_read_value(struct perf_event *event, ^ include/linux/perf_event.h:1688:13: warning: unused function 'perf_event_update_userpage' [-Wunused-function] static void perf_event_update_userpage(struct perf_event *event) { } ^ include/linux/perf_event.h:1689:13: warning: unused function 'perf_register_guest_info_callbacks' [-Wunused-function] static void perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *cbs) { } ^ include/linux/perf_event.h:1690:13: warning: unused function 'perf_unregister_guest_info_callbacks' [-Wunused-function] static void perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *cbs) { } ^ include/linux/perf_event.h:1691:13: warning: unused function 'perf_report_aux_output_id' [-Wunused-function] static void perf_report_aux_output_id(struct perf_event *event, u64 hw_id) { } ^ include/linux/perf_event.h:1692:13: warning: unused function 'perf_tp_event' [-Wunused-function] static void perf_tp_event(u16 event_type, u64 count, void *record, ^ include/linux/perf_event.h:1698:12: warning: unused function 'perf_pmu_register' [-Wunused-function] static int perf_pmu_register(struct pmu *pmu, const char *name, int type) ^ include/linux/perf_event.h:1704:1: warning: unused function 'perf_event_create_kernel_counter' [-Wunused-function] perf_event_create_kernel_counter(struct perf_event_attr *attr, ^ include/linux/perf_event.h:1712:13: warning: unused function 'perf_pmu_migrate_context' [-Wunused-function] static void perf_pmu_migrate_context(struct pmu *pmu, int src_cpu, int dst_cpu) { } ^ include/linux/perf_event.h:1713:16: warning: unused function 'perf_event_sysfs_show' [-Wunused-function] static ssize_t perf_event_sysfs_show(struct device *dev, struct device_attribute *attr, ^ 13 warnings generated. vim +/perf_pmu_unregister +1702 include/linux/perf_event.h 1649 1650 extern int perf_output_begin(struct perf_output_handle *handle, 1651 struct perf_sample_data *data, 1652 struct perf_event *event, unsigned int size); 1653 extern int perf_output_begin_forward(struct perf_output_handle *handle, 1654 struct perf_sample_data *data, 1655 struct perf_event *event, 1656 unsigned int size); 1657 extern int perf_output_begin_backward(struct perf_output_handle *handle, 1658 struct perf_sample_data *data, 1659 struct perf_event *event, 1660 unsigned int size); 1661 1662 extern void perf_output_end(struct perf_output_handle *handle); 1663 extern unsigned int perf_output_copy(struct perf_output_handle *handle, 1664 const void *buf, unsigned int len); 1665 extern unsigned int perf_output_skip(struct perf_output_handle *handle, 1666 unsigned int len); 1667 extern long perf_output_copy_aux(struct perf_output_handle *aux_handle, 1668 struct perf_output_handle *handle, 1669 unsigned long from, unsigned long to); 1670 extern int perf_swevent_get_recursion_context(void); 1671 extern void perf_swevent_put_recursion_context(int rctx); 1672 extern u64 perf_swevent_set_period(struct perf_event *event); 1673 extern void perf_event_enable(struct perf_event *event); 1674 extern void perf_event_disable(struct perf_event *event); 1675 extern void perf_event_disable_local(struct perf_event *event); 1676 extern void perf_event_disable_inatomic(struct perf_event *event); 1677 extern void perf_event_task_tick(void); 1678 extern int perf_event_account_interrupt(struct perf_event *event); 1679 extern int perf_event_period(struct perf_event *event, u64 value); 1680 extern u64 perf_event_pause(struct perf_event *event, bool reset); 1681 #else /* !CONFIG_PERF_EVENTS: */ 1682 static void perf_event_addr_filters_sync(struct perf_event *event) { } 1683 static u64 perf_event_read_value(struct perf_event *event, 1684 u64 *enabled, u64 *running) 1685 { 1686 return 0; 1687 } 1688 static void perf_event_update_userpage(struct perf_event *event) { } 1689 static void perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *cbs) { } 1690 static void perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *cbs) { } 1691 static void perf_report_aux_output_id(struct perf_event *event, u64 hw_id) { } 1692 static void perf_tp_event(u16 event_type, u64 count, void *record, 1693 int entry_size, struct pt_regs *regs, 1694 struct hlist_head *head, int rctx, 1695 struct task_struct *task) 1696 { 1697 } 1698 static int perf_pmu_register(struct pmu *pmu, const char *name, int type) 1699 { 1700 return -1; 1701 } > 1702 extern void perf_pmu_unregister(struct pmu *pmu) { } 1703 static struct perf_event * 1704 perf_event_create_kernel_counter(struct perf_event_attr *attr, 1705 int cpu, 1706 struct task_struct *task, 1707 perf_overflow_handler_t callback, 1708 void *context) 1709 { 1710 return NULL; 1711 } 1712 static void perf_pmu_migrate_context(struct pmu *pmu, int src_cpu, int dst_cpu) { } 1713 static ssize_t perf_event_sysfs_show(struct device *dev, struct device_attribute *attr, 1714 char *page) 1715 { 1716 return -1; 1717 } 1718 static inline void * 1719 perf_aux_output_begin(struct perf_output_handle *handle, 1720 struct perf_event *event) { return NULL; } 1721 static inline void 1722 perf_aux_output_end(struct perf_output_handle *handle, unsigned long size) 1723 { } 1724 static inline int 1725 perf_aux_output_skip(struct perf_output_handle *handle, 1726 unsigned long size) { return -EINVAL; } 1727 static inline void * 1728 perf_get_aux(struct perf_output_handle *handle) { return NULL; } 1729 static inline void 1730 perf_event_task_migrate(struct task_struct *task) { } 1731 static inline void 1732 perf_event_task_sched_in(struct task_struct *prev, 1733 struct task_struct *task) { } 1734 static inline void 1735 perf_event_task_sched_out(struct task_struct *prev, 1736 struct task_struct *next) { } 1737 static inline int perf_event_init_task(struct task_struct *child, 1738 u64 clone_flags) { return 0; } 1739 static inline void perf_event_exit_task(struct task_struct *child) { } 1740 static inline void perf_event_free_task(struct task_struct *task) { } 1741 static inline void perf_event_delayed_put(struct task_struct *task) { } 1742 static inline struct file *perf_event_get(unsigned int fd) { return ERR_PTR(-EINVAL); } 1743 static inline const struct perf_event *perf_get_event(struct file *file) 1744 { 1745 return ERR_PTR(-EINVAL); 1746 } 1747 static inline const struct perf_event_attr *perf_event_attrs(struct perf_event *event) 1748 { 1749 return ERR_PTR(-EINVAL); 1750 } 1751 static inline int perf_event_read_local(struct perf_event *event, u64 *value, 1752 u64 *enabled, u64 *running) 1753 { 1754 return -EINVAL; 1755 } 1756 static inline void perf_event_print_debug(void) { } 1757 static inline int perf_event_task_disable(void) { return -EINVAL; } 1758 static inline int perf_event_task_enable(void) { return -EINVAL; } 1759 static inline int perf_event_refresh(struct perf_event *event, int refresh) 1760 { 1761 return -EINVAL; 1762 } 1763 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests
Powered by blists - more mailing lists