lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 26 Aug 2009 18:24:18 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Jason Baron <jbaron@...hat.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
	x86@...nel.org, lethal@...ux-sh.org, mingo@...e.hu,
	laijs@...fujitsu.com, peterz@...radead.org,
	mathieu.desnoyers@...ymtl.ca, jiayingz@...gle.com,
	mbligh@...gle.com, lizf@...fujitsu.com, jistone@...hat.com,
	tglx@...utronix.de, hpa@...or.com
Subject: Re: [PATCH 2/4] Add NR_syscalls for x86_64

On Wed, Aug 26, 2009 at 12:09:10PM -0400, Jason Baron wrote:
> doesn't quite work, b/c the top of asm-offsets_64.c has a bunch of
> includes, such as:  <linux/sched.h>, which in turn include unistd.h at
> a point in time where asm/asm-offests.h does not exist.
> 
> However, a much simpler version of the previous patch I posted does do
> the trick, below. I hope this version is more palatable?
> 
> thanks,
> 
> -Jason
> 
> Signed-off-by: Jason Baron <jbaron@...hat.com>


Ah yeah, looks good!


> 
> diff --git a/arch/x86/include/asm/unistd_64.h b/arch/x86/include/asm/unistd_64.h
> index 900e161..b9f3c60 100644
> --- a/arch/x86/include/asm/unistd_64.h
> +++ b/arch/x86/include/asm/unistd_64.h
> @@ -688,6 +688,12 @@ __SYSCALL(__NR_perf_counter_open, sys_perf_counter_open)
>  #endif	/* __NO_STUBS */
>  
>  #ifdef __KERNEL__
> +
> +#ifndef COMPILE_OFFSETS
> +#include <asm/asm-offsets.h>
> +#define NR_syscalls (__NR_syscall_max + 1)
> +#endif
> +
>  /*
>   * "Conditional" syscalls
>   *
> diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c
> index 898ecc4..4a6aeed 100644
> --- a/arch/x86/kernel/asm-offsets_64.c
> +++ b/arch/x86/kernel/asm-offsets_64.c
> @@ -3,6 +3,7 @@
>   * This code generates raw asm output which is post-processed to extract
>   * and format the required data.
>   */
> +#define COMPILE_OFFSETS
>  
>  #include <linux/crypto.h>
>  #include <linux/sched.h> 


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ