LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Ingo Molnar <mingo@elte.hu>, pageexec@freemail.hu
Cc: Sam Ravnborg <sam@ravnborg.org>,
	Arjan van de Ven <arjan@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: vmsplice exploits, stack protector and Makefiles
Date: Wed, 13 Feb 2008 07:53:48 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.1.00.0802130749210.2920@woody.linux-foundation.org> (raw)
In-Reply-To: <47B30F05.29637.9A21F9B@pageexec.freemail.hu>


Ingo, 
 if you're merging this, please do the independent parts really 
independenrly. For example, the above is a patch in its own right, and 
probably worth doing regardless of anything else.

(Same goes for the ACPI parts, I'll bounce that part to Len,

			Linus

On Wed, 13 Feb 2008, pageexec@freemail.hu wrote:
>
> diff -u linux-2.6.24.2-pax/arch/x86/kernel/entry_64.S linux-2.6.24.2-pax/arch/x86/kernel/entry_64.S
> --- linux-2.6.24.2-pax/arch/x86/kernel/entry_64.S	2008-01-25 15:34:25.000000000 +0100
> +++ linux-2.6.24.2-pax/arch/x86/kernel/entry_64.S	2008-02-13 11:12:26.000000000 +0100
> @@ -440,6 +440,7 @@
>  	CFI_REGISTER rip, r11
>  	SAVE_REST
>  	FIXUP_TOP_OF_STACK %r11
> +	movq %rsp, %rcx
>  	call sys_execve
>  	RESTORE_TOP_OF_STACK %r11
>  	movq %rax,RAX(%rsp)
> @@ -1004,15 +1005,16 @@
>   *	rdi: name, rsi: argv, rdx: envp
>   *
>   * We want to fallback into:
> - *	extern long sys_execve(char *name, char **argv,char **envp, struct pt_regs regs)
> + *	extern long sys_execve(char *name, char **argv,char **envp, struct pt_regs *regs)
>   *
>   * do_sys_execve asm fallback arguments:
> - *	rdi: name, rsi: argv, rdx: envp, fake frame on the stack
> + *	rdi: name, rsi: argv, rdx: envp, rcx: fake frame on the stack
>   */
>  ENTRY(kernel_execve)
>  	CFI_STARTPROC
>  	FAKE_STACK_FRAME $0
>  	SAVE_ALL	
> +	movq %rsp,%rcx
>  	call sys_execve
>  	movq %rax, RAX(%rsp)	
>  	RESTORE_REST
> diff -u linux-2.6.24.2-pax/arch/x86/kernel/process_64.c linux-2.6.24.2-pax/arch/x86/kernel/process_64.c
> --- linux-2.6.24.2-pax/arch/x86/kernel/process_64.c	2008-01-25 15:34:25.000000000 +0100
> +++ linux-2.6.24.2-pax/arch/x86/kernel/process_64.c	2008-02-13 11:13:14.000000000 +0100
> @@ -702,7 +701,7 @@
>   */
>  asmlinkage 
>  long sys_execve(char __user *name, char __user * __user *argv,
> -		char __user * __user *envp, struct pt_regs regs)
> +		char __user * __user *envp, struct pt_regs *regs)
>  {
>  	long error;
>  	char * filename;
> @@ -711,7 +710,7 @@
>  	error = PTR_ERR(filename);
>  	if (IS_ERR(filename)) 
>  		return error;
> -	error = do_execve(filename, argv, envp, &regs); 
> +	error = do_execve(filename, argv, envp, regs);
>  	if (error == 0) {
>  		task_lock(current);
>  		current->ptrace &= ~PT_DTRACE;

  parent reply	other threads:[~2008-02-13 15:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12 17:00 Arjan van de Ven
2008-02-12 18:50 ` Sam Ravnborg
2008-02-12 19:08   ` Arjan van de Ven
2008-02-12 19:36     ` Sam Ravnborg
2008-02-13 13:38 ` pageexec
2008-02-13 15:29   ` Ingo Molnar
2008-02-13 16:29     ` Randy Dunlap
2008-02-13 15:48       ` pageexec
2008-02-14 12:20         ` Jan Engelhardt
2008-02-13 16:48     ` Ingo Molnar
2008-02-13 16:15       ` pageexec
2008-02-14  6:16         ` Ingo Molnar
2008-02-14  7:30           ` Ingo Molnar
2008-02-14 10:23             ` pageexec
2008-02-13 15:53   ` Linus Torvalds [this message]
2008-02-13 16:01     ` Ingo Molnar
2008-02-13 17:16       ` Sam Ravnborg
2008-02-14  6:12         ` Ingo Molnar
2008-02-14  7:43   ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.1.00.0802130749210.2920@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pageexec@freemail.hu \
    --cc=sam@ravnborg.org \
    --subject='Re: vmsplice exploits, stack protector and Makefiles' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).