Re: [ANNOUNCE] WOLK v4.15s FINAL - Server Edition (aka get the 2.6 feeling with 2.4 :p)
Marc-Christian Petersen <[email protected]> Wed, 30 Jun 2004 15:12:11 +0200
| Newsgroups | gmane.linux.wolk.devel |
|---|---|
| Organization | Working Overloaded Linux Kernel |
| Message-ID | <200406301512.11979@WOLK> |
--Boundary-00=_rwr4AQgrnKY9xy4
Content-Type: text/plain;
charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Wednesday 30 June 2004 03:36, Gary Peck wrote:
Hi Gary,
> I guess I could, but it should really work with gcc 2.95.4. I've been
> using that version to compile all the WOLK releases and it's worked
> fine. 2.95.4 is still considered the stable compiler on Debian.
> Furthermore, this is a production system, so I'd like to keep the number
> of things I change to a minimum (though the 4.15s changelog is
> definitely challenging that :) ).
I see the problem. I forgot to adapt RANDEXEC to UML skas3. I forgot it
basically because RANDEXEC is broken since the very first beginning of WOLK
because of rmap. If you use paxtest and have RANDEXEC enabled, you'll get a
BUG() and a freeze shortly after the BUG().
Attached patch should fix compilation problems.
Please tell me where I have to send the beer.
ciao, Marc
--Boundary-00=_rwr4AQgrnKY9xy4
Content-Type: text/x-diff;
charset="iso-8859-15";
name="bla.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="bla.patch"
--- old/fs/binfmt_elf.c 2004-06-29 13:29:05.000000000 +0200
+++ new/fs/binfmt_elf.c 2004-06-30 15:07:52.000000000 +0200
@@ -105,7 +105,7 @@ static void set_brk(unsigned long start,
#ifdef CONFIG_GRKERNSEC_PAX_RANDEXEC
if (current->flags & PF_PAX_RANDEXEC)
- __do_mmap_pgoff(NULL, ELF_PAGEALIGN(start + current->mm->delta_exec), 0UL, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED | MAP_MIRROR, start);
+ __do_mmap_pgoff(current->mm, NULL, ELF_PAGEALIGN(start + current->mm->delta_exec), 0UL, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED | MAP_MIRROR, start);
#endif
}
@@ -983,7 +983,7 @@ static int load_elf_binary(struct linux_
if (len > SEGMEXEC_TASK_SIZE || addr > SEGMEXEC_TASK_SIZE-len)
continue;
down_write(¤t->mm->mmap_sem);
- error = __do_mmap_pgoff(bprm->file, addr, len, elf_prot, elf_flags, (elf_ppnt->p_offset - ELF_PAGEOFFSET(elf_ppnt->p_vaddr)) >> PAGE_SHIFT);
+ error = __do_mmap_pgoff(current->mm, bprm->file, addr, len, elf_prot, elf_flags, (elf_ppnt->p_offset - ELF_PAGEOFFSET(elf_ppnt->p_vaddr)) >> PAGE_SHIFT);
up_write(¤t->mm->mmap_sem);
}
#endif
@@ -1011,14 +1011,14 @@ static int load_elf_binary(struct linux_
#ifdef CONFIG_GRKERNSEC_PAX_SEGMEXEC
if (current->flags & PF_PAX_SEGMEXEC) {
if (elf_prot & PROT_EXEC) {
- load_addr_random = __do_mmap_pgoff(NULL, ELF_PAGESTART(load_bias_random + vaddr), elf_ppnt->p_memsz + ELF_PAGEOFFSET(elf_ppnt->p_vaddr), PROT_NONE, MAP_PRIVATE | MAP_FIXED, 0UL);
+ load_addr_random = __do_mmap_pgoff(current->mm, NULL, ELF_PAGESTART(load_bias_random + vaddr), elf_ppnt->p_memsz + ELF_PAGEOFFSET(elf_ppnt->p_vaddr), PROT_NONE, MAP_PRIVATE | MAP_FIXED, 0UL);
if (!BAD_ADDR(load_addr_random)) {
- load_addr_random = __do_mmap_pgoff(NULL, ELF_PAGESTART(load_bias_random + vaddr + SEGMEXEC_TASK_SIZE), 0UL, elf_prot, elf_flags | MAP_MIRROR, error);
+ load_addr_random = __do_mmap_pgoff(current->mm, NULL, ELF_PAGESTART(load_bias_random + vaddr + SEGMEXEC_TASK_SIZE), 0UL, elf_prot, elf_flags | MAP_MIRROR, error);
if (!BAD_ADDR(load_addr_random))
load_addr_random -= SEGMEXEC_TASK_SIZE;
}
} else
- load_addr_random = __do_mmap_pgoff(NULL, ELF_PAGESTART(load_bias_random + vaddr), 0UL, elf_prot, elf_flags | MAP_MIRROR, error);
+ load_addr_random = __do_mmap_pgoff(current->mm, NULL, ELF_PAGESTART(load_bias_random + vaddr), 0UL, elf_prot, elf_flags | MAP_MIRROR, error);
}
#endif
--Boundary-00=_rwr4AQgrnKY9xy4--
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
WOLK - Working Overloaded Linux Kernel
[email protected]
https://lists.sourceforge.net/lists/listinfo/wolk-devel