Error case in execve_wrapper?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Helge,

In arch/parisc/kernel/entry.S (execve_wrapper) we have this code:

        BL \execve,%r2
        copy %r1,%arg0

        ldo -FRAME_SIZE(%r30),%r30
        LDREG -RP_OFFSET(%r30),%r2

        /* If exec succeeded we need to load the args */

        ldo -1024(%r0),%r1
        cmpb,>>= %r28,%r1,error_\execve
        copy %r2,%r19

error_\execve:
        bv %r0(%r19)
        nop
        .endm

Why does this wrapper check the result of execve?

The cmpb has no nullification, therefore it always copies the return
pointer into r19, and we branch back to the syscall return path. IMO
checking the result of the syscall is not useful, since everything
should already be setup such that the normal restore process returns
to the newly exec'd process.

Comments?

Cheers,
Carlos.
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux