]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
apparmor: fix fmt string type error in process_strs_entry
authorJohn Johansen <john.johansen@canonical.com>
Mon, 2 Feb 2026 11:45:21 +0000 (03:45 -0800)
committerJohn Johansen <john.johansen@canonical.com>
Mon, 2 Feb 2026 12:16:15 +0000 (04:16 -0800)
commit102ada7ca37ed8358bd70c6f8e6475ebacf6f76d
tree38771dcba2d3790df76902da4979fee50289e68d
parent3734b9463bd4fb5ac350842db55e2e0ccbf1b7a5
apparmor: fix fmt string type error in process_strs_entry

pointer subtraction has a type of int when using clang on hexagon,
microblaze (and possibly other archs). We know the subtraction is
postive so cast the expression to unsigned long to match what is in
the fmt string.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202602021429.CcmWkR9K-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202602021427.PvvDjgyL-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202602021510.JPzX5zKb-lkp@intel.com/
Fixes: c140dcd1246bf ("apparmor: make str table more generic and be able to have multiple entries")
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/policy_unpack.c