08 Mar, 2010
7 commits
-
According to PBP; best way practice is to use local reference for file
handle and three argument open. Also perl prototypes are a mistake.Signed-off-by: Stephen Hemminger
Acked-by: WANG Cong
Cc: Michal Marek
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek -
Use local file handles, use three argument open.
Don't modify arguments in perl grep (use sed instead)Signed-off-by: Stephen Hemminger
Acked-by: WANG Cong
Cc: Michal Marek
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek -
Turn on strict checking.
Simplify code by using "unless" statement.Signed-off-by: Stephen Hemminger
Acked-by: WANG Cong
Cc: Michal Marek
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek -
Use local file handle not global.
Make loop and other variables local in scope.Signed-off-by: Stephen Hemminger
Cc: Hui Zhu
Cc: Cong Wang
Cc: Michal Marek
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek -
Turn on strict checking.
Use three arguement open
Standard practice in perl is to use undef not zero for falseSigned-off-by: Stephen Hemminger
Cc: Cong Wang
Cc: Ralf Baechle
Cc: Michal Marek
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek -
Turn on strict checking.
Use local file handles.
Use three argument open.Signed-off-by: Stephen Hemminger
Cc: Cong Wang
Cc: Michal Marek
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek -
Cleanup checkstack script:
* Turn on strict checking
* Fix resulting error message because the declaration syntax
was incorrect.
* Remove incorrect and misleading use of prototype
- prototype not required for this type of sort function
because $a and $b are being used in this contex
- if prototype was being used it should be for both arguments
* Use closure for sort functionSigned-off-by: Stephen Hemminger
Cc: Steven Rostedt
Cc: Arjan van de Ven
Cc: Cong Wang
Cc: Michal Marek
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek
07 Mar, 2010
1 commit
-
This patch creates the standard md5sums file for 'make deb-pkg' just
like the dh_md5sums debhelper script.Signed-off-by: Jozsef Fejes
Signed-off-by: Michal Marek
03 Mar, 2010
2 commits
-
make ALLSOURCE_ARCHS=all tags
- Document this in kbuild.txt
Without this change you have to type each arch separately.Signed-off-by: John Kacur
Signed-off-by: Michal Marek -
Signed-off-by: John Kacur
Signed-off-by: Michal Marek
22 Feb, 2010
1 commit
-
$ make mrproper
$ make tags
GEN tags
find: `arch/x86_64/': No such file or directoryCaused by commit f81b1be (tags: include headers before source files)
Cc: Guennadi Liakhovetski
Acked-by: WANG Cong
Signed-off-by: Michal Marek
17 Feb, 2010
1 commit
-
Currently looking up a structure definition in TAGS / tags takes one to
one of multiple "static struct X" definitions in arch sources, which makes
it for many structs practically impossible to get to the required header.
This patch changes the order of sources being tagged to first scan
architecture includes, then the top-level include/ directory, and only
then the rest. It also takes into account, that many architectures have
more than one include directory, i.e., not only arch/$ARCH/include, but
also arch/$ARCH/mach-X/include etc.Signed-off-by: Guennadi Liakhovetski
Reviewed-by: WANG Cong
[mmarek@suse.cz: fix 'var+=text' bashism]
Signed-off-by: Michal Marek
06 Feb, 2010
2 commits
-
1. Fix a little format issue.
2. Check the return of "Getopt::Long::GetOptions". Output usage and
exit if it get error.
3. Change $ARGV[$#ARGV] to $ARGV[0].
4. Change the code which get $modulefile from modinfo. Replace the
pipeline with `modinfo -F filename $module`.
4. Change usage from "Specify the module directory name" to "Specify the
module filename".Signed-off-by: Hui Zhu
Signed-off-by: Michal Marek -
The markup_oops.pl have 3 troubles to support cross-compiler environment:
1. It use objdump directly.
2. It use modinfo to get the message of module.
3. It use hex function that cannot support 64-bit number in 32-bit arch.This patch add 3 options to markup_oops.pl:
1. -c CROSS_COMPILE Specify the prefix used for toolchain.
2. -m MODULE_DIRNAME Specify the module directory name.
3. Change hex function to Math::BigInt->from_hex.After this patch, parse the x8664 oops in x86, we can:
cat amd64m | perl ~/kernel/tmp/m.pl -c /home/teawater/kernel/bin/x8664- -m ./e.ko vmlinuxThanks,
HuiSigned-off-by: Hui Zhu
Cc: Andrew Morton
Cc: Arjan van de Ven
Cc: Sam Ravnborg
Cc: ozan@pardus.org.tr
Cc: Matthew Wilcox
Acked-by: WANG Cong
Signed-off-by: Michal Marek
02 Feb, 2010
14 commits
-
Acked-by: Sam Ravnborg
Signed-off-by: Michal Marek -
The mkspec script hardcodes "/var/tmp" into the generated rpm spec file's
BuildRoot. The user, however, may have a custom setting for %_tmppath,
which should be used in BuildRoot. This patch changes mkspec's
BuildRoot output to appropriately use %_tmppath.Signed-off-by: John Saalwaechter
Signed-off-by: Michal Marek -
I got a "No matching code found" when I use markup_oops.pl parse a error
in a x86_64 module.cat e.c
int init_module(void)
{
char *buf = 0;buf[0] = 3;
return 0;
}void cleanup_module(void)
{
//char *buf = 0;//buf[0] = 3;
}MODULE_AUTHOR("Hui Zhu");
MODULE_LICENSE("GPL");0000000000000000 :
init_module():
/home/teawater/study/kernel/stack2core/example/e.c:10
0: c6 04 25 00 00 00 00 movb $0x3,0x0
7: 03
/home/teawater/study/kernel/stack2core/example/e.c:13
8: 31 c0 xor %eax,%eax
a: c3 retq
b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)0000000000000010 :
cleanup_module():
/home/teawater/study/kernel/stack2core/example/e.c:20
10: f3 c3 repz retq
12: 90 nop
13: 90 nop
Disassembly of section .modinfo:This is because the faulting instruction "movb $0x3,0x0" is the first
line of the range.In the markup_oops.pl:
main::(./scripts/markup_oops.pl:245):
245: if (InRange($1, $target)) {
DB p $line
ffffffffa001b000: c6 04 25 00 00 00 00 movb $0x3,0x0
DB p $counter
0It just set $center in next loop. So it cannot get the $center.
And even if $center is set to the right value 0.
if ($center == 0) {
print "No matching code found \n";
exit;
}
The first line $center will be 0, so I change the default value to -1.Signed-off-by: Hui Zhu
Signed-off-by: Michal Marek -
Just a small change to a couple of scripts to go from
#!/usr/bin/env python
to
#!/usr/bin/python
This shouldn't effect anyone, unless they don't install python there.
In preparation for python3, Fedora is doing a big push to change the scripts
to use the system python. This allows developers to put the python3 in
their path without fear of breaking existing scripts.Now I am pretty sure anyone using python3 for testing purposes will probably
not run any of the scripts I changed, but Fedora has this automated tool
that checks for this stuff so I thought I would try to push it upstream.Signed-off-by: Don Zickus
Acked-by: WANG Cong
Acked-by: Jarod Wilson
Signed-off-by: Michal Marek -
Suppress a warn_unused_result warning.
fgets is called as a part of error handling. It is called just to drop a
line and return immediately. read_map is reading the file in a loop and
read_symbol reads line by line. So I think there is no point in using
return value for useful checking. Other checks like 3 items were returned
or !EOF have already been done.Signed-off-by: Himanshu Chauhan
Cc: WANG Cong
Cc: Michal Marek
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek -
Don't test for /bin/{dnsdomainname,domainname}, simply try to execute
the command and check if it returned something.Reported-by: Glenn Sommer
Acked-by: WANG Cong
Tested-by: Glenn Sommer
Signed-off-by: Michal Marek -
While looking for something else I noticed that the symbol
hash function used by kconfig is quite poor. It doesn't
use any of the standard hash techniques but simply
adds up the string and then uses power of two masking,
which is both known to perform poorly.The current x86 kconfig has over 7000 symbols.
When I instrumented it showed that the minimum hash chain
length was 16 and a significant number of them was over
30.It didn't help that the hash table size was only 256 buckets.
This patch increases the hash table size to a larger prime
and switches to a FNV32 hash. I played around with a couple of hash
functions, but that one seemed to perform best with reasonable
hash table sizes.Increasing the hash table size even further didn't
seem like a good idea, because there are a couple of global
walks which walk the complete hash table.I also moved the unnamed bucket to 0. It's still the longest
of all the buckets (44 entries), but hopefully it's not
often hit except for the global walk which doesn't care.The result is a much nicer distribution:
(first column bucket length, second number of buckets with that length)1: 3505
2: 1236
3: 294
4: 52
5: 3
47: 1
Signed-off-by: Michal Marek -
This patch fixes two problems reported by Jan Engelhardt:
1) Border is now properly placed, to always be visible
2) Long menu items are properly displayedReported-by: Jan Engelhardt
Signed-off-by: Nir Tzachar
Signed-off-by: Michal Marek -
scripts/kconfig/nconf.gui.c:23: warning: no previous prototype for 'set_normal_colors'
scripts/kconfig/nconf.gui.c:68: warning: no previous prototype for 'normal_color_theme'
scripts/kconfig/nconf.gui.c:100: warning: no previous prototype for 'no_colors_theme'
scripts/kconfig/nconf.c:455: warning: no previous prototype for 'process_special_keys'
scripts/kconfig/nconf.c:487: warning: no previous prototype for 'get_next_hot'
scripts/kconfig/nconf.c:506: warning: no previous prototype for 'canbhot'
scripts/kconfig/nconf.c:514: warning: no previous prototype for 'is_hot'
scripts/kconfig/nconf.c:522: warning: no previous prototype for 'make_hot'
scripts/kconfig/nconf.c:582: warning: no previous prototype for 'item_make'
scripts/kconfig/nconf.c:626: warning: no previous prototype for 'item_add_str'
scripts/kconfig/nconf.c:656: warning: no previous prototype for 'item_tag'
scripts/kconfig/nconf.c:668: warning: no previous prototype for 'curses_item_index'
scripts/kconfig/nconf.c:673: warning: no previous prototype for 'item_data'
scripts/kconfig/nconf.c:684: warning: no previous prototype for 'item_is_tag'
scripts/kconfig/nconf.c:691: warning: no previous prototype for 'set_config_filename'Signed-off-by: Michal Marek
-
This patch was inspired by the kernel projects page, where an ncurses
replacement for menuconfig was mentioned (by Sam Ravnborg).Building on menuconfig, this patch implements a more modern look
interface using ncurses and ncurses' satellite libraries (menu, panel,
form). The implementation does not depend on lxdialog, which is
currently distributed with the kernel.Signed-off-by: Nir Tzachar
Signed-off-by: Michal Marek -
It is the last place when the file is read, so close it.
Signed-off-by: Alexander Beregalov
Signed-off-by: Michal Marek -
Help text for certain config options is very extensive (the text
includes the names of all other options the option in question depends
on). Long lines are not wrapped, making it impossible to see the list
without scrolling horizontally.This patch adds some logic which wraps help screen lines at word
boundaries to prevent truncating.Tested by running
ARCH=powerpc make menuconfig O=/tmp/build
which shows that the long lines are now wrapped, and
ARCH=powerpc make xconfig O=/tmp/build
to demonstrate that it still compiles and operates as expected.
Signed-off-by: Vadim Bendebury
Signed-off-by: Michal Marek -
This patch adds support for decoding ARM oopses to scripts/decodecode.
The following things are handled:- ARCH and CROSS_COMPILE environment variables are respected.
- The Code: in x86 oopses is in bytes, while it is in either words (4
bytes) or halfwords for ARM.- Some versions of ARM objdump refuse to disassemble instructions
generated by literal constants (".word 0x..."). The workaround is to
strip the object file first.- The faulting instruction is marked (liked so) in ARM, but
in x86.- ARM mnemonics may include characters such as [] which need to be
escaped before being passed to sed for the "
Signed-off-by: Michal Marek -
This patch fixes the link error "built-in.o: no such file or directory".
The problem happens if "dirx/Makefile" contains only "obj-m += diry/
dirz/" and the empty "dirx/built-in.o" is missing. Adding $(subdir-m)
into check for builtin-target fixes this error.Signed-off-by: Jiafu He
Signed-off-by: Michal Marek
31 Jan, 2010
4 commits
-
Signed-off-by: Uwe Kleine-König
-
Signed-off-by: Uwe Kleine-König
-
Signed-off-by: Uwe Kleine-König
-
This prepares having a per-check whitelist of symbol names.
Signed-off-by: Uwe Kleine-König
30 Jan, 2010
3 commits
-
Signed-off-by: Uwe Kleine-König
-
Signed-off-by: Uwe Kleine-König
-
Either the functions referred to in a driver struct should live in
.devinit or the driver should be registered using platform_driver_probe
(or equivalent for different driver types) with ->probe being NULL.Signed-off-by: Uwe Kleine-König
18 Jan, 2010
1 commit
-
The sym_is() compares a symbol in an attempt to automatically skip symbol
prefixes. It does this first by searching the real symbol with the normal
unprefixed symbol. But then it uses the length of the original symbol to
check the end of the substring instead of the length of the symbol it is
looking for. On non-prefixed arches, this is effectively the same thing,
so there is no problem. On prefixed-arches, since this is exceeds by just
one byte, a crash is rare and it is usually a NUL byte anyways. But every
once in a blue moon, you get the right page alignment and it segfaults.For example, on the Blackfin arch, sym_is() will be called with the real
symbol "___mod_usb_device_table" as "symbol" when looking for the normal
symbol "__mod_usb_device_table" as "name". The substring will thus return
one byte into "symbol" and store it into "match". But then "match" will
be indexed with the length of "symbol" instead of "name" and so we will
exceed the storage. i.e. the code ends up doing:
char foo[] = "abc"; return foo[strlen(foo)+1] == '\0';Signed-off-by: Mike Frysinger
Signed-off-by: Rusty Russell
Signed-off-by: Linus Torvalds
17 Jan, 2010
2 commits
-
…nel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
tracing/filters: Add comment for match callbacks
tracing/filters: Fix MATCH_FULL filter matching for PTR_STRING
tracing/filters: Fix MATCH_MIDDLE_ONLY filter matching
lib: Introduce strnstr()
tracing/filters: Fix MATCH_END_ONLY filter matching
tracing/filters: Fix MATCH_FRONT_ONLY filter matching
ftrace: Fix MATCH_END_ONLY function filter
tracing/x86: Derive arch from bits argument in recordmcount.pl
ring-buffer: Add rb_list_head() wrapper around new reader page next field
ring-buffer: Wrap a list.next reference with rb_list_head() -
When I try to use markup_oops.pl in x86, I always get:
cat 1 | perl markup_oops.pl ./vmlinux
objdump: --start-address: bad number: NaN
No matching code foundThis is because in line:
if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/[a-f0-9]/) {
$function = $1;
$func_offset = $2;
}$func_offset will get a number like "0x2"
But in follow code:
my $decodestart = Math::BigInt->from_hex("0x$target") -
Math::BigInt->from_hex("0x$func_offset");It add other ox to ox2. Then this value will be set to NaN.
So I made a small patch to fix it.
Signed-off-by: Hui Zhu
Acked-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Jan, 2010
2 commits
-
In an x86 build with CONFIG_KERNEL_LZMA enabled and dash as sh,
arch/x86/boot/compressed/vmlinux.bin.lzma ends with
'\xf0\x7d\x39\x00' (16 bytes) instead of the 4 bytes intended and
the resulting vmlinuz fails to boot. This improves on the
previous behavior, in which the file contained the characters
'-ne ' as well, but not by much.Previous commits replaced "echo -ne" first with "/bin/echo -ne",
then "printf" in the hope of improving portability, but none of
these commands is guaranteed to support hexadecimal escapes on
POSIX systems. So use the shell to convert from hexadecimal to
octal.With this change, an LZMA-compressed kernel built with dash as sh
boots correctly again.Reported-by: Sebastian Dalfuß
Reported-by: Oliver Hartkopp
Reported-by: Michael Guntsche
Signed-off-by: Jonathan Nieder
Cc: Michael Tokarev
Cc: Alek Du
Cc: Andrew Morton
Signed-off-by: Michal Marek -
Maybe this will stop people emailing me about it.
Signed-off-by: Dave Jones
Signed-off-by: Linus Torvalds