Re: how to tell i386 from x86-64 kernel

Previous thread: Re: PROBLEM REMAINS: [sata_nv ADMA breaks ATAPI] Crash on accessing DVD-RAM by Robert Hancock on Thursday, January 31, 2008 - 8:09 pm. (5 messages)

Next thread: kill misleading comments in trampoline_*.S by Pavel Machek on Thursday, January 31, 2008 - 8:54 pm. (25 messages)
To: <linux-kernel@...>
Cc: <netfilter-devel@...>
Date: Wednesday, January 2, 2008 - 11:57 am

CC: netfilter-devel@vger.kernel.org
Signed-off-by: Soren Hansen <soren@ubuntu.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Ben Collins <ben.lcollins@canonical.com>
---
include/linux/netfilter/Kbuild | 2 ++
include/linux/netfilter_ipv6/Kbuild | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild
index 3aff513..3a04da3 100644
--- a/include/linux/netfilter/Kbuild
+++ b/include/linux/netfilter/Kbuild
@@ -31,6 +31,8 @@ header-y += xt_multiport.h
header-y += xt_owner.h
header-y += xt_pkttype.h
header-y += xt_rateest.h
+header-y += xt_policy.h
+header-y += xt_quota.h
header-y += xt_realm.h
header-y += xt_sctp.h
header-y += xt_state.h
diff --git a/include/linux/netfilter_ipv6/Kbuild b/include/linux/netfilter_ipv6/Kbuild
index 8887a5f..aca4bd1 100644
--- a/include/linux/netfilter_ipv6/Kbuild
+++ b/include/linux/netfilter_ipv6/Kbuild
@@ -11,6 +11,7 @@ header-y += ip6t_length.h
header-y += ip6t_limit.h
header-y += ip6t_mac.h
header-y += ip6t_mark.h
+header-y += ip6t_mh.h
header-y += ip6t_multiport.h
header-y += ip6t_opts.h
header-y += ip6t_owner.h
--
1.5.4.3

--

To: kernel list <linux-kernel@...>, <jikos@...>
Date: Thursday, January 31, 2008 - 8:42 pm

Hi!

Quiz: on a booted system, how do you tell 32bit from 64bit kernel?

A1: zcat /proc/config.gz | grep CONFIG_64

...but config.gz is optional

A2: cat /proc/meminfo | grep High

...but i386 kernel could have highmem disabled

What is _your_ answer? ;-)>
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--

To: Tim Gardner <tim.gardner@...>
Cc: <linux-kernel@...>, <netfilter-devel@...>
Date: Tuesday, July 22, 2008 - 6:45 am

xt_policy.h is already included in unidef-y. The others look fine.

--

To: Tim Gardner <tim.gardner@...>
Cc: <linux-kernel@...>, <netfilter-devel@...>
Date: Tuesday, July 22, 2008 - 4:55 am

They are not needed for iptables, which has its own copy of
the headers.
--

To: Pavel Machek <pavel@...>
Cc: kernel list <linux-kernel@...>, <jikos@...>
Date: Friday, February 1, 2008 - 12:51 am

uname -m

-hpa
--

To: H. Peter Anvin <hpa@...>
Cc: Pavel Machek <pavel@...>, kernel list <linux-kernel@...>
Date: Friday, February 1, 2008 - 6:07 am

I think that the real point here is that there is no general way how to
determine whether the kernel is 32bit or 64bit from full dmesg output,
which could sometimes make debugging user-reported bugs a little bit
harder.

--
Jiri Kosina
SUSE Labs
--

To: Pavel Machek <pavel@...>
Cc: kernel list <linux-kernel@...>, <jikos@...>
Date: Thursday, January 31, 2008 - 8:46 pm

Uhm, is this a trick question? What's wrong with uname(2)?
--

To: Ray Lee <ray-lk@...>
Cc: kernel list <linux-kernel@...>, <jikos@...>
Date: Thursday, January 31, 2008 - 9:03 pm

No, it is a tricky question. You are right, uname -a tells me. Sorry.

Still, it would be nice to print it as a first message of dmesg, so
that it automatically gets included with problem reports... on
easy-to-see place.

Pavel

Linux version 2.6.24-rc8 (pavel@amd) (gcc version 4.1.3 20071209 (prerelease) (Debian 4.1.2-18)) #65 SMP Thu Jan 31 00:02:37 CET 2008
BIOS-provided physical RAM map:

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--

To: Ray Lee <ray-lk@...>
Cc: Pavel Machek <pavel@...>, kernel list <linux-kernel@...>, <jikos@...>
Date: Thursday, January 31, 2008 - 8:59 pm

# uname -m
I won't tell you.
# linux32 uname -m
i686

Now what? :-)

Well, the answer is simple, a 64-bit kernel will allow you
(minus selinux voodoo) to load 64-bit binaries.
--

To: Jan Engelhardt <jengelh@...>
Cc: Ray Lee <ray-lk@...>, Pavel Machek <pavel@...>, kernel list <linux-kernel@...>, <jikos@...>
Date: Friday, February 1, 2008 - 7:53 am

El Fri, 1 Feb 2008 01:59:03 +0100 (CET)

Ubuntu 7.10 64 bit userland 2.6.24

$ uname -m
x86_64
$ linux32 uname -m
--

To: Alejandro Riveira <ariveira@...>
Cc: Ray Lee <ray-lk@...>, Pavel Machek <pavel@...>, kernel list <linux-kernel@...>, <jikos@...>
Date: Saturday, February 9, 2008 - 4:13 pm

What I am saying is that uname(2) does not reliably tell you whether you
have a 64-bit kernel underneath unless you have other sources of
information.
--

To: Jan Engelhardt <jengelh@...>
Cc: Alejandro Riveira <ariveira@...>, Ray Lee <ray-lk@...>, Pavel Machek <pavel@...>, kernel list <linux-kernel@...>, <jikos@...>
Date: Saturday, February 9, 2008 - 6:34 pm

On Sat, 9 Feb 2008 21:13:43 +0100 (CET)

that's sort of a rabbit-and-the-frog problem. The 32 bit emulator tries to
look EXACTLY like the 32 bit kernel, and it really should.
If someone wants a method to detect even that... we would really want
to know the exact usecase.. because very likely it's the wrong answer
to some other problem ;-)

--
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--

To: Arjan van de Ven <arjan@...>
Cc: Jan Engelhardt <jengelh@...>, Alejandro Riveira <ariveira@...>, Ray Lee <ray-lk@...>, kernel list <linux-kernel@...>, <jikos@...>
Date: Saturday, February 9, 2008 - 9:27 pm

dmesg should really really tell you 32 vs. 64 bit, at the first line
where it prints versions... so you easily know what you are dealing
with when someone sends a bugreport.

Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--

Previous thread: Re: PROBLEM REMAINS: [sata_nv ADMA breaks ATAPI] Crash on accessing DVD-RAM by Robert Hancock on Thursday, January 31, 2008 - 8:09 pm. (5 messages)

Next thread: kill misleading comments in trampoline_*.S by Pavel Machek on Thursday, January 31, 2008 - 8:54 pm. (25 messages)