Skip to contentSkip to conversation

binfmt_elf force_sig arguments fix

PATCH Applied Horms 2 participants 2 messages Dec 21, 2004

lore
Share & tools
lore

Horms

author
#0 lore raw

PATCH 1/1 binfmt_elf force_sig arguments fix

Hi,

There appears to be a small error in the change that was recently applied to fs/binfmt_elf.c to fix error codes and eraly corrupt binary detection.

The patch includes changing a send_sig() call to a force_sig() call in load_elf_binary(). However force_sig() only accepts 2 arguments, and thus the patch causes the build to fail.

I propose the following patch to simply remove the extra argument to force_sig(), which I beleive will give a sensible result. That or change the call back to send_sig(), though I assume it was changed to force_sig() for a reason.

Signature · 14 lines
Horms

===== fs/binfmt_elf.c 1.36 vs edited =====
--- 1.36/fs/binfmt_elf.c	2004-12-18 03:17:46 +09:00
+++ edited/fs/binfmt_elf.c	2004-12-21 21:21:25 +09:00
@@ -806,7 +806,7 @@
 		if (BAD_ADDR(elf_entry)) {
 			printk(KERN_ERR "Unable to load interpreter %.128s\n",
 				elf_interpreter);
-			force_sig(SIGSEGV, current, 0);
+			force_sig(SIGSEGV, current);
 			retval = -ENOEXEC; /* Nobody gets to see this, but.. */
 			goto out_free_dentry;
 		}
#1 lore raw
Quoted 6 lines · Horms

Hi,

There appears to be a small error in the change that was recently applied to fs/binfmt_elf.c to fix error codes and eraly corrupt binary detection.

Quoted 8 lines

The patch includes changing a send_sig() call to a force_sig() call in load_elf_binary(). However force_sig() only accepts 2 arguments, and thus the patch causes the build to fail.

I propose the following patch to simply remove the extra argument to force_sig(), which I beleive will give a sensible result. That or change the call back to send_sig(), though I assume it was changed to force_sig() for a reason.

Applied, thanks.

Quoted 15 lines
Signature · 3 lines
Horms

===== fs/binfmt_elf.c 1.36 vs edited =====
fs/binfmt_elf.c +1 -1
@@ -806,7 +806,7 @@
 		if (BAD_ADDR(elf_entry)) {
 			printk(KERN_ERR "Unable to load interpreter %.128s\n",
 				elf_interpreter);
-			force_sig(SIGSEGV, current, 0);
+			force_sig(SIGSEGV, current);
 			retval = -ENOEXEC; /* Nobody gets to see this, but.. */
 			goto out_free_dentry;
 		}