1b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0 2ba38961aSKees Cook #define __NO_FORTIFY 337185b33SAl Viro #include <linux/types.h> 437185b33SAl Viro #include <linux/module.h> 51da177e4SLinus Torvalds 6*5d90cf6dSJohannes Berg /* 7*5d90cf6dSJohannes Berg * This file exports some critical string functions and compiler 8*5d90cf6dSJohannes Berg * built-in functions (where calls are emitted by the compiler 9*5d90cf6dSJohannes Berg * itself that we cannot avoid even in kernel code) to modules. 10*5d90cf6dSJohannes Berg * 11*5d90cf6dSJohannes Berg * "_user.c" code that previously used exports here such as hostfs 12*5d90cf6dSJohannes Berg * really should be considered part of the 'hypervisor' and define 13*5d90cf6dSJohannes Berg * its own API boundary like hostfs does now; don't add exports to 14*5d90cf6dSJohannes Berg * this file for such cases. 15e8234483SJeff Dike */ 161da177e4SLinus Torvalds 171a65f493SJeff Dike /* If it's not defined, the export is included in lib/string.c.*/ 187c45ad16SPaolo 'Blaisorblade' Giarrusso #ifdef __HAVE_ARCH_STRSTR 19*5d90cf6dSJohannes Berg #undef strstr 207c45ad16SPaolo 'Blaisorblade' Giarrusso EXPORT_SYMBOL(strstr); 217c45ad16SPaolo 'Blaisorblade' Giarrusso #endif 227c45ad16SPaolo 'Blaisorblade' Giarrusso 2300699e84Sakpm@linux-foundation.org #ifndef __x86_64__ 24*5d90cf6dSJohannes Berg #undef memcpy 2500699e84Sakpm@linux-foundation.org extern void *memcpy(void *, const void *, size_t); 261da177e4SLinus Torvalds EXPORT_SYMBOL(memcpy); 27*5d90cf6dSJohannes Berg extern void *memmove(void *, const void *, size_t); 281da177e4SLinus Torvalds EXPORT_SYMBOL(memmove); 29*5d90cf6dSJohannes Berg #undef memset 30*5d90cf6dSJohannes Berg extern void *memset(void *, int, size_t); 311da177e4SLinus Torvalds EXPORT_SYMBOL(memset); 325b301409SPatricia Alfonso #endif 335b301409SPatricia Alfonso 34c6b17bbdSAl Viro #ifdef CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA 35*5d90cf6dSJohannes Berg /* needed for __access_ok() */ 361da177e4SLinus Torvalds EXPORT_SYMBOL(vsyscall_ehdr); 371da177e4SLinus Torvalds EXPORT_SYMBOL(vsyscall_end); 381da177e4SLinus Torvalds #endif 391da177e4SLinus Torvalds 40f956b3e4SRichard Weinberger #ifdef _FORTIFY_SOURCE 41*5d90cf6dSJohannes Berg extern int __sprintf_chk(char *str, int flag, size_t len, const char *format); 42f956b3e4SRichard Weinberger EXPORT_SYMBOL(__sprintf_chk); 43f956b3e4SRichard Weinberger #endif 44