* Re: [PATCH 1/3] Make struct jprobe.entry a void *
From: Ananth N Mavinakayanahalli @ 2007-06-26 3:51 UTC (permalink / raw)
To: Michael Ellerman
Cc: linux-arch, Andrew Morton, linux-ia64, linux-kernel,
anil.s.keshavamurthy, linuxppc-dev, Christoph Hellwig
In-Reply-To: <78935473b1f70c863ab0be7d6cf4bcb04922b20b.1182822366.git.michael@ellerman.id.au>
On Tue, Jun 26, 2007 at 11:48:50AM +1000, Michael Ellerman wrote:
> Currently jprobe.entry is a kprobe_opcode_t *, but that's a lie. On some
> platforms it doesn't point to an opcode at all, it points to a function
> descriptor.
>
> It's really a pointer to something that the arch code can turn into a
> function entry point. And that's what actually happens, none of the
> generic code ever looks at jprobe.entry, it's only ever dereferenced
> by arch code.
>
> So just make it a void *.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Tested on powerpc. Ack to all three patches plus Andrew's declaration
fixup.
Thanks Michael for the patches.
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> ---
>
> It isn't obvious where kprobes patches should go, is anyone "the" maintainer?
> Instead I've just sent this to everyone who'd touched the code lately, or
> might be otherwise interested.
>
>
> include/linux/kprobes.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
> index 23adf60..f4e53b7 100644
> --- a/include/linux/kprobes.h
> +++ b/include/linux/kprobes.h
> @@ -116,7 +116,7 @@ struct kprobe {
> */
> struct jprobe {
> struct kprobe kp;
> - kprobe_opcode_t *entry; /* probe handling code to jump to */
> + void *entry; /* probe handling code to jump to */
> };
>
> DECLARE_PER_CPU(struct kprobe *, current_kprobe);
> --
> 1.5.1.3.g7a33b
^ permalink raw reply
* Re: dtc: Improve and better integrate dtc and libfdt Makefiles
From: Jon Loeliger @ 2007-06-26 2:51 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
In-Reply-To: <20070626024551.GG4383@localhost.localdomain>
So, like, the other day David Gibson mumbled:
> This patch substantially revamps the dtc Makefiles, in particular
> better integrating the Makefile for dtc proper with the Makefiles
> imported from libfdt for libfdt and the shared testsuite. Notable
> changes:
> - No recursive make calls. Instead subsidiary Makefiles are
> included into the top-level Makefile so we get a complete dependency
> information.
> - Common pattern rules, CFLAGS etc. shared between dtc, libfdt
> and testsuite, rather than separate copies.
> - Vaguely Kbuild-like non-verbose mode used by default, which
> makes warnings more prominent.
> - libfdt Makefile consists only of variable definitions and
> helper rules, to make it more easily embeddable into other Makefile
> systems.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
I like.
Applied.
Thanks!
jdl
^ permalink raw reply
* Re: dtc: Remove redundant copy of the GPL
From: Jon Loeliger @ 2007-06-26 2:46 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
In-Reply-To: <20070626014449.GD4383@localhost.localdomain>
So, like, the other day David Gibson mumbled:
> The dtc tree currently includes two copies of the GPL - one which was
> there originally, and one imported from the libfdt tree. This patch
> gets rid of the extra copy in the libfdt tree.
>
> In addition it renames the file containing the remaining copy from
> COPYING to GPL. Since libfdt is dual-licensed, this seems clearer.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Applied.
Thanks,
jdl
PS -- Now stop that. I have to pack for OLS still. :-)
jdl
^ permalink raw reply
* dtc: Improve and better integrate dtc and libfdt Makefiles
From: David Gibson @ 2007-06-26 2:45 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
This patch substantially revamps the dtc Makefiles, in particular
better integrating the Makefile for dtc proper with the Makefiles
imported from libfdt for libfdt and the shared testsuite. Notable
changes:
- No recursive make calls. Instead subsidiary Makefiles are
included into the top-level Makefile so we get a complete dependency
information.
- Common pattern rules, CFLAGS etc. shared between dtc, libfdt
and testsuite, rather than separate copies.
- Vaguely Kbuild-like non-verbose mode used by default, which
makes warnings more prominent.
- libfdt Makefile consists only of variable definitions and
helper rules, to make it more easily embeddable into other Makefile
systems.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/libfdt/Makefile
===================================================================
--- dtc.orig/libfdt/Makefile 2007-06-26 11:55:00.000000000 +1000
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,64 +0,0 @@
-PREFIX = /usr/local
-TARGETLIBS = libfdt.a
-LIBOBJS = fdt.o fdt_ro.o fdt_wip.o fdt_sw.o fdt_rw.o fdt_strerror.o
-
-SOURCE = $(shell find . -maxdepth 1 ! -name version.h -a -name '*.[h]')
-SOURCE += *.c Makefile
-NODEPTARGETS=<clean>
-
-CPPFLAGS = -I.
-CFLAGS = -Wall -g
-
-LIBDIR = $(PREFIX)/$(LIB32)
-
-EXTRA_DIST = \
- README \
- HOWTO \
- LGPL-2.1
-
-ifdef V
-VECHO = :
-else
-VECHO = echo " "
-ARFLAGS = rc
-.SILENT:
-endif
-
-DEPFILES = $(LIBOBJS:%.o=%.d)
-
-all: libs
-
-.PHONY: libs
-
-libs: $(TARGETLIBS)
-
-%.o: %.c
- @$(VECHO) CC $@
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
-
-libfdt.a: $(LIBOBJS)
- @$(VECHO) AR $@
- $(AR) $(ARFLAGS) $@ $^
-
-%.i: %.c
- @$(VECHO) CPP $@
- $(CC) $(CPPFLAGS) -E $< > $@
-
-%.s: %.c
- @$(VECHO) CC -S $@
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -S $<
-
-clean:
- @$(VECHO) CLEAN
- rm -f *~ *.o *.so *.a *.d *.i *.s core a.out $(VERSION)
-
-%.d: %.c
- @$(CC) $(CPPFLAGS) -MM -MT "$*.o $@" $< > $@
-
-# Workaround: Don't build dependencies for certain targets
-# When the include below is executed, make will use the %.d target above to
-# generate missing files. For certain targets (clean, version.h, etc) we don't
-# need or want these dependency files, so don't include them in this case.
-ifeq (,$(findstring <$(MAKECMDGOALS)>,$(NODEPTARGETS)))
--include $(DEPFILES)
-endif
Index: dtc/Makefile
===================================================================
--- dtc.orig/Makefile 2007-06-26 11:55:00.000000000 +1000
+++ dtc/Makefile 2007-06-26 11:56:18.000000000 +1000
@@ -1,67 +1,115 @@
-TARGETS = dtc ftdump
+CPPFLAGS = -I libfdt
CFLAGS = -Wall -g
+LDFLAGS = -Llibfdt
BISON = bison
-DTC_OBJS = dtc.o flattree.o fstree.o data.o livetree.o \
- srcpos.o treesource.o \
- dtc-parser.tab.o lex.yy.o
+#
+# Overall rules
+#
+ifdef V
+VECHO = :
+else
+VECHO = echo " "
+ARFLAGS = rc
+.SILENT:
+endif
+
+NODEPTARGETS = clean
+ifeq ($(MAKECMDGOALS),)
+DEPTARGETS = all
+else
+DEPTARGETS = $(filter-out $(NODEPTARGETS),$(MAKECMDGOALS))
+endif
+
+all: dtc ftdump libfdt tests
+
+STD_CLEANFILES = *~ *.o *.d *.a *.i *.s core a.out
+
+clean: libfdt_clean tests_clean
+ @$(VECHO) CLEAN
+ rm -f $(STD_CLEANFILES)
+ rm -f *.tab.[ch] lex.yy.c *.output vgcore.*
+ rm -f $(BIN)
+
+#
+# General rules
+#
+
+%.o: %.c
+ @$(VECHO) CC $@
+ $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
+
+%.o: %.S
+ @$(VECHO) AS $@
+ $(CC) $(CPPFLAGS) $(AFLAGS) -D__ASSEMBLY__ -o $@ -c $<
-DEPFILES = $(DTC_OBJS:.o=.d)
-
-.PHONY: libfdt tests
+%.d: %.c
+ $(CC) $(CPPFLAGS) -MM -MG -MT "$*.o $@" $< > $@
-all: $(TARGETS) tests libfdt
+%.i: %.c
+ @$(VECHO) CPP $@
+ $(CC) $(CPPFLAGS) -E $< > $@
+
+%.s: %.c
+ @$(VECHO) CC -S $@
+ $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -S $<
+
+%.a:
+ @$(VECHO) AR $@
+ $(AR) $(ARFLAGS) $@ $^
-dtc: $(DTC_OBJS)
+$(BIN): %:
+ @$(VECHO) LD $@
$(LINK.c) -o $@ $^
-ftdump: ftdump.o
- $(LINK.c) -o $@ $^
-libfdt:
- cd libfdt && $(MAKE) all
+#
+# Rules for dtc proper
+#
+DTC_PROGS = dtc ftdump
+DTC_OBJS = dtc.o flattree.o fstree.o data.o livetree.o \
+ srcpos.o treesource.o \
+ dtc-parser.tab.o lex.yy.o
+DTC_DEPFILES = $(DTC_OBJS:%.o=%.d)
dtc-parser.tab.c dtc-parser.tab.h dtc-parser.output: dtc-parser.y
+ @$(VECHO) BISON $@
$(BISON) -d $<
lex.yy.c: dtc-lexer.l
+ @$(VECHO) LEX $@
$(LEX) $<
-lex.yy.o: lex.yy.c dtc-parser.tab.h
+BIN += dtc ftdump
-tests: tests/all
-
-tests/%: libfdt
- $(MAKE) -C tests $*
-
-check: all
- cd tests; ./run_tests.sh
-
-checkv: all
- cd tests; ./run_tests.sh -v
-
-func: all
- cd tests; ./run_tests.sh -t func
-
-funcv: all
- cd tests; ./run_tests.sh -t func -v
-
-stress: all
- cd tests; ./run_tests.sh -t stress
-
-stressv: all
- cd tests; ./run_tests.sh -t stress -v
-
-clean:
- rm -f *~ *.o a.out core $(TARGETS)
- rm -f *.tab.[ch] lex.yy.c
- rm -f *.i *.output vgcore.*
- rm -f *.d
- $(MAKE) -C libfdt clean
- $(MAKE) -C tests clean
+dtc: $(DTC_OBJS)
-%.d: %.c
- $(CC) $(CPPFLAGS) -MM -MG -MT "$*.o $@" $< > $@
+ftdump: ftdump.o
--include $(DEPFILES)
+ifneq ($(DEPTARGETS),)
+-include $(DTC_DEPFILES)
+endif
+
+#
+# Rules for libfdt
+#
+LIBFDT_PREFIX = libfdt/
+include libfdt/Makefile.libfdt
+
+.PHONY: libfdt
+libfdt: $(LIBFDT_LIB)
+
+libfdt_clean:
+ @$(VECHO) CLEAN "(libfdt)"
+ rm -f $(LIBFDT_CLEANFILES)
+
+ifneq ($(DEPTARGETS),)
+-include $(LIBFDT_DEPFILES)
+endif
+
+#
+# Testsuite rules
+#
+TESTS_PREFIX=tests/
+include tests/Makefile.tests
Index: dtc/tests/Makefile
===================================================================
--- dtc.orig/tests/Makefile 2007-06-26 11:55:00.000000000 +1000
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,67 +0,0 @@
-DTC = ../dtc
-VG_DTC = valgrind --tool=memcheck ../dtc
-
-LIB_TESTS = root_node find_property subnode_offset path_offset getprop \
- notfound \
- setprop_inplace nop_property nop_node \
- sw_tree1 \
- move_and_save \
- open_pack rw_tree1 setprop del_property del_node
-LIBTREE_TESTS = truncated_property
-TESTS = $(LIB_TESTS) $(LIBTREE_TESTS)
-UTILS = dumptrees
-
-TREES = test_tree1.dtb
-
-CFLAGS = -Wall -g
-CPPFLAGS = -I../libfdt
-LDFLAGS = -L../libfdt
-
-LIBFDT = ../libfdt/libfdt.a
-
-ifdef V
-VECHO = :
-else
-VECHO = echo " "
-.SILENT:
-endif
-
-DEPFILES = $(TESTS:%=%.d) testutils.d
-
-check: all
- ./run_tests.sh
-
-all: $(TESTS) $(TREES)
-
-%.o: %.c
- @$(VECHO) CC $@
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
-
-%.o: %.S
- @$(VECHO) AS $@
- $(CC) -D__ASSEMBLY__ $(CPPFLAGS) -o $@ -c $<
-
-%: %.o
- @$(VECHO) LD $@
- $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
-
-$(LIB_TESTS): %: testutils.o $(LIBFDT)
-
-$(LIBTREE_TESTS): %: testutils.o trees.o $(LIBFDT)
-
-dumptrees: %: trees.o
-
-$(TREES): dumptrees
- @$(VECHO) DUMPTREES
- ./dumptrees >/dev/null
-
-clean:
- rm -f $(TESTS)
- rm -f *.dtb dumptrees
- rm -f *~ *.d *.o a.out core
- rm -f *.i *.output vgcore.*
-
-%.d: %.c
- @$(CC) $(CPPFLAGS) -MM -MT "$*.o $@" $< > $@
-
--include $(DEPFILES)
Index: dtc/libfdt/Makefile.libfdt
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/libfdt/Makefile.libfdt 2007-06-26 11:55:00.000000000 +1000
@@ -0,0 +1,19 @@
+# Makefile.libfdt
+#
+# This is not a complete Makefile of itself. Instead, it is designed to
+# be easily embeddable into other systems of Makefiles.
+#
+
+LIBFDT_OBJS_L = fdt.o fdt_ro.o fdt_wip.o fdt_sw.o fdt_rw.o fdt_strerror.o
+LIBFDT_OBJS = $(LIBFDT_OBJS_L:%=$(LIBFDT_PREFIX)%)
+
+LIBFDT_LIB_L = libfdt.a
+LIBFDT_LIB = $(LIBFDT_LIB_L:%=$(LIBFDT_PREFIX)%)
+
+LIBFDT_CLEANFILES_L = *~ *.o *.d *.a $(LIBFDT_LIB) \
+ *.i *.s a.out core
+LIBFDT_CLEANFILES = $(LIBFDT_CLEANFILES_L:%=$(LIBFDT_PREFIX)%)
+
+$(LIBFDT_LIB): $(LIBFDT_OBJS)
+
+LIBFDT_DEPFILES = $(LIBFDT_OBJS:%.o=%.d)
Index: dtc/tests/Makefile.tests
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/Makefile.tests 2007-06-26 11:55:00.000000000 +1000
@@ -0,0 +1,65 @@
+LIB_TESTS_L = root_node find_property subnode_offset path_offset getprop \
+ notfound \
+ setprop_inplace nop_property nop_node \
+ sw_tree1 \
+ move_and_save \
+ open_pack rw_tree1 setprop del_property del_node
+LIB_TESTS = $(LIB_TESTS_L:%=$(TESTS_PREFIX)%)
+
+LIBTREE_TESTS_L = truncated_property
+LIBTREE_TESTS = $(LIBTREE_TESTS_L:%=$(TESTS_PREFIX)%)
+
+TESTS = $(LIB_TESTS) $(LIBTREE_TESTS)
+
+TESTS_TREES_L = test_tree1.dtb
+TESTS_TREES = $(TESTS_TREES_L:%=$(TESTS_PREFIX)%)
+
+TESTS_TARGETS = $(TESTS) $(TESTS_TREES)
+
+TESTS_DEPFILES = $(TESTS:%=%.d) $(TESTS_PREFIX)testutils.d
+
+TESTS_CLEANFILES_L = *.output vgcore.* *.dtb
+TESTS_CLEANFILES = $(TESTS_CLEANFILES_L:%=$(TESTS_PREFIX)%)
+
+BIN += $(TESTS) $(TESTS_PREFIX)dumptrees
+
+.PHONY: tests
+tests: $(TESTS) $(TESTS_TREES)
+
+$(LIB_TESTS): %: $(TESTS_PREFIX)testutils.o $(LIBFDT_LIB)
+
+$(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o $(LIBFDT_LIB)
+
+$(TESTS_PREFIX)dumptrees: $(TESTS_PREFIX)trees.o
+
+$(TESTS_TREES): $(TESTS_PREFIX)dumptrees
+ @$(VECHO) DUMPTREES
+ cd $(TESTS_PREFIX); ./dumptrees >/dev/null
+
+tests_clean:
+ @$(VECHO) CLEAN "(tests)"
+ rm -f $(STD_CLEANFILES:%=$(TESTS_PREFIX)%)
+ rm -f $(TESTS_CLEANFILES)
+
+check: tests
+ cd $(TESTS_PREFIX); ./run_tests.sh
+
+checkv: tests
+ cd $(TESTS_PREFIX); ./run_tests.sh -v
+
+func: tests
+ cd $(TESTS_PREFIX); ./run_tests.sh -t func
+
+funcv: tests
+ cd $(TESTS_PREFIX); ./run_tests.sh -t func -v
+
+stress: tests
+ cd $(TESTS_PREFIX); ./run_tests.sh -t stress
+
+stressv: tests
+ cd $(TESTS_PREFIX); ./run_tests.sh -t stress -v
+
+ifneq ($(DEPTARGETS),)
+-include $(TESTS_DEPFILES)
+endif
+
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: dtc: Count testcases and results in the dtc/libfdt testsuite
From: Jon Loeliger @ 2007-06-26 2:45 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
In-Reply-To: <20070626013310.GC4383@localhost.localdomain>
So, like, the other day David Gibson mumbled:
> There are quite a lot of testcases in the dtc testsuite (recently
> imported from libfdt). It can be easy to miss a stray FAIL result in
> the midst of all the rest. To improve this, this patch adds a summary
> to the end of the testsuite results giving the total number of tests
> along with the number of PASSes FAILs and other results.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Applied.
Thanks,
jdl
^ permalink raw reply
* Re: dtc: Accept NOPs in dtb input regardless of version
From: Jon Loeliger @ 2007-06-26 2:44 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
In-Reply-To: <20070626013047.GB4383@localhost.localdomain>
So, like, the other day David Gibson mumbled:
> Since Milton's patch, dtc will accept (and, correctly, ignore) NOP
> tags when given dtb input v16 or later. However, although NOPs
> weren't defined in earlier versions, they're not ambiguous, so should
> be accepted there as well. This patch does so, printing a mere
> warning when finding NOPs in a too-early dtb version.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Applied.
Thanks,
jdl
^ permalink raw reply
* Re: dtc: Remove redundant copy of the GPL
From: David Gibson @ 2007-06-26 2:35 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
In-Reply-To: <20070626023305.GA11906@crusty.rchland.ibm.com>
On Mon, Jun 25, 2007 at 09:33:06PM -0500, Josh Boyer wrote:
> On Tue, Jun 26, 2007 at 11:44:49AM +1000, David Gibson wrote:
> > The dtc tree currently includes two copies of the GPL - one which was
> > there originally, and one imported from the libfdt tree. This patch
> > gets rid of the extra copy in the libfdt tree.
> >
> > In addition it renames the file containing the remaining copy from
> > COPYING to GPL. Since libfdt is dual-licensed, this seems clearer.
>
> You might want to remove the mysterious reference to the LGPL in the
> EXTRA_DIST variable in the Makefile while you're at it.
I have another patch coming which revamps the Makefiles, including get
of that hangover (it's there because I stole the Makefiles from
libhugetlbfs which is LGPL).
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: dtc: Remove redundant copy of the GPL
From: Josh Boyer @ 2007-06-26 2:33 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
In-Reply-To: <20070626014449.GD4383@localhost.localdomain>
On Tue, Jun 26, 2007 at 11:44:49AM +1000, David Gibson wrote:
> The dtc tree currently includes two copies of the GPL - one which was
> there originally, and one imported from the libfdt tree. This patch
> gets rid of the extra copy in the libfdt tree.
>
> In addition it renames the file containing the remaining copy from
> COPYING to GPL. Since libfdt is dual-licensed, this seems clearer.
You might want to remove the mysterious reference to the LGPL in the
EXTRA_DIST variable in the Makefile while you're at it.
josh
^ permalink raw reply
* Re: [PATCH 3/3] Make jprobes a little safer for users
From: Michael Ellerman @ 2007-06-26 2:06 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-arch, linux-ia64, linux-kernel, anil.s.keshavamurthy,
linuxppc-dev, Christoph Hellwig
In-Reply-To: <20070625190057.c8dcb110.akpm@linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 1596 bytes --]
On Mon, 2007-06-25 at 19:00 -0700, Andrew Morton wrote:
> On Tue, 26 Jun 2007 11:48:51 +1000 (EST) Michael Ellerman <michael@ellerman.id.au> wrote:
>
> > I realise jprobes are a razor-blades-included type of interface, but
> > that doesn't mean we can't try and make them safer to use. This guy I
> > know once wrote code like this:
> >
> > struct jprobe jp = { .kp.symbol_name = "foo", .entry = "jprobe_foo" };
> >
> > And then his kernel exploded. Oops.
> >
> > This patch adds an arch hook, arch_deref_entry_point() (I don't like it either)
> > which takes the void * in a struct jprobe, and gives back the text address
> > that it represents.
> >
> > We can then use that in register_jprobe() to check that the entry point
> > we're passed is actually in the kernel text, rather than just some random
> > value.
> >
> > Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> > ---
> > arch/ia64/kernel/kprobes.c | 7 ++++++-
> > arch/powerpc/kernel/kprobes.c | 11 ++++++++---
> > kernel/kprobes.c | 9 +++++++++
>
> We're missing a declaration of arch_deref_entry_point() in some header file?
Yeah I guess. It's declared weak in kernel/kprobes.c, but there should
be a definition somewhere to make sure the three versions don't get out
of sync. I'll send a patch.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH 3/3] Make jprobes a little safer for users
From: Andrew Morton @ 2007-06-26 2:00 UTC (permalink / raw)
To: Michael Ellerman
Cc: linux-arch, linux-ia64, Christoph, linux-kernel,
anil.s.keshavamurthy, linuxppc-dev, Hellwig
In-Reply-To: <7a070581b2fe53ea65216e86c86abc4f40464341.1182822366.git.michael@ellerman.id.au>
On Tue, 26 Jun 2007 11:48:51 +1000 (EST) Michael Ellerman <michael@ellerman.id.au> wrote:
> I realise jprobes are a razor-blades-included type of interface, but
> that doesn't mean we can't try and make them safer to use. This guy I
> know once wrote code like this:
>
> struct jprobe jp = { .kp.symbol_name = "foo", .entry = "jprobe_foo" };
>
> And then his kernel exploded. Oops.
>
> This patch adds an arch hook, arch_deref_entry_point() (I don't like it either)
> which takes the void * in a struct jprobe, and gives back the text address
> that it represents.
>
> We can then use that in register_jprobe() to check that the entry point
> we're passed is actually in the kernel text, rather than just some random
> value.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> ---
> arch/ia64/kernel/kprobes.c | 7 ++++++-
> arch/powerpc/kernel/kprobes.c | 11 ++++++++---
> kernel/kprobes.c | 9 +++++++++
We're missing a declaration of arch_deref_entry_point() in some header file?
^ permalink raw reply
* Re: [PATCH v2] Fix VDSO gettimeofday() when called with NULL struct timeval.
From: Benjamin Herrenschmidt @ 2007-06-26 1:55 UTC (permalink / raw)
To: Tony Breeds; +Cc: LinuxPPC-dev, Paul Mackerras
In-Reply-To: <20070625235032.GH9768@bakeyournoodle.com>
On Tue, 2007-06-26 at 09:50 +1000, Tony Breeds wrote:
> Updated to include feedback from Ben and Segher, also reposition the
> compare in the 64bit VDSO to catch all the references to tv.
>
> From: Tony Breeds <tony@bakeyournoodle.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
^ permalink raw reply
* [PATCH 3/3] Make jprobes a little safer for users
From: Michael Ellerman @ 2007-06-26 1:48 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arch, Andrew Morton, linux-ia64, anil.s.keshavamurthy,
linuxppc-dev, Christoph Hellwig
In-Reply-To: <78935473b1f70c863ab0be7d6cf4bcb04922b20b.1182822366.git.michael@ellerman.id.au>
I realise jprobes are a razor-blades-included type of interface, but
that doesn't mean we can't try and make them safer to use. This guy I
know once wrote code like this:
struct jprobe jp = { .kp.symbol_name = "foo", .entry = "jprobe_foo" };
And then his kernel exploded. Oops.
This patch adds an arch hook, arch_deref_entry_point() (I don't like it either)
which takes the void * in a struct jprobe, and gives back the text address
that it represents.
We can then use that in register_jprobe() to check that the entry point
we're passed is actually in the kernel text, rather than just some random
value.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/ia64/kernel/kprobes.c | 7 ++++++-
arch/powerpc/kernel/kprobes.c | 11 ++++++++---
kernel/kprobes.c | 9 +++++++++
3 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 5bc46f1..5dc98b5 100644
--- a/arch/ia64/kernel/kprobes.c
+++ b/arch/ia64/kernel/kprobes.c
@@ -936,10 +936,15 @@ static void ia64_get_bsp_cfm(struct unw_frame_info *info, void *arg)
return;
}
+unsigned long arch_deref_entry_point(void *entry)
+{
+ return ((struct fnptr *)entry)->ip;
+}
+
int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
{
struct jprobe *jp = container_of(p, struct jprobe, kp);
- unsigned long addr = ((struct fnptr *)(jp->entry))->ip;
+ unsigned long addr = arch_deref_entry_point(jp->entry);
struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
struct param_bsp_cfm pa;
int bytes;
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 0c96611..440f5a8 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -492,6 +492,13 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
return ret;
}
+#ifdef CONFIG_PPC64
+unsigned long arch_deref_entry_point(void *entry)
+{
+ return (unsigned long)(((func_descr_t *)entry)->entry);
+}
+#endif
+
int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
{
struct jprobe *jp = container_of(p, struct jprobe, kp);
@@ -500,11 +507,9 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
memcpy(&kcb->jprobe_saved_regs, regs, sizeof(struct pt_regs));
/* setup return addr to the jprobe handler routine */
+ regs->nip = arch_deref_entry_point(jp->entry);
#ifdef CONFIG_PPC64
- regs->nip = (unsigned long)(((func_descr_t *)jp->entry)->entry);
regs->gpr[2] = (unsigned long)(((func_descr_t *)jp->entry)->toc);
-#else
- regs->nip = (unsigned long)jp->entry;
#endif
return 1;
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 9e47d8c..3e9f513 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -675,9 +675,18 @@ static struct notifier_block kprobe_exceptions_nb = {
.priority = 0x7fffffff /* we need to be notified first */
};
+unsigned long __weak arch_deref_entry_point(void *entry)
+{
+ return (unsigned long)entry;
+}
int __kprobes register_jprobe(struct jprobe *jp)
{
+ unsigned long addr = arch_deref_entry_point(jp->entry);
+
+ if (!kernel_text_address(addr))
+ return -EINVAL;
+
/* Todo: Verify probepoint is a function entry point */
jp->kp.pre_handler = setjmp_pre_handler;
jp->kp.break_handler = longjmp_break_handler;
--
1.5.1.3.g7a33b
^ permalink raw reply related
* [PATCH 2/3] Remove JPROBE_ENTRY()
From: Michael Ellerman @ 2007-06-26 1:48 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arch, Andrew Morton, linux-ia64, anil.s.keshavamurthy,
linuxppc-dev, Christoph Hellwig
In-Reply-To: <78935473b1f70c863ab0be7d6cf4bcb04922b20b.1182822366.git.michael@ellerman.id.au>
AFAICT now that jprobe.entry is a void *, JPROBE_ENTRY doesn't do
anything useful - so remove it ..
I've left a do-nothing version so that out-of-tree jprobes code will still
compile without modifications.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
Documentation/kprobes.txt | 8 +-------
include/asm-i386/kprobes.h | 1 -
include/asm-ia64/kprobes.h | 2 --
include/asm-powerpc/kprobes.h | 2 --
include/asm-s390/kprobes.h | 2 --
include/asm-sparc64/kprobes.h | 1 -
include/asm-x86_64/kprobes.h | 1 -
include/linux/kprobes.h | 3 +++
net/dccp/probe.c | 2 +-
net/ipv4/tcp_probe.c | 2 +-
10 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index da5404a..cb12ae1 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -247,12 +247,6 @@ control to Kprobes.) If the probed function is declared asmlinkage,
fastcall, or anything else that affects how args are passed, the
handler's declaration must match.
-NOTE: A macro JPROBE_ENTRY is provided to handle architecture-specific
-aliasing of jp->entry. In the interest of portability, it is advised
-to use:
-
- jp->entry = JPROBE_ENTRY(handler);
-
register_jprobe() returns 0 on success, or a negative errno otherwise.
4.3 register_kretprobe
@@ -518,7 +512,7 @@ long jdo_fork(unsigned long clone_flags, unsigned long stack_start,
}
static struct jprobe my_jprobe = {
- .entry = JPROBE_ENTRY(jdo_fork)
+ .entry = jdo_fork
};
static int __init jprobe_init(void)
diff --git a/include/asm-i386/kprobes.h b/include/asm-i386/kprobes.h
index 8774d06..06f7303 100644
--- a/include/asm-i386/kprobes.h
+++ b/include/asm-i386/kprobes.h
@@ -42,7 +42,6 @@ typedef u8 kprobe_opcode_t;
? (MAX_STACK_SIZE) \
: (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
-#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
#define ARCH_SUPPORTS_KRETPROBES
#define ARCH_INACTIVE_KPROBE_COUNT 0
#define flush_insn_slot(p) do { } while (0)
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h
index 6382e52..067d9de 100644
--- a/include/asm-ia64/kprobes.h
+++ b/include/asm-ia64/kprobes.h
@@ -82,8 +82,6 @@ struct kprobe_ctlblk {
struct prev_kprobe prev_kprobe[ARCH_PREV_KPROBE_SZ];
};
-#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
-
#define ARCH_SUPPORTS_KRETPROBES
#define ARCH_INACTIVE_KPROBE_COUNT 1
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h
index b0e40ff..3481ade 100644
--- a/include/asm-powerpc/kprobes.h
+++ b/include/asm-powerpc/kprobes.h
@@ -73,12 +73,10 @@ typedef unsigned int kprobe_opcode_t;
} \
}
-#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry)
#define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \
IS_TWI(instr) || IS_TDI(instr))
#else
/* Use stock kprobe_lookup_name since ppc32 doesn't use function descriptors */
-#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)(pentry)
#define is_trap(instr) (IS_TW(instr) || IS_TWI(instr))
#endif
diff --git a/include/asm-s390/kprobes.h b/include/asm-s390/kprobes.h
index 830fe4c..340ba10 100644
--- a/include/asm-s390/kprobes.h
+++ b/include/asm-s390/kprobes.h
@@ -46,8 +46,6 @@ typedef u16 kprobe_opcode_t;
? (MAX_STACK_SIZE) \
: (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
-#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)(pentry)
-
#define ARCH_SUPPORTS_KRETPROBES
#define ARCH_INACTIVE_KPROBE_COUNT 0
diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h
index a331b7b..7f6774d 100644
--- a/include/asm-sparc64/kprobes.h
+++ b/include/asm-sparc64/kprobes.h
@@ -10,7 +10,6 @@ typedef u32 kprobe_opcode_t;
#define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */
#define MAX_INSN_SIZE 2
-#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
#define arch_remove_kprobe(p) do {} while (0)
#define ARCH_INACTIVE_KPROBE_COUNT 0
diff --git a/include/asm-x86_64/kprobes.h b/include/asm-x86_64/kprobes.h
index cf53178..7db8254 100644
--- a/include/asm-x86_64/kprobes.h
+++ b/include/asm-x86_64/kprobes.h
@@ -41,7 +41,6 @@ typedef u8 kprobe_opcode_t;
? (MAX_STACK_SIZE) \
: (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
-#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
#define ARCH_SUPPORTS_KRETPROBES
#define ARCH_INACTIVE_KPROBE_COUNT 1
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index f4e53b7..bd89285 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -119,6 +119,9 @@ struct jprobe {
void *entry; /* probe handling code to jump to */
};
+/* For backward compatibility with old code using JPROBE_ENTRY() */
+#define JPROBE_ENTRY(handler) (handler)
+
DECLARE_PER_CPU(struct kprobe *, current_kprobe);
DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
diff --git a/net/dccp/probe.c b/net/dccp/probe.c
index 43a3adb..bae10b0 100644
--- a/net/dccp/probe.c
+++ b/net/dccp/probe.c
@@ -112,7 +112,7 @@ static struct jprobe dccp_send_probe = {
.kp = {
.symbol_name = "dccp_sendmsg",
},
- .entry = JPROBE_ENTRY(jdccp_sendmsg),
+ .entry = jdccp_sendmsg,
};
static int dccpprobe_open(struct inode *inode, struct file *file)
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
index d9323df..4a7ef10 100644
--- a/net/ipv4/tcp_probe.c
+++ b/net/ipv4/tcp_probe.c
@@ -115,7 +115,7 @@ static struct jprobe tcp_probe = {
.kp = {
.symbol_name = "tcp_rcv_established",
},
- .entry = JPROBE_ENTRY(jtcp_rcv_established),
+ .entry = jtcp_rcv_established,
};
--
1.5.1.3.g7a33b
^ permalink raw reply related
* [PATCH 1/3] Make struct jprobe.entry a void *
From: Michael Ellerman @ 2007-06-26 1:48 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arch, Andrew Morton, linux-ia64, anil.s.keshavamurthy,
linuxppc-dev, Christoph Hellwig
Currently jprobe.entry is a kprobe_opcode_t *, but that's a lie. On some
platforms it doesn't point to an opcode at all, it points to a function
descriptor.
It's really a pointer to something that the arch code can turn into a
function entry point. And that's what actually happens, none of the
generic code ever looks at jprobe.entry, it's only ever dereferenced
by arch code.
So just make it a void *.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
It isn't obvious where kprobes patches should go, is anyone "the" maintainer?
Instead I've just sent this to everyone who'd touched the code lately, or
might be otherwise interested.
include/linux/kprobes.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 23adf60..f4e53b7 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -116,7 +116,7 @@ struct kprobe {
*/
struct jprobe {
struct kprobe kp;
- kprobe_opcode_t *entry; /* probe handling code to jump to */
+ void *entry; /* probe handling code to jump to */
};
DECLARE_PER_CPU(struct kprobe *, current_kprobe);
--
1.5.1.3.g7a33b
^ permalink raw reply related
* dtc: Remove redundant copy of the GPL
From: David Gibson @ 2007-06-26 1:44 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
The dtc tree currently includes two copies of the GPL - one which was
there originally, and one imported from the libfdt tree. This patch
gets rid of the extra copy in the libfdt tree.
In addition it renames the file containing the remaining copy from
COPYING to GPL. Since libfdt is dual-licensed, this seems clearer.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/libfdt/GPL
===================================================================
--- dtc.orig/libfdt/GPL 2007-06-26 11:21:39.000000000 +1000
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-\f
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-\f
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-\f
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-\f
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-\f
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
Index: dtc/COPYING
===================================================================
--- dtc.orig/COPYING 2007-06-26 11:34:51.000000000 +1000
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-\f
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-\f
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-\f
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-\f
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-\f
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
Index: dtc/GPL
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/GPL 2007-06-26 11:21:33.000000000 +1000
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+\f
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* dtc: Count testcases and results in the dtc/libfdt testsuite
From: David Gibson @ 2007-06-26 1:33 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
There are quite a lot of testcases in the dtc testsuite (recently
imported from libfdt). It can be easy to miss a stray FAIL result in
the midst of all the rest. To improve this, this patch adds a summary
to the end of the testsuite results giving the total number of tests
along with the number of PASSes FAILs and other results.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/tests/run_tests.sh
===================================================================
--- dtc.orig/tests/run_tests.sh 2007-06-18 17:02:44.000000000 +1000
+++ dtc/tests/run_tests.sh 2007-06-18 17:10:41.000000000 +1000
@@ -4,9 +4,24 @@ export QUIET_TEST=1
ENV=/usr/bin/env
+tot_tests=0
+tot_pass=0
+tot_fail=0
+tot_config=0
+tot_strange=0
+
run_test () {
+ tot_tests=$[tot_tests + 1]
echo -n "$@: "
- PATH=".:$PATH" $ENV "$@"
+ if PATH=".:$PATH" $ENV "$@"; then
+ tot_pass=$[tot_pass + 1]
+ elif [ "$?" == "1" ]; then
+ tot_config=$[tot_config + 1]
+ elif [ "$?" == "2" ]; then
+ tot_fail=$[tot_fail + 1]
+ else
+ tot_strange=$[tot_strange + 1]
+ fi
}
tree1_tests () {
@@ -92,3 +107,12 @@ for set in $TESTSETS; do
;;
esac
done
+
+echo -e "********** TEST SUMMARY"
+echo -e "* Total testcases: $tot_tests"
+echo -e "* PASS: $tot_pass"
+echo -e "* FAIL: $tot_fail"
+echo -e "* Bad configuration: $tot_config"
+echo -e "* Strange test result: $tot_strange"
+echo -e "**********"
+
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* dtc: Accept NOPs in dtb input regardless of version
From: David Gibson @ 2007-06-26 1:30 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
Since Milton's patch, dtc will accept (and, correctly, ignore) NOP
tags when given dtb input v16 or later. However, although NOPs
weren't defined in earlier versions, they're not ambiguous, so should
be accepted there as well. This patch does so, printing a mere
warning when finding NOPs in a too-early dtb version.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/flattree.c
===================================================================
--- dtc.orig/flattree.c 2007-06-25 14:08:27.000000000 +1000
+++ dtc/flattree.c 2007-06-25 14:08:29.000000000 +1000
@@ -776,10 +776,12 @@
break;
case OF_DT_NOP:
- if (flags & FTF_NOPS)
+ if (!(flags & FTF_NOPS))
+ fprintf(stderr, "Warning: NOP tag found in flat tree"
+ " version <16\n");
break;
- die("OF_DT_NOP in device tree blob\n");
+ /* Ignore */
break;
default:
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: libfdt merged into DTC repo!
From: David Gibson @ 2007-06-26 1:23 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, Jon Loeliger, u-boot-users
In-Reply-To: <1182783063.23775.40.camel@weaponx.rchland.ibm.com>
On Mon, Jun 25, 2007 at 09:51:03AM -0500, Josh Boyer wrote:
> On Mon, 2007-06-25 at 09:25 -0500, Jon Loeliger wrote:
> > Folks,
> >
> > David Gibson has successfully wrestled the libfdt legal beast!
> > As a result, I have merged the current versions of the libfdt
> > into the DTC repository as maintained on jdl.com.
>
> Cool. Congrats David.
>
> So I'm assuming the DTC git tree will be the canonical source for libfdt
> then?
That's correct.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* [PATCH v2] Fix VDSO gettimeofday() when called with NULL struct timeval.
From: Tony Breeds @ 2007-06-25 23:50 UTC (permalink / raw)
To: LinuxPPC-dev, Paul Mackerras
In-Reply-To: <20070625105836.GE9768@bakeyournoodle.com>
Updated to include feedback from Ben and Segher, also reposition the
compare in the 64bit VDSO to catch all the references to tv.
From: Tony Breeds <tony@bakeyournoodle.com>
Fix VDSO gettimeofday() when called with NULL struct timeval.
Consider the prototype for gettimeofday():
int gettimofday(struct timeval *tv, struct timezone *tz);
AFAICT it is valid to call with /either/ tv or tz being NULL, the C version
of sys_gettimeofday() supports this, the current version of gettimeofday() in
the VDSO will SEGV if called with a NULL tv.
This patch fixes this.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Also fixes some whitespace damage at the top of vdso64/gettimeofday.S
arch/powerpc/kernel/vdso32/gettimeofday.S | 13 +++++++------
arch/powerpc/kernel/vdso64/gettimeofday.S | 8 +++++---
2 files changed, 12 insertions(+), 9 deletions(-)
Index: working/arch/powerpc/kernel/vdso32/gettimeofday.S
===================================================================
--- working.orig/arch/powerpc/kernel/vdso32/gettimeofday.S
+++ working/arch/powerpc/kernel/vdso32/gettimeofday.S
@@ -32,6 +32,8 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
mr r11,r4 /* r11 saves tz */
bl __get_datapage@local /* get data page */
mr r9, r3 /* datapage ptr in r9 */
+ cmplwi r10,0 /* check if tv is NULL */
+ beq 3f
bl __do_get_xsec@local /* get xsec from tb & kernel */
bne- 2f /* out of line -> do syscall */
@@ -50,7 +52,7 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
mulhwu r5,r5,r6
stw r5,TVAL32_TV_USEC(r10)
- cmpli cr0,r11,0 /* check if tz is NULL */
+3: cmplwi r11,0 /* check if tz is NULL */
beq 1f
lwz r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */
lwz r5,CFG_TZ_DSTTIME(r9)
Index: working/arch/powerpc/kernel/vdso64/gettimeofday.S
===================================================================
--- working.orig/arch/powerpc/kernel/vdso64/gettimeofday.S
+++ working/arch/powerpc/kernel/vdso64/gettimeofday.S
@@ -1,5 +1,4 @@
-
- /*
+/*
* Userland implementation of gettimeofday() for 64 bits processes in a
* ppc64 kernel for use in the vDSO
*
@@ -32,6 +31,8 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
mr r11,r3 /* r11 holds tv */
mr r10,r4 /* r10 holds tz */
bl V_LOCAL_FUNC(__get_datapage) /* get data page */
+ cmpldi r10,0 /* check if tv is NULL */
+ beq 2f
bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */
lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */
ori r7,r7,16960
@@ -43,8 +44,8 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
* XSEC_PER_SEC
*/
rldicl r0,r0,44,20
- cmpldi cr0,r10,0 /* check if tz is NULL */
std r0,TVAL64_TV_USEC(r11) /* store usec in tv */
+2: cmpldi r10,0 /* check if tz is NULL */
beq 1f
lwz r4,CFG_TZ_MINUTEWEST(r3)/* fill tz */
lwz r5,CFG_TZ_DSTTIME(r3)
Yours Tony
linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
^ permalink raw reply
* Re: [PATCH] Fix VDSO gettimeofday() when called with NULL struct timeval.
From: Tony Breeds @ 2007-06-25 23:39 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: LinuxPPC-dev, Paul Mackerras
In-Reply-To: <757f020b834543583be36b73b932da3e@kernel.crashing.org>
On Mon, Jun 25, 2007 at 03:35:51PM +0200, Segher Boessenkool wrote:
> Yeah. Not really vital though, no sane program would call
> gettimeofday() with a NULL timeval (since that doesn't do
> anything). Or did you find such a program (other than a
> testsuite)?
No real program just me testing things. I wanted to see what the
kernel had in sys_tz ;P
> cmplwi r10,0
Will do. BenH also suggested this change.
> No need to renumber the labels. Either pick a higher
> number for your new label (nothing says they need to be
> in order); or reuse some other number (both your new and
> the original 1: can be 1: without any problem, these are
> local labels after all); or you can use 0: since that's
> a valid local label as well.
Thanks.
Yours Tony
linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
^ permalink raw reply
* Re: [PATCH] Fix VDSO gettimeofday() when called with NULL struct timeval.
From: Tony Breeds @ 2007-06-25 23:37 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: LinuxPPC-dev, Paul Mackerras
In-Reply-To: <1182775182.5521.62.camel@localhost.localdomain>
On Mon, Jun 25, 2007 at 10:39:42PM +1000, Benjamin Herrenschmidt wrote:
> Please use cmplwi here.
Will do.
> And fix that one while at it :-) It's the same thing, but at least one
> is explicit on the size of the comparison. Also, I don't think you need
> to renumber the labels, or did I miss something ?
No I did.
Yours Tony
linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
^ permalink raw reply
* RE: Follow up on 4 Gig of DDR on MPC8548E
From: Benjamin Herrenschmidt @ 2007-06-25 23:32 UTC (permalink / raw)
To: Morrison, Tom; +Cc: linuxppc-dev, ltib, linuxppc-embedded
In-Reply-To: <BD261180E6D35F4D9D32F3E44FD3D901053E84E5@EMPBEDEX.empirix.com>
> apparently after more investigations - it looks like there is something in the ext2 driver code
> that is mal-adjusted....I haven't talked to the guy today who was looking at that - but the ext2
> driver code that was openning a 'virtual file' / console - had some problems mapping that
> space - again, my gut is telling me more stronger there is a problem with signed/unsigned...
> now deeper in the ext2 code...
I very much doubt there is a signed/unsigned issue in ext2 or
elsewhere...
You have CONFIG_HIGHMEM ? What are your setting for KERNELBASE and
PAGE_OFFSET ?
Ben.
^ permalink raw reply
* RE: Follow up on 4 Gig of DDR on MPC8548E
From: Morrison, Tom @ 2007-06-25 23:12 UTC (permalink / raw)
To: Rune Torgersen, linuxppc-dev, ltib, linuxppc-embedded
In-Reply-To: <DCEAAC0833DD314AB0B58112AD99B93B0310C3ED@ismail.innsys.innovsys.com>
>> 0x0000_0000 to 0xffff_ffff or do you have 64GB of mem...
4 GIG DDR Memory...that we say...there is 3 GIG for the moment...
=20
the LAW's are setup in priority order - thus, if you have overlapping
regions (aka: PCI & DDR memory) the one with the lower #'d LAW
is the one it is mapped to....
>> If you have all physical mem in the first 32bit, where are your PCI
>> windows set?
>> And in modst cases the PCI devices (if they are bus-mastring ) need =
1-1
>> inbound mapping to be able to write to memory.
you can use the LAW's to remap anything to anywhere...
see above for priority - but in our case, we are mapping
the PCI/PEX/Local Bus to the last 4 GIG at a higher=20
priority LAW than the DDR...that is what the MPC8548=20
spec says how it works...and it does - if you don't tell
the kernel there is more than 2GIG (and ioremap that last
GIG to access the full 'other' 2 GIG...
=20
that is not the issue here....
=20
apparently after more investigations - it looks like there is something =
in the ext2 driver code
that is mal-adjusted....I haven't talked to the guy today who was =
looking at that - but the ext2
driver code that was openning a 'virtual file' / console - had some =
problems mapping that
space - again, my gut is telling me more stronger there is a problem =
with signed/unsigned...
now deeper in the ext2 code...
Am at the Freescale Technical Forum the next few days - if any of you =
guys
are down here in Florida...I am intending to track down a few freescale =
folk
on this issue...:-)
=20
Tom
^ permalink raw reply
* Re: Mem-2-Mem DMA - Generalized API
From: Matt Sealey @ 2007-06-25 21:20 UTC (permalink / raw)
To: Clifford Wolf; +Cc: Arnd Bergmann, linuxppc-embedded
In-Reply-To: <20070625180110.GH20463@clifford.at>
Clifford Wolf wrote:
> Hi,
>
> However, i don't think that implementing stuff like memset() in a dma
> controller is any good because that would just flood the memory bus which
> would then block in 99% of all cases the cpu until the dma is finished.
>
> It would however cost less power than doing that in the CPU. ;-)
At least while the DMA transfer is happening, you could preempt to some
other task. Would it flood the memory bus? When a DMA transfer happens
would it really do it in such a way that it would stall the CPU on a
memory access far more than it would usually?
I think it would have to be extremely badly designed to be even ABLE to do
that, or at least, you'd be doing some incredibly unwise things to be able
to flood it like that.
>> Indeed. I wonder if we could pull apart the IOAT/DMA stuff and genericise
>> it (it should be possible) or simply add to it, or if making a powerpc
>> specific dma engine abstraction would be an easier idea.
>
> I don't think that this would actually be powerpc specific in any way. But
> since such general purpose dma controllers are more common in embedded
> hardware this still seams to be the right place to discuss the issue.
I meant powerpc platform (as in ARCH=powerpc) specific. Rather than dropping
it in the global drivers, just keep it as a library for powerpc. Everyone
else can get it later with a move into the full tree. As long as the headers
have common, easy to get to names that do not conflict with anything
preexisting, it would not affect anything.
Taking IOAT as an example and fixing it's weirdness would be a better start
than making a whole new API, but I think doing development *WITH* IOAT and
potentially trashing all.. umm.. 4 users, and the weird Linux kernel tripling
of development cost when heavily updating an actively maintained subsystem
that everyone else wants to touch, that would be detrimental. We don't want
to break Intel and we don't want to be tracking Intel's patches or having
extra weirdness break in (or for the number of users of that DMA system to
explode underneath New DMA Development)
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
^ permalink raw reply
* Re: [CURIOUSITY] When will we stop caring about arch/ppc?
From: Josh Boyer @ 2007-06-25 20:50 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <0FBD8D7C-1A60-4305-992C-5C28ECE41278@kernel.crashing.org>
On Mon, 2007-06-25 at 14:42 -0500, Kumar Gala wrote:
> On Jun 25, 2007, at 1:40 PM, Josh Boyer wrote:
>
> > On Mon, 2007-06-25 at 11:23 -0700, Mark A. Greer wrote:
> >> Any opinions on when we stop worrying about arch/ppc and start
> >> getting
> >> rid of it for real?
> >
> > There are lots of boards in the 4xx family that don't exist yet in
> > powerpc. I don't think we want it to die until they get moved
> > over, or
> > at least marked as in a "danger zone" for a while.
>
> Agreed, we need to go through and figure out what all really needs to
> get moved over for other boards. I know 4xx has only one board
> supported in arch/powerpc and I dont believe the support is complete.
Right. Ebony boots at least. Needs PCI to be completed. There are
lots of other 44x boards that should probably be brought over and are in
various stages of completion. Bamboo, Taishan, Sequoia, Katmai, etc.
For 40x, I hope to get working on a Walnut port soon. Not sure much
else is really needed there.
There's also the Xilinx boards.
> > Maybe what we could do is designate a kernel release where we'll stop
> > taking new arch/ppc submissions?
>
> I think we stopped taking new submissions to arch/ppc a while ago...
> someone sneak something in on us? We tend to only do bug fixes or
> deal with issues related to moving things between arch/ppc & arch/
> powerpc.
Well, there's definitely been an aversion to it. But I meant adding
something in the Documentation/powerpc/ directory and maybe
feature-removal-schedule.txt. Basically a written down thing in the
kernel source to refer people to.
josh
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox