Re: exec_elf.c: mistake ?

2013-10-05 Thread Philip Guenther
On Thu, 15 Aug 2013, Maxime Villard wrote: > Hum hum, after investigating a bit, and from what I understood - if I'm > not mistaken, I think it would make sense if bdiff was set to > > bdiff = ph->p_vaddr - trunc_page(ph->p_vaddr); Yep. > Since we are supposed to align only on 2^n boundari

Re: [PATCH] ELF: ensure PT_INTERP strings are NULL-terminated

2013-10-05 Thread Kenneth R Westerback
On Sat, Oct 05, 2013 at 03:22:36PM -0600, Todd C. Miller wrote: > On Wed, 28 Aug 2013 22:34:26 -0400, Kenneth R Westerback wrote: > > > > @@ -552,11 +552,16 @@ ELFNAME2(exec,makecmds)(struct proc *p, > > > > > > for (i = 0, pp = ph; i < eh->e_phnum; i++, pp++) { > > > if (pp->p_type

Re: [PATCH] ELF: ensure PT_INTERP strings are NULL-terminated

2013-10-05 Thread Todd C. Miller
On Wed, 28 Aug 2013 22:34:26 -0400, Kenneth R Westerback wrote: > > @@ -552,11 +552,16 @@ ELFNAME2(exec,makecmds)(struct proc *p, > > > > for (i = 0, pp = ph; i < eh->e_phnum; i++, pp++) { > > if (pp->p_type == PT_INTERP && !interp) { > > - if (pp->p_filesz >=

Re: Fix error code for ELF

2013-10-05 Thread Todd C. Miller
That looks reasonable to me. I can't think of a reason to not return the proper errno values, especially as things like ENOMEM are already documented for execve(2). - todd

Re: Fix error code for ELF

2013-10-05 Thread Maxime Villard
Since I don't get any answer, I guess I have not been convincing enough. Here is the deal: a) It is obvious that there's an inconsistency: 'error' is almost always set before goto bad. b) Beyond the fact that it is obvious: if you have a look at this function, you will see that there are

Re: [PATCH] ELF: ensure PT_INTERP strings are NULL-terminated

2013-10-05 Thread Maxime Villard
up, please Le 28/08/2013 21:43, Maxime Villard a écrit : > On 08/28/13 20:57, Matthew Dempsky wrote: >> On Wed, Aug 28, 2013 at 5:54 AM, Maxime Villard wrote: >>> + /* Ensure interp is a valid, NUL-terminated string >>> */ >>> + for (n = 0; n < pp->p_

Re: threaded prof signals

2013-10-05 Thread Philip Guenther
On Sat, Oct 5, 2013 at 5:52 AM, Mark Kettenis wrote: >> Date: Thu, 3 Oct 2013 18:12:59 -0700 >> From: Philip Guenther ... >> @@ -196,11 +167,15 @@ hardclock(struct clockframe *frame) >>*/ >> if (CLKF_USERMODE(frame) && >> timerisset(&pr->ps_timer[IT

Re: threaded prof signals

2013-10-05 Thread Joel Sing
On Fri, 4 Oct 2013, Philip Guenther wrote: > On Fri, 16 Aug 2013, Ted Unangst wrote: > > As per http://research.swtch.com/macpprof > > > > We deliver all prof signals to the main thread, which is unlikely to > > result in accurate profiling info. I think the diff below fixes things. > > How about w

Re: Allwinner

2013-10-05 Thread Jonathan Gray
On Sat, Oct 05, 2013 at 03:58:39PM +0300, Artturi Alm wrote: > awe0: address 92:1f:3d:86:69:10 > ukphy0 at awe0 phy 1: Generic IEEE 802.3u media interface, rev. 1: > OUI 0x20, model 0x0020 That is an RTL8201L compatible PHY which would be handled by rlphy(4) if you had it in your config.

Allwinner

2013-10-05 Thread Artturi Alm
Current version attached, extract to /sys/arch/armv7 and read the short notes file, no more out of allwinner/ patches needed thanks to armv7. A20 support still needs a workaround under /sys/arch/arm/cortex/ which i didn't include as i think support is still 'subtly' broken anyway.. And ahci is st

Re: threaded prof signals

2013-10-05 Thread Mark Kettenis
> Date: Thu, 3 Oct 2013 18:12:59 -0700 > From: Philip Guenther > > On Fri, 16 Aug 2013, Ted Unangst wrote: > > As per http://research.swtch.com/macpprof > > > > We deliver all prof signals to the main thread, which is unlikely to > > result in accurate profiling info. I think the diff below fixe

Re: threaded prof signals

2013-10-05 Thread Todd C. Miller
Setting a flag seems more straighforward than (ab)using timeouts for this. psignal() is a rather complicated function but I don't see any problems offhand with running it from userret(). - todd