qemu-cr16/target/ppc
Philippe Mathieu-Daudé 40fed8c1d3 target/ppc: Replace g_memdup() by g_memdup2()
Per https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538

  The old API took the size of the memory to duplicate as a guint,
  whereas most memory functions take memory sizes as a gsize. This
  made it easy to accidentally pass a gsize to g_memdup(). For large
  values, that would lead to a silent truncation of the size from 64
  to 32 bits, and result in a heap area being returned which is
  significantly smaller than what the caller expects. This can likely
  be exploited in various modules to cause a heap buffer overflow.

Replace g_memdup() by the safer g_memdup2() wrapper.

Trivially safe because the argument was directly from sizeof.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20210903174510.751630-27-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-05-08 19:11:34 +02:00
..
translate target/ppc: Move add and subf type fixed-point arithmetic instructions to decodetree 2024-03-13 02:47:04 +10:00
arch_dump.c
compat.c
cpu-models.c ppc: Drop support for POWER9 and POWER10 DD1 chips 2024-03-13 02:47:04 +10:00
cpu-models.h
cpu-param.h target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
cpu-qom.h target/ppc: Use GDBFeature for dynamic XML 2024-02-28 09:09:25 +00:00
cpu.c
cpu.h target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
cpu_init.c target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU list 2024-04-29 09:37:26 +03:00
dfp_helper.c
excp_helper.c target/ppc/excp_helper: Avoid 'abi_ptr' in system emulation 2024-04-26 15:31:37 +02:00
fpu_helper.c target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros 2023-11-21 08:39:58 +01:00
gdbstub.c target/ppc: Fix GDB register indexing on secondary CPUs 2024-03-30 18:50:24 +10:00
helper.h
helper_regs.c target/ppc: Prevent supervisor from modifying MSR[ME] 2024-03-13 02:47:04 +10:00
helper_regs.h
insn32.decode target/ppc: Move add and subf type fixed-point arithmetic instructions to decodetree 2024-03-13 02:47:04 +10:00
insn64.decode
int_helper.c target/ppc: Rename variables to avoid local variable shadowing in VUPKPX 2023-10-06 10:56:54 +02:00
internal.h exec/cpu: Extract page-protection definitions to page-protection.h 2024-05-06 11:17:15 +02:00
Kconfig ppc: switch boards to "default y" 2024-05-03 15:47:47 +02:00
kvm.c kvm: ppc: disable sPAPR code if CONFIG_PSERIES is disabled 2024-05-03 15:47:47 +02:00
kvm_ppc.h target/ppc: Prohibit target specific KVM prototypes on user emulation 2023-11-07 12:13:28 +01:00
machine.c target/ppc: Constify VMState in machine.c 2023-12-29 11:17:30 +11:00
mem_helper.c target/ppc: Split out ppc_env_mmu_index 2024-02-03 16:46:10 +10:00
meson.build target/ppc: Restrict KVM objects to system emulation 2023-11-07 12:13:28 +01:00
misc_helper.c ppc/pnv: Improve pervasive topology calculation for big-core 2024-03-13 02:47:04 +10:00
mmu-book3s-v3.c
mmu-book3s-v3.h
mmu-books.h
mmu-hash32.c exec/cpu: Extract page-protection definitions to page-protection.h 2024-05-06 11:17:15 +02:00
mmu-hash32.h
mmu-hash64.c target/ppc: Replace g_memdup() by g_memdup2() 2024-05-08 19:11:34 +02:00
mmu-hash64.h
mmu-radix64.c exec/cpu: Extract page-protection definitions to page-protection.h 2024-05-06 11:17:15 +02:00
mmu-radix64.h exec/cpu: Extract page-protection definitions to page-protection.h 2024-05-06 11:17:15 +02:00
mmu_common.c exec/cpu: Extract page-protection definitions to page-protection.h 2024-05-06 11:17:15 +02:00
mmu_helper.c exec/cpu: Extract page-protection definitions to page-protection.h 2024-05-06 11:17:15 +02:00
power8-pmu-regs.c.inc
power8-pmu.c
power8-pmu.h
ppc-qmp-cmds.c target/ppc: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:24 +01:00
spr_common.h
tcg-stub.c hw/ppc/spapr_hcall: Allow elision of softmmu_resize_hpt_prep 2024-02-23 23:24:42 +10:00
timebase_helper.c target/ppc: Add SMT support to time facilities 2024-02-23 23:24:43 +10:00
trace-events
trace.h
translate.c target/ppc: Add gen_exception_err_nip() function 2024-03-13 02:47:04 +10:00
user_only_helper.c target/ppc: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:24 +01:00