mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/7] add proper strdup_const support
@ 2024-11-25 15:29 Ahmad Fatoum
  2024-11-25 15:29 ` [PATCH 1/7] sandbox: hostfile: strdup device tree node names Ahmad Fatoum
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Ahmad Fatoum @ 2024-11-25 15:29 UTC (permalink / raw)
  To: barebox

We currently implement strdup_const as strdup, which is correct, but
leaves the benefits of a proper implementation on the table:
Reducing allocations for .rodata strings, which have static storage
duration anyway.

This series implements a proper strdup_const that avoids allocations in
that case.

Ahmad Fatoum (7):
  sandbox: hostfile: strdup device tree node names
  lds: implement is_barebox_rodata
  string: implement proper strdup_const/free_const
  treewide: replace basename with kbasename
  treewide: use strdup_const where appropriate
  fs: efi: replace allocation with local buffer
  cdev: fix string leaks in devfs links

 arch/arm/lib/pbl.lds.S                   |  4 ++-
 arch/arm/lib32/barebox.lds.S             |  4 ++-
 arch/arm/lib64/barebox.lds.S             |  4 ++-
 arch/kvx/cpu/barebox.lds.S               |  5 +++-
 arch/mips/lib/barebox.lds.S              |  4 ++-
 arch/mips/lib/pbl.lds.S                  |  4 ++-
 arch/mips/pbl/zbarebox.lds.S             |  4 ++-
 arch/openrisc/cpu/barebox.lds.S          |  4 ++-
 arch/powerpc/boards/pcm030/barebox.lds.S |  2 ++
 arch/powerpc/mach-mpc85xx/barebox.lds.S  |  2 ++
 arch/riscv/lib/barebox.lds.S             |  4 ++-
 arch/riscv/lib/pbl.lds.S                 |  4 ++-
 arch/sandbox/board/barebox.lds.S         |  2 ++
 arch/sandbox/board/hostfile.c            |  4 +--
 arch/x86/mach-efi/elf_ia32_efi.lds.S     |  2 ++
 arch/x86/mach-efi/elf_x86_64_efi.lds.S   |  2 ++
 commands/magicvar.c                      | 12 ++++----
 commands/menu.c                          |  6 ++--
 commands/nand.c                          |  4 +--
 commands/of_property.c                   | 12 ++++----
 commands/partition.c                     |  6 ++--
 commands/tftp.c                          |  5 ++--
 common/blspec.c                          |  8 ++---
 common/boot.c                            | 24 +++++++--------
 common/bootchooser.c                     |  6 ++--
 common/complete.c                        |  8 ++---
 common/elf.c                             |  2 +-
 common/env.c                             | 28 ++++++++---------
 common/file-list.c                       | 14 +++++----
 common/globalvar.c                       |  4 +--
 common/menu.c                            | 38 +++++++++++++-----------
 common/menutree.c                        |  4 +--
 common/poller.c                          |  4 +--
 common/resource.c                        |  8 ++---
 common/restart.c                         |  2 +-
 common/slice.c                           |  4 +--
 common/state/backend_storage.c           |  4 +--
 common/state/state.h                     |  2 +-
 common/state/state_variables.c           |  4 +--
 drivers/led/led-gpio.c                   |  6 ++--
 drivers/led/led-pwm.c                    |  2 +-
 drivers/nvmem/core.c                     |  4 +--
 drivers/of/base.c                        | 12 ++++----
 drivers/of/of_net.c                      |  2 +-
 drivers/regulator/core.c                 |  4 +--
 drivers/soc/kvx/kvx_socinfo.c            |  2 +-
 fs/bpkfs.c                               |  8 ++---
 fs/devfs-core.c                          |  5 +++-
 fs/efi.c                                 | 18 ++++++-----
 include/asm-generic/sections.h           | 18 +++++++++++
 include/blspec.h                         |  4 +--
 include/boot.h                           |  2 +-
 include/console.h                        |  2 +-
 include/digest.h                         |  4 +--
 include/dma.h                            |  5 ++++
 include/elf.h                            |  2 +-
 include/environment.h                    |  8 ++---
 include/file-list.h                      |  4 +--
 include/led.h                            |  2 +-
 include/linux/clk.h                      |  4 ++-
 include/linux/slab.h                     |  7 +++--
 include/linux/string.h                   |  5 ++++
 include/mci.h                            |  2 +-
 include/menu.h                           | 20 ++++++++-----
 include/net.h                            |  2 +-
 include/of.h                             |  6 ++--
 include/param.h                          |  2 +-
 include/poller.h                         |  2 +-
 include/slice.h                          |  2 +-
 include/stringlist.h                     |  4 +--
 lib/glob.c                               | 19 +++++++-----
 lib/parameter.c                          |  6 ++--
 lib/string.c                             | 28 +++++++++++++++++
 lib/stringlist.c                         |  6 ++--
 net/eth.c                                |  4 +--
 net/nfs.c                                |  8 ++---
 scripts/checkpatch.pl                    |  2 +-
 77 files changed, 309 insertions(+), 198 deletions(-)

-- 
2.39.5




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

end of thread, other threads:[~2024-11-25 15:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-25 15:29 [PATCH 0/7] add proper strdup_const support Ahmad Fatoum
2024-11-25 15:29 ` [PATCH 1/7] sandbox: hostfile: strdup device tree node names Ahmad Fatoum
2024-11-25 15:29 ` [PATCH 2/7] lds: implement is_barebox_rodata Ahmad Fatoum
2024-11-25 15:29 ` [PATCH 3/7] string: implement proper strdup_const/free_const Ahmad Fatoum
2024-11-25 15:29 ` [PATCH 4/7] treewide: replace basename with kbasename Ahmad Fatoum
2024-11-25 15:29 ` [PATCH 5/7] treewide: use strdup_const where appropriate Ahmad Fatoum
2024-11-25 15:29 ` [PATCH 6/7] fs: efi: replace allocation with local buffer Ahmad Fatoum
2024-11-25 15:29 ` [PATCH 7/7] cdev: fix string leaks in devfs links Ahmad Fatoum

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