mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-28 20:11:00 +01:00
imgact_elf: Add const to a few struct image_params pointers
This makes it more obvious which functions modify fields in this struct. Reviewed by: imp, kib Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D44214
This commit is contained in:
parent
7701b99355
commit
169641f7dd
@ -88,8 +88,9 @@ static Elf_Brandinfo *__elfN(get_brandinfo)(struct image_params *imgp,
|
||||
const char *interp, int32_t *osrel, uint32_t *fctl0);
|
||||
static int __elfN(load_file)(struct proc *p, const char *file, u_long *addr,
|
||||
u_long *entry);
|
||||
static int __elfN(load_section)(struct image_params *imgp, vm_ooffset_t offset,
|
||||
caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot);
|
||||
static int __elfN(load_section)(const struct image_params *imgp,
|
||||
vm_ooffset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz,
|
||||
vm_prot_t prot);
|
||||
static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp);
|
||||
static bool __elfN(freebsd_trans_osrel)(const Elf_Note *note,
|
||||
int32_t *osrel);
|
||||
@ -545,9 +546,9 @@ __elfN(map_partial)(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
|
||||
}
|
||||
|
||||
static int
|
||||
__elfN(map_insert)(struct image_params *imgp, vm_map_t map, vm_object_t object,
|
||||
vm_ooffset_t offset, vm_offset_t start, vm_offset_t end, vm_prot_t prot,
|
||||
int cow)
|
||||
__elfN(map_insert)(const struct image_params *imgp, vm_map_t map,
|
||||
vm_object_t object, vm_ooffset_t offset, vm_offset_t start, vm_offset_t end,
|
||||
vm_prot_t prot, int cow)
|
||||
{
|
||||
struct sf_buf *sf;
|
||||
vm_offset_t off;
|
||||
@ -616,9 +617,9 @@ __elfN(map_insert)(struct image_params *imgp, vm_map_t map, vm_object_t object,
|
||||
return (KERN_SUCCESS);
|
||||
}
|
||||
|
||||
static int
|
||||
__elfN(load_section)(struct image_params *imgp, vm_ooffset_t offset,
|
||||
caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot)
|
||||
static int __elfN(load_section)(const struct image_params *imgp,
|
||||
vm_ooffset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz,
|
||||
vm_prot_t prot)
|
||||
{
|
||||
struct sf_buf *sf;
|
||||
size_t map_len;
|
||||
@ -721,7 +722,7 @@ __elfN(load_section)(struct image_params *imgp, vm_ooffset_t offset,
|
||||
}
|
||||
|
||||
static int
|
||||
__elfN(load_sections)(struct image_params *imgp, const Elf_Ehdr *hdr,
|
||||
__elfN(load_sections)(const struct image_params *imgp, const Elf_Ehdr *hdr,
|
||||
const Elf_Phdr *phdr, u_long rbase, u_long *base_addrp)
|
||||
{
|
||||
vm_prot_t prot;
|
||||
@ -2711,7 +2712,7 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep)
|
||||
|
||||
#define MAX_NOTES_LOOP 4096
|
||||
bool
|
||||
__elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote,
|
||||
__elfN(parse_notes)(const struct image_params *imgp, Elf_Note *checknote,
|
||||
const char *note_vendor, const Elf_Phdr *pnote,
|
||||
bool (*cb)(const Elf_Note *, void *, bool *), void *cb_arg)
|
||||
{
|
||||
|
@ -123,9 +123,9 @@ void __elfN(prepare_notes)(struct thread *, struct note_info_list *,
|
||||
void __elfN(size_segments)(struct thread *, struct sseg_closure *, int);
|
||||
size_t __elfN(register_note)(struct thread *, struct note_info_list *,
|
||||
int, outfunc_t, void *);
|
||||
bool __elfN(parse_notes)(struct image_params *, Elf_Note *, const char *,
|
||||
const Elf_Phdr *, bool (*)(const Elf_Note *, void *, bool *),
|
||||
void *);
|
||||
bool __elfN(parse_notes)(const struct image_params *, Elf_Note *,
|
||||
const char *, const Elf_Phdr *,
|
||||
bool (*)(const Elf_Note *, void *, bool *), void *);
|
||||
|
||||
/* Machine specific function to dump per-thread information. */
|
||||
void __elfN(dump_thread)(struct thread *, void *, size_t *);
|
||||
|
Loading…
Reference in New Issue
Block a user