* [patch 1/4] x86: vdso ELF handling - use SELFMAG instead of numeric constant [not found] <20080503101800.417039810@gmail.com> @ 2008-05-03 10:18 ` Cyrill Gorcunov 2008-05-03 21:06 ` Thomas Gleixner 2008-05-03 10:18 ` [patch 2/4] module loading " Cyrill Gorcunov ` (2 subsequent siblings) 3 siblings, 1 reply; 8+ messages in thread From: Cyrill Gorcunov @ 2008-05-03 10:18 UTC (permalink / raw) To: akpm, hpa, mingo, ralf; +Cc: linux-kernel, gorcunov [-- Attachment #1: elf-x86 --] [-- Type: text/plain, Size: 624 bytes --] Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- Index: linux-2.6.git/arch/x86/vdso/vdso32-setup.c =================================================================== --- linux-2.6.git.orig/arch/x86/vdso/vdso32-setup.c 2008-05-01 11:07:57.000000000 +0400 +++ linux-2.6.git/arch/x86/vdso/vdso32-setup.c 2008-05-02 21:25:10.000000000 +0400 @@ -162,7 +162,7 @@ static __init void relocate_vdso(Elf32_E Elf32_Shdr *shdr; int i; - BUG_ON(memcmp(ehdr->e_ident, ELFMAG, 4) != 0 || + BUG_ON(memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 || !elf_check_arch_ia32(ehdr) || ehdr->e_type != ET_DYN); -- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 1/4] x86: vdso ELF handling - use SELFMAG instead of numeric constant 2008-05-03 10:18 ` [patch 1/4] x86: vdso ELF handling - use SELFMAG instead of numeric constant Cyrill Gorcunov @ 2008-05-03 21:06 ` Thomas Gleixner 0 siblings, 0 replies; 8+ messages in thread From: Thomas Gleixner @ 2008-05-03 21:06 UTC (permalink / raw) To: Cyrill Gorcunov; +Cc: akpm, hpa, mingo, ralf, linux-kernel On Sat, 3 May 2008, Cyrill Gorcunov wrote: > Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> > --- > > Index: linux-2.6.git/arch/x86/vdso/vdso32-setup.c > =================================================================== > --- linux-2.6.git.orig/arch/x86/vdso/vdso32-setup.c 2008-05-01 11:07:57.000000000 +0400 > +++ linux-2.6.git/arch/x86/vdso/vdso32-setup.c 2008-05-02 21:25:10.000000000 +0400 > @@ -162,7 +162,7 @@ static __init void relocate_vdso(Elf32_E > Elf32_Shdr *shdr; > int i; > > - BUG_ON(memcmp(ehdr->e_ident, ELFMAG, 4) != 0 || > + BUG_ON(memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 || > !elf_check_arch_ia32(ehdr) || > ehdr->e_type != ET_DYN); Applied. Thanks, tglx ^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 2/4] module loading ELF handling - use SELFMAG instead of numeric constant [not found] <20080503101800.417039810@gmail.com> 2008-05-03 10:18 ` [patch 1/4] x86: vdso ELF handling - use SELFMAG instead of numeric constant Cyrill Gorcunov @ 2008-05-03 10:18 ` Cyrill Gorcunov 2008-05-03 10:18 ` [patch 3/4] x86: relocs " Cyrill Gorcunov 2008-05-03 10:18 ` [patch 4/4] MIPS: " Cyrill Gorcunov 3 siblings, 0 replies; 8+ messages in thread From: Cyrill Gorcunov @ 2008-05-03 10:18 UTC (permalink / raw) To: akpm, hpa, mingo, ralf; +Cc: linux-kernel, gorcunov [-- Attachment #1: elf-kernel-module --] [-- Type: text/plain, Size: 673 bytes --] Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- Index: linux-2.6.git/kernel/module.c =================================================================== --- linux-2.6.git.orig/kernel/module.c 2008-05-02 09:12:55.000000000 +0400 +++ linux-2.6.git/kernel/module.c 2008-05-02 21:36:51.000000000 +0400 @@ -1758,7 +1758,7 @@ static struct module *load_module(void _ /* Sanity checks against insmoding binaries or wrong arch, weird elf version */ - if (memcmp(hdr->e_ident, ELFMAG, 4) != 0 + if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0 || hdr->e_type != ET_REL || !elf_check_arch(hdr) || hdr->e_shentsize != sizeof(*sechdrs)) { -- ^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 3/4] x86: relocs ELF handling - use SELFMAG instead of numeric constant [not found] <20080503101800.417039810@gmail.com> 2008-05-03 10:18 ` [patch 1/4] x86: vdso ELF handling - use SELFMAG instead of numeric constant Cyrill Gorcunov 2008-05-03 10:18 ` [patch 2/4] module loading " Cyrill Gorcunov @ 2008-05-03 10:18 ` Cyrill Gorcunov 2008-05-03 21:07 ` Thomas Gleixner 2008-05-03 10:18 ` [patch 4/4] MIPS: " Cyrill Gorcunov 3 siblings, 1 reply; 8+ messages in thread From: Cyrill Gorcunov @ 2008-05-03 10:18 UTC (permalink / raw) To: akpm, hpa, mingo, ralf; +Cc: linux-kernel, gorcunov [-- Attachment #1: x86-elf-compressed --] [-- Type: text/plain, Size: 657 bytes --] Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- Index: linux-2.6.git/arch/x86/boot/compressed/relocs.c =================================================================== --- linux-2.6.git.orig/arch/x86/boot/compressed/relocs.c 2008-04-29 21:20:57.000000000 +0400 +++ linux-2.6.git/arch/x86/boot/compressed/relocs.c 2008-05-02 21:38:41.000000000 +0400 @@ -191,7 +191,7 @@ static void read_ehdr(FILE *fp) die("Cannot read ELF header: %s\n", strerror(errno)); } - if (memcmp(ehdr.e_ident, ELFMAG, 4) != 0) { + if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) { die("No ELF magic\n"); } if (ehdr.e_ident[EI_CLASS] != ELFCLASS32) { -- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 3/4] x86: relocs ELF handling - use SELFMAG instead of numeric constant 2008-05-03 10:18 ` [patch 3/4] x86: relocs " Cyrill Gorcunov @ 2008-05-03 21:07 ` Thomas Gleixner 0 siblings, 0 replies; 8+ messages in thread From: Thomas Gleixner @ 2008-05-03 21:07 UTC (permalink / raw) To: Cyrill Gorcunov; +Cc: akpm, hpa, mingo, ralf, linux-kernel On Sat, 3 May 2008, Cyrill Gorcunov wrote: > Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> > --- > > Index: linux-2.6.git/arch/x86/boot/compressed/relocs.c > =================================================================== > --- linux-2.6.git.orig/arch/x86/boot/compressed/relocs.c 2008-04-29 21:20:57.000000000 +0400 > +++ linux-2.6.git/arch/x86/boot/compressed/relocs.c 2008-05-02 21:38:41.000000000 +0400 > @@ -191,7 +191,7 @@ static void read_ehdr(FILE *fp) > die("Cannot read ELF header: %s\n", > strerror(errno)); > } > - if (memcmp(ehdr.e_ident, ELFMAG, 4) != 0) { > + if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) { > die("No ELF magic\n"); > } > if (ehdr.e_ident[EI_CLASS] != ELFCLASS32) { Applied. Thanks, tglx ^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 4/4] MIPS: ELF handling - use SELFMAG instead of numeric constant [not found] <20080503101800.417039810@gmail.com> ` (2 preceding siblings ...) 2008-05-03 10:18 ` [patch 3/4] x86: relocs " Cyrill Gorcunov @ 2008-05-03 10:18 ` Cyrill Gorcunov 2008-05-03 10:35 ` Cyrill Gorcunov 3 siblings, 1 reply; 8+ messages in thread From: Cyrill Gorcunov @ 2008-05-03 10:18 UTC (permalink / raw) To: akpm, hpa, mingo, ralf; +Cc: linux-kernel, gorcunov [-- Attachment #1: mips-elf --] [-- Type: text/plain, Size: 711 bytes --] Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- Index: linux-2.6.git/arch/mips/kernel/vpe.c =================================================================== --- linux-2.6.git.orig/arch/mips/kernel/vpe.c 2008-04-15 23:01:26.000000000 +0400 +++ linux-2.6.git/arch/mips/kernel/vpe.c 2008-05-02 21:40:57.000000000 +0400 @@ -840,7 +840,7 @@ static int vpe_elfload(struct vpe * v) /* Sanity checks against insmoding binaries or wrong arch, 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_EXEC) || !elf_check_arch(hdr) || hdr->e_shentsize != sizeof(*sechdrs)) { -- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 4/4] MIPS: ELF handling - use SELFMAG instead of numeric constant 2008-05-03 10:18 ` [patch 4/4] MIPS: " Cyrill Gorcunov @ 2008-05-03 10:35 ` Cyrill Gorcunov 2008-05-04 16:50 ` Ralf Baechle 0 siblings, 1 reply; 8+ messages in thread From: Cyrill Gorcunov @ 2008-05-03 10:35 UTC (permalink / raw) To: akpm, hpa, mingo, ralf, linux-kernel [Cyrill Gorcunov - Sat, May 03, 2008 at 02:18:04PM +0400] | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | --- | | Index: linux-2.6.git/arch/mips/kernel/vpe.c | =================================================================== | --- linux-2.6.git.orig/arch/mips/kernel/vpe.c 2008-04-15 23:01:26.000000000 +0400 | +++ linux-2.6.git/arch/mips/kernel/vpe.c 2008-05-02 21:40:57.000000000 +0400 | @@ -840,7 +840,7 @@ static int vpe_elfload(struct vpe * v) | | /* Sanity checks against insmoding binaries or wrong arch, | 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_EXEC) | || !elf_check_arch(hdr) | || hdr->e_shentsize != sizeof(*sechdrs)) { | | -- | oops, MIPS was not refreshed by whole. This is a fix. --- From: Cyrill Gorcunov <gorcunov@gmail.com> Subject: MIPS: ELF handling - use SELFMAG instead of numeric constant Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- Index: linux-2.6.git/arch/mips/kernel/vpe.c =================================================================== --- linux-2.6.git.orig/arch/mips/kernel/vpe.c 2008-04-15 23:01:26.000000000 +0400 +++ linux-2.6.git/arch/mips/kernel/vpe.c 2008-05-03 14:28:47.000000000 +0400 @@ -840,7 +840,7 @@ static int vpe_elfload(struct vpe * v) /* Sanity checks against insmoding binaries or wrong arch, 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_EXEC) || !elf_check_arch(hdr) || hdr->e_shentsize != sizeof(*sechdrs)) { @@ -1107,7 +1107,7 @@ static int vpe_release(struct inode *ino return -ENODEV; hdr = (Elf_Ehdr *) v->pbuffer; - if (memcmp(hdr->e_ident, ELFMAG, 4) == 0) { + if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) == 0) { if (vpe_elfload(v) >= 0) { vpe_run(v); } else { ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 4/4] MIPS: ELF handling - use SELFMAG instead of numeric constant 2008-05-03 10:35 ` Cyrill Gorcunov @ 2008-05-04 16:50 ` Ralf Baechle 0 siblings, 0 replies; 8+ messages in thread From: Ralf Baechle @ 2008-05-04 16:50 UTC (permalink / raw) To: Cyrill Gorcunov; +Cc: akpm, hpa, mingo, linux-kernel On Sat, May 03, 2008 at 02:35:58PM +0400, Cyrill Gorcunov wrote: > From: Cyrill Gorcunov <gorcunov@gmail.com> > Date: Sat, 3 May 2008 14:35:58 +0400 > To: akpm@linux-foundation.org, hpa@zytor.com, mingo@elte.hu, > ralf@linux-mips.org, linux-kernel@vger.kernel.org > Subject: Re: [patch 4/4] MIPS: ELF handling - use SELFMAG instead of > numeric constant > Content-Type: text/plain; charset=us-ascii > > [Cyrill Gorcunov - Sat, May 03, 2008 at 02:18:04PM +0400] > | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> > | --- > | > | Index: linux-2.6.git/arch/mips/kernel/vpe.c > | =================================================================== > | --- linux-2.6.git.orig/arch/mips/kernel/vpe.c 2008-04-15 23:01:26.000000000 +0400 > | +++ linux-2.6.git/arch/mips/kernel/vpe.c 2008-05-02 21:40:57.000000000 +0400 > | @@ -840,7 +840,7 @@ static int vpe_elfload(struct vpe * v) > | > | /* Sanity checks against insmoding binaries or wrong arch, > | 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_EXEC) > | || !elf_check_arch(hdr) > | || hdr->e_shentsize != sizeof(*sechdrs)) { > | > | -- > | > oops, MIPS was not refreshed by whole. This is a fix. > --- > > From: Cyrill Gorcunov <gorcunov@gmail.com> > Subject: MIPS: ELF handling - use SELFMAG instead of numeric constant > > Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Applied. Thanks! Ralf ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-05-04 16:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080503101800.417039810@gmail.com>
2008-05-03 10:18 ` [patch 1/4] x86: vdso ELF handling - use SELFMAG instead of numeric constant Cyrill Gorcunov
2008-05-03 21:06 ` Thomas Gleixner
2008-05-03 10:18 ` [patch 2/4] module loading " Cyrill Gorcunov
2008-05-03 10:18 ` [patch 3/4] x86: relocs " Cyrill Gorcunov
2008-05-03 21:07 ` Thomas Gleixner
2008-05-03 10:18 ` [patch 4/4] MIPS: " Cyrill Gorcunov
2008-05-03 10:35 ` Cyrill Gorcunov
2008-05-04 16:50 ` Ralf Baechle
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox