summaryrefslogtreecommitdiff
path: root/arch/alpha/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 11:02:58 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 11:02:58 -0800
commit8934827db5403eae57d4537114a9ff88b0a8460f (patch)
tree5167aa7e16b786b9135e19d508b234054fa6e8ce /arch/alpha/kernel
parentc7decec2f2d2ab0366567f9e30c0e1418cece43f (diff)
parent7a70c15bd1449f1eb30991772edce37b41e496fb (diff)
Merge tag 'kmalloc_obj-treewide-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull kmalloc_obj conversion from Kees Cook: "This does the tree-wide conversion to kmalloc_obj() and friends using coccinelle, with a subsequent small manual cleanup of whitespace alignment that coccinelle does not handle. This uncovered a clang bug in __builtin_counted_by_ref(), so the conversion is preceded by disabling that for current versions of clang. The imminent clang 22.1 release has the fix. I've done allmodconfig build tests for x86_64, arm64, i386, and arm. I did defconfig builds for alpha, m68k, mips, parisc, powerpc, riscv, s390, sparc, sh, arc, csky, xtensa, hexagon, and openrisc" * tag 'kmalloc_obj-treewide-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: kmalloc_obj: Clean up after treewide replacements treewide: Replace kmalloc with kmalloc_obj for non-scalar types compiler_types: Disable __builtin_counted_by_ref for Clang
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r--arch/alpha/kernel/core_marvel.c4
-rw-r--r--arch/alpha/kernel/core_titan.c4
-rw-r--r--arch/alpha/kernel/module.c4
-rw-r--r--arch/alpha/kernel/pci.c2
-rw-r--r--arch/alpha/kernel/setup.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c
index d38f4d6759e4..b5b547732398 100644
--- a/arch/alpha/kernel/core_marvel.c
+++ b/arch/alpha/kernel/core_marvel.c
@@ -861,7 +861,7 @@ marvel_agp_setup(alpha_agp_info *agp)
if (!alpha_agpgart_size)
return -ENOMEM;
- aper = kmalloc(sizeof(*aper), GFP_KERNEL);
+ aper = kmalloc_obj(*aper, GFP_KERNEL);
if (aper == NULL) return -ENOMEM;
aper->arena = agp->hose->sg_pci;
@@ -1059,7 +1059,7 @@ marvel_agp_info(void)
/*
* Allocate the info structure.
*/
- agp = kmalloc(sizeof(*agp), GFP_KERNEL);
+ agp = kmalloc_obj(*agp, GFP_KERNEL);
if (!agp)
return NULL;
diff --git a/arch/alpha/kernel/core_titan.c b/arch/alpha/kernel/core_titan.c
index 77f5d68ed04b..ddaef7b75ba7 100644
--- a/arch/alpha/kernel/core_titan.c
+++ b/arch/alpha/kernel/core_titan.c
@@ -594,7 +594,7 @@ titan_agp_setup(alpha_agp_info *agp)
if (!alpha_agpgart_size)
return -ENOMEM;
- aper = kmalloc(sizeof(struct titan_agp_aperture), GFP_KERNEL);
+ aper = kmalloc_obj(struct titan_agp_aperture, GFP_KERNEL);
if (aper == NULL)
return -ENOMEM;
@@ -760,7 +760,7 @@ titan_agp_info(void)
/*
* Allocate the info structure.
*/
- agp = kmalloc(sizeof(*agp), GFP_KERNEL);
+ agp = kmalloc_obj(*agp, GFP_KERNEL);
if (!agp)
return NULL;
diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
index cbefa5a77384..6fbc2d179e93 100644
--- a/arch/alpha/kernel/module.c
+++ b/arch/alpha/kernel/module.c
@@ -46,7 +46,7 @@ process_reloc_for_got(Elf64_Rela *rela,
goto found_entry;
}
- g = kmalloc (sizeof (*g), GFP_KERNEL);
+ g = kmalloc_obj(*g, GFP_KERNEL);
g->next = chains[r_sym].next;
g->r_addend = r_addend;
g->got_offset = *poffset;
@@ -93,7 +93,7 @@ module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs,
}
nsyms = symtab->sh_size / sizeof(Elf64_Sym);
- chains = kcalloc(nsyms, sizeof(struct got_entry), GFP_KERNEL);
+ chains = kzalloc_objs(struct got_entry, nsyms, GFP_KERNEL);
if (!chains) {
printk(KERN_ERR
"module %s: no memory for symbol chain buffer\n",
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 8e9b4ac86b7e..93eb07018e6b 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -220,7 +220,7 @@ static void pdev_save_srm_config(struct pci_dev *dev)
printed = 1;
}
- tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
+ tmp = kmalloc_obj(*tmp, GFP_KERNEL);
if (!tmp) {
printk(KERN_ERR "%s: kmalloc() failed!\n", __func__);
return;
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index f0af444a69a4..ea4e7243c0e9 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -392,7 +392,7 @@ register_cpus(void)
int i;
for_each_possible_cpu(i) {
- struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL);
+ struct cpu *p = kzalloc_obj(*p, GFP_KERNEL);
if (!p)
return -ENOMEM;
register_cpu(p, i);