s390/kasan: use noexec and large pages
To lower memory footprint and speed up kasan initialisation detect EDAT availability and use large pages if possible. As we know how much memory is needed for initialisation, another simplistic large page allocator is introduced to avoid memory fragmentation. Since facilities list is retrieved anyhow, detect noexec support and adjust pages attributes. Handle noexec kernel option to avoid inconsistent kasan shadow memory pages flags. Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
このコミットが含まれているのは:
@@ -13,6 +13,7 @@ int __bootdata(early_ipl_block_valid);
|
||||
|
||||
unsigned long __bootdata(memory_end);
|
||||
int __bootdata(memory_end_set);
|
||||
int __bootdata(noexec_disabled);
|
||||
|
||||
static inline int __diag308(unsigned long subcode, void *addr)
|
||||
{
|
||||
@@ -145,8 +146,10 @@ void setup_boot_command_line(void)
|
||||
static char command_line_buf[COMMAND_LINE_SIZE] __section(.data);
|
||||
static void parse_mem_opt(void)
|
||||
{
|
||||
char *args;
|
||||
char *param, *val;
|
||||
bool enabled;
|
||||
char *args;
|
||||
int rc;
|
||||
|
||||
args = strcpy(command_line_buf, early_command_line);
|
||||
while (*args) {
|
||||
@@ -156,6 +159,12 @@ static void parse_mem_opt(void)
|
||||
memory_end = memparse(val, NULL);
|
||||
memory_end_set = 1;
|
||||
}
|
||||
|
||||
if (!strcmp(param, "noexec")) {
|
||||
rc = kstrtobool(val, &enabled);
|
||||
if (!rc && !enabled)
|
||||
noexec_disabled = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
新しいイシューから参照
ユーザーをブロックする