mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v4 0/7] Add helper for security policies
@ 2026-03-20  6:44 Fabian Pflug
  2026-03-20  6:44 ` [PATCH v4 1/7] of: add of_property_write_string_array() Fabian Pflug
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Fabian Pflug @ 2026-03-20  6:44 UTC (permalink / raw)
  To: BAREBOX, Sascha Hauer; +Cc: Fabian Pflug

This series adds helper functions to the security policy framework to
do additional work based on the selected policy.
Like adding the policy name to the commandline and configuring pinmux
based on the selected policy.

If this series is to be applied after Ahamad's bootm change series, then
the block to change the commandline has to be moved up to roughly line
720 into the function bootm_boot_prep, where all the other
bootm_data->provide_*** checks are, so that the previous context remains
the same.

Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de>
---
Changes in v4:
- removed the global variable active_policy and replaced with a getter
  function
- add sanity check for is_allow parameter
- add new notifier chain to security_policy on change without checking
  policies is_allowed
- rewrote the pinctrl to make use of new notify chain
- changed pinctrl to use barebox,policy-<active-policy>-<name> to
  replace pinctrl for <name> instead of replacing 'default'
- Link to v3: https://lore.barebox.org/barebox/20260318-v2026-02-0-topic-sconfig_console-v3-0-e26055294723@pengutronix.de

Changes in v3:
- replaced while loop with of_tree_for_each_node_from
- removed unsused variable definition in base.c
- Link to v2: https://lore.barebox.org/barebox/20260316-v2026-02-0-topic-sconfig_console-v2-0-1eee8c762beb@pengutronix.de

Changes in v2:
- Add of_property_write_string_array function
- Add selftest for of_property_write_string_array
- Add exra-check for active-policy
- Use "linux.bootargs.dyn.policy" instead of version without dyn
- Iterate over device-nodes instead of recurse through tree
- Link to v1: https://lore.barebox.org/barebox/20260312-v2026-02-0-topic-sconfig_console-v1-0-4c3fccafab1e@pengutronix.de

---
Fabian Pflug (7):
      of: add of_property_write_string_array()
      security: policy: sanity check parameters
      security: policy: remove global active_policy var
      security: policy: add notifier chain for name change
      common: bootm: add policy to commandline
      drivers: pinctrl: configure pinctrl based on policy name
      security: kernel_pinctrl: fixup pinctrl in kernel dts

 commands/sconfig.c            |  9 +++++-
 common/bootm.c                | 24 ++++++++++++++
 drivers/of/base.c             | 43 +++++++++++++++++++++++++
 drivers/pinctrl/pinctrl.c     | 73 +++++++++++++++++++++++++++++++++++++++++--
 include/bootm.h               |  5 +++
 include/of.h                  |  3 ++
 include/security/config.h     |  1 +
 include/security/policy.h     |  3 +-
 security/Kconfig.policy       | 15 ++++++++-
 security/Makefile             |  1 +
 security/kernel_pinctrl.c     | 65 ++++++++++++++++++++++++++++++++++++++
 security/policy.c             | 21 +++++++++----
 test/self/of_manipulation.c   | 14 ++++++++-
 test/self/of_manipulation.dts |  5 +++
 14 files changed, 269 insertions(+), 13 deletions(-)
---
base-commit: 1d386a53086d28a0c4eda138ae9408a418b97b7e
change-id: 20260311-v2026-02-0-topic-sconfig_console-194842a14e1d

Best regards,
-- 
Fabian Pflug <f.pflug@pengutronix.de>




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-03-20  6:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-20  6:44 [PATCH v4 0/7] Add helper for security policies Fabian Pflug
2026-03-20  6:44 ` [PATCH v4 1/7] of: add of_property_write_string_array() Fabian Pflug
2026-03-20  6:44 ` [PATCH v4 2/7] security: policy: sanity check parameters Fabian Pflug
2026-03-20  6:44 ` [PATCH v4 3/7] security: policy: remove global active_policy var Fabian Pflug
2026-03-20  6:44 ` [PATCH v4 4/7] security: policy: add notifier chain for name change Fabian Pflug
2026-03-20  6:44 ` [PATCH v4 5/7] common: bootm: add policy to commandline Fabian Pflug
2026-03-20  6:44 ` [PATCH v4 6/7] drivers: pinctrl: configure pinctrl based on policy name Fabian Pflug
2026-03-20  6:44 ` [PATCH v4 7/7] security: kernel_pinctrl: fixup pinctrl in kernel dts Fabian Pflug

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox