mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 12:54:09 +07:00
73b9160d0d
Define vdso_start, vdso_end as array to avoid compile-time analysis error for the case of built with CONFIG_FORTIFY_SOURCE. and, since vdso_start, vdso_end are used in vdso.c only, move extern-declaration from vdso.h to vdso.c. If kernel is built with CONFIG_FORTIFY_SOURCE, compile-time error happens at this code. - if (memcmp(&vdso_start, "177ELF", 4)) The size of "&vdso_start" is recognized as 1 byte, but n is 4, So that compile-time error is reported. Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Jinbum Park <jinb.park7@gmail.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
32 lines
507 B
C
32 lines
507 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_VDSO_H
|
|
#define __ASM_VDSO_H
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
struct mm_struct;
|
|
|
|
#ifdef CONFIG_VDSO
|
|
|
|
void arm_install_vdso(struct mm_struct *mm, unsigned long addr);
|
|
|
|
extern unsigned int vdso_total_pages;
|
|
|
|
#else /* CONFIG_VDSO */
|
|
|
|
static inline void arm_install_vdso(struct mm_struct *mm, unsigned long addr)
|
|
{
|
|
}
|
|
|
|
#define vdso_total_pages 0
|
|
|
|
#endif /* CONFIG_VDSO */
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
#endif /* __ASM_VDSO_H */
|