Bug 81670 - [patch] linux_execve return wrong value (i386)
Summary: [patch] linux_execve return wrong value (i386)
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-30 14:40 UTC by andrew bliznak
Modified: 2005-08-01 18:38 UTC (History)
0 users

See Also:


Attachments
file.diff (643 bytes, patch)
2005-05-30 14:40 UTC, andrew bliznak
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description andrew bliznak 2005-05-30 14:40:01 UTC
Return value from linux_execve syscall now lost due following changes
in rev. 1.46 src/sys/i386/linux/linux_machdep.c, and linux programs
fail when use execvp(3) and executed binary not in first path elemen
of $PATH :
[ snip ]
-       bsd.fname = args->path;
-       bsd.argv = args->argp;
-       bsd.envv = args->envp;
-       return (execve(td, &bsd));
+       error = exec_copyin_args(&eargs, newpath, UIO_SYSSPACE,
+           args->argp, args->envp);
+       free(newpath, M_TEMP);
+       if (error == 0)
+               kern_execve(td, &eargs, NULL);
+       exec_free_args(&eargs);
+       return (error);
 }
[ ...]

Fix: I'm use following patch locally :
How-To-Repeat: Prepped some garbage to $PATH and try to run various linux progs. (tar make=
 ...)
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2005-06-01 08:32:49 UTC
Responsible Changed
From-To: gnats-admin->freebsd-bugs

Attemmpt to reformat and rescue this PR from the 'pending' category.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2005-07-23 02:53:45 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-emulation

Bug in the emulation code.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2005-07-25 21:21:28 UTC
Responsible Changed
From-To: freebsd-emulation->emulation

Canonicalize assignment.
Comment 4 Maxim Sobolev freebsd_committer freebsd_triage 2005-08-01 18:38:12 UTC
State Changed
From-To: open->closed

Fix committed, thank you very much for submission!