Re: Please revert git commit 1ad3dcc0



Linus Torvalds wrote:
Side note: this would be a valid argument, except it's not always true. I'm not sure why Luke wanted the fd in the first place, though, and whether we want it.

The only reason was a failed LTP testcase which fills up the FD table and then called exec.

Some loaders may actually want the fd value, see for example themisc loader and MISC_FMT_OPEN_BINARY, and the ELF loader _does_ actually do it for the (interpreter_type == INTERPRETER_AOUT) case.

The flat loader does not need a FD value.

Before the change, we didn't allocate or install a file descriptor, hence
there wasn't any reason to return EMFILE. The spec at
http://www.opengroup.org/onlinepubs/009695399/functions/exec.html
doesn't list EMFILE as a possible error.

Totally irrelevant.

I think it is relevant: if the spec does not require it, and the flat loader does not need the FD, then there is no reason to return EMFILE. Both conditions are true in this case. If the spec did require it, then that would be an argument that the LTP testcase is valid, and for keeping the original patch.


Bernd
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Enumerating 32-bit modules from 32-bit processes in WOW64
    ... I seem to recall the behavior of the loader has always been as described ... for a reason that would take a long time ... > the original IA-64 release? ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Detecting OS loader lock
    ... For the same reason it would be very nice to either ... get the loader lock's state, or a "try" version of critical APIs like ... entries in the event log, the service runs, everything looks ok -> hmm why ...
    (microsoft.public.win32.programmer.kernel)
  • Re: [ANNOUNCE] Release Digsig 1.5: kernel module for run-timeauthentication of binaries
    ... you don't sign nor need to sign perl or bash scripts. ... Why would a loader ... be written in ELF itself? ... There's absolutely no reason for that. ...
    (Linux-Kernel)
  • Re: PXE Loader register dump
    ... > Building the boot loader arguments ... > Relocating the loader and the BTX ... the BIOS executed a breakpoint for some reason: ... like it is supposed to just keep going when it hits a breakpoint. ...
    (freebsd-current)
  • Re: PXE Loader register dump
    ... > Building the boot loader arguments ... > Relocating the loader and the BTX ... the BIOS executed a breakpoint for some reason: ... like it is supposed to just keep going when it hits a breakpoint. ...
    (freebsd-current)