diff options
| -rw-r--r-- | fs/binfmt_elf.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 89063d1d9e9a..92cf005468b5 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1750,8 +1750,13 @@ static int fill_thread_core_info(struct elf_thread_core_info *t, if (is_fpreg) SET_PR_FPVALID(&t->prstatus); - if (!note_name) - note_name = is_fpreg ? NN_PRFPREG : "LINUX"; + /* There should be a note name, but if not, guess: */ + if (WARN_ON_ONCE(!note_name)) + note_name = "LINUX"; + else + /* Warn on non-legacy-compatible names, for now. */ + WARN_ON_ONCE(strcmp(note_name, + is_fpreg ? "CORE" : "LINUX")); __fill_note(&t->notes[note_iter], note_name, note_type, ret, data); |