Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4ea6fcf authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Rusty Russell
Browse files

module loading ELF handling: use SELFMAG instead of numeric constant

parent 78b58e54
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1780,7 +1780,7 @@ static struct module *load_module(void __user *umod,


	/* Sanity checks against insmoding binaries or wrong arch,
	/* Sanity checks against insmoding binaries or wrong arch,
           weird elf version */
           weird elf version */
	if (memcmp(hdr->e_ident, ELFMAG, 4) != 0
	if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0
	    || hdr->e_type != ET_REL
	    || hdr->e_type != ET_REL
	    || !elf_check_arch(hdr)
	    || !elf_check_arch(hdr)
	    || hdr->e_shentsize != sizeof(*sechdrs)) {
	    || hdr->e_shentsize != sizeof(*sechdrs)) {