From: kernel test robot <lkp@intel.com>
To: "Blaise Boscaccy" <bboscaccy@linux.microsoft.com>,
"Paul Moore" <paul@paul-moore.com>,
"James Morris" <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
"Stephen Smalley" <stephen.smalley.work@gmail.com>,
"Ondrej Mosnacek" <omosnace@redhat.com>,
"Casey Schaufler" <casey@schaufler-ca.com>,
"John Johansen" <john.johansen@canonical.com>,
"Christian Göttsche" <cgzones@googlemail.com>,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, selinux@vger.kernel.org,
bpf@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] lsm,selinux: Add LSM blob support for BPF objects
Date: Wed, 16 Jul 2025 20:14:26 +0800 [thread overview]
Message-ID: <202507161903.ToApi2Jk-lkp@intel.com> (raw)
In-Reply-To: <20250715222655.705241-1-bboscaccy@linux.microsoft.com>
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@intel.com/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@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/202507161903.ToApi2Jk-lkp@intel.com/
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
next prev parent reply other threads:[~2025-07-16 12:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 22:25 [PATCH] lsm,selinux: Add LSM blob support for BPF objects Blaise Boscaccy
2025-07-16 12:14 ` kernel test robot [this message]
2025-07-16 17:44 ` Casey Schaufler
2025-07-18 15:32 ` Blaise Boscaccy
2025-07-16 20:48 ` Song Liu
2025-07-18 15:32 ` Blaise Boscaccy
2025-07-17 2:11 ` Paul Moore
2025-07-18 15:35 ` Blaise Boscaccy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202507161903.ToApi2Jk-lkp@intel.com \
--to=lkp@intel.com \
--cc=bboscaccy@linux.microsoft.com \
--cc=bpf@vger.kernel.org \
--cc=casey@schaufler-ca.com \
--cc=cgzones@googlemail.com \
--cc=jmorris@namei.org \
--cc=john.johansen@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=selinux@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=stephen.smalley.work@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.