Hi Blaise, kernel test robot noticed the following build warnings: [auto build test WARNING on pcmoore-selinux/next] [also build test WARNING on linus/master v6.16-rc6 next-20250715] [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/Blaise-Boscaccy/lsm-selinux-Add-LSM-blob-support-for-BPF-objects/20250716-062844 base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git next patch link: https://lore.kernel.org/r/20250715222655.705241-1-bboscaccy%40linux.microsoft.com patch subject: [PATCH] lsm,selinux: Add LSM blob support for BPF objects config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20250716/202507161903.ToApi2Jk-lkp@xxxxxxxxx/config) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250716/202507161903.ToApi2Jk-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202507161903.ToApi2Jk-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> security/security.c:896:12: warning: 'lsm_bpf_token_alloc' defined but not used [-Wunused-function] 896 | static int lsm_bpf_token_alloc(struct bpf_token *token) | ^~~~~~~~~~~~~~~~~~~ >> security/security.c:874:12: warning: 'lsm_bpf_prog_alloc' defined but not used [-Wunused-function] 874 | static int lsm_bpf_prog_alloc(struct bpf_prog *prog) | ^~~~~~~~~~~~~~~~~~ >> security/security.c:852:12: warning: 'lsm_bpf_map_alloc' defined but not used [-Wunused-function] 852 | static int lsm_bpf_map_alloc(struct bpf_map *map) | ^~~~~~~~~~~~~~~~~ vim +/lsm_bpf_token_alloc +896 security/security.c 843 844 /** 845 * lsm_bpf_map_alloc - allocate a composite bpf_map blob 846 * @map: the bpf_map that needs a blob 847 * 848 * Allocate the bpf_map blob for all the modules 849 * 850 * Returns 0, or -ENOMEM if memory can't be allocated. 851 */ > 852 static int lsm_bpf_map_alloc(struct bpf_map *map) 853 { 854 if (blob_sizes.lbs_bpf_map == 0) { 855 map->security = NULL; 856 return 0; 857 } 858 859 map->security = kzalloc(blob_sizes.lbs_bpf_map, GFP_KERNEL); 860 if (!map->security) 861 return -ENOMEM; 862 863 return 0; 864 } 865 866 /** 867 * lsm_bpf_prog_alloc - allocate a composite bpf_prog blob 868 * @prog: the bpf_prog that needs a blob 869 * 870 * Allocate the bpf_prog blob for all the modules 871 * 872 * Returns 0, or -ENOMEM if memory can't be allocated. 873 */ > 874 static int lsm_bpf_prog_alloc(struct bpf_prog *prog) 875 { 876 if (blob_sizes.lbs_bpf_prog == 0) { 877 prog->aux->security = NULL; 878 return 0; 879 } 880 881 prog->aux->security = kzalloc(blob_sizes.lbs_bpf_prog, GFP_KERNEL); 882 if (!prog->aux->security) 883 return -ENOMEM; 884 885 return 0; 886 } 887 888 /** 889 * lsm_bpf_token_alloc - allocate a composite bpf_token blob 890 * @token: the bpf_token that needs a blob 891 * 892 * Allocate the bpf_token blob for all the modules 893 * 894 * Returns 0, or -ENOMEM if memory can't be allocated. 895 */ > 896 static int lsm_bpf_token_alloc(struct bpf_token *token) 897 { 898 if (blob_sizes.lbs_bpf_token == 0) { 899 token->security = NULL; 900 return 0; 901 } 902 903 token->security = kzalloc(blob_sizes.lbs_bpf_token, GFP_KERNEL); 904 if (!token->security) 905 return -ENOMEM; 906 907 return 0; 908 } 909 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki