public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/genkernel:master commit in: patches/busybox/1.20.2/
@ 2014-01-25  3:11 Richard Yao
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Yao @ 2014-01-25  3:11 UTC (permalink / raw
  To: gentoo-commits

commit:     8171fa4eb7542280f2982dc6d00e832933c6da99
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 13:59:42 2014 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Sat Jan 25 03:11:32 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=8171fa4e

Add patch to fix busybox bunzip2, see #497916.

Signed-off-by: Guy Martin <gmsoft <AT> tuxicoman.be>

---
 patches/busybox/1.20.2/busybox-1.20.2-bunzip2.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/patches/busybox/1.20.2/busybox-1.20.2-bunzip2.patch b/patches/busybox/1.20.2/busybox-1.20.2-bunzip2.patch
new file mode 100644
index 0000000..f46a4a5
--- /dev/null
+++ b/patches/busybox/1.20.2/busybox-1.20.2-bunzip2.patch
@@ -0,0 +1,12 @@
+diff -uNr busybox-1.20.2.orig/archival/libarchive/decompress_bunzip2.c busybox-1.20.2/archival/libarchive/decompress_bunzip2.c
+--- busybox-1.20.2.orig/archival/libarchive/decompress_bunzip2.c	2014-01-20 11:16:01.817359481 +0100
++++ busybox-1.20.2/archival/libarchive/decompress_bunzip2.c	2014-01-20 11:16:47.492875819 +0100
+@@ -440,7 +440,7 @@
+ 		   literal used is the one at the head of the mtfSymbol array.) */
+ 		if (runPos != 0) {
+ 			uint8_t tmp_byte;
+-			if (dbufCount + runCnt >= dbufSize) return RETVAL_DATA_ERROR;
++			if (dbufCount + runCnt > dbufSize) return RETVAL_DATA_ERROR;
+ 			tmp_byte = symToByte[mtfSymbol[0]];
+ 			byteCount[tmp_byte] += runCnt;
+ 			while (--runCnt >= 0) dbuf[dbufCount++] = (uint32_t)tmp_byte;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/genkernel:master commit in: patches/busybox/1.20.2/
@ 2014-03-16  0:26 Richard Yao
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Yao @ 2014-03-16  0:26 UTC (permalink / raw
  To: gentoo-commits

commit:     006a5d6d56e622b5ef82e5a066ca7af7b8c2aeed
Author:     Richard Yao <ryao <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 15 23:39:55 2014 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Sun Mar 16 00:25:27 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=006a5d6d

Load modules by absolute path in busybox modprobe

Our switch to busybox modprobe broke ZFS module loading where busybox
modprobe would load two modules and then fail. Limited developer time
resulted in a hack being put into place to repeat modprobe until ZFS
appeared. However, this was never a real long term solution.

Recent analysis with strace suggests that loading two modules corrupts
busybox's current working directory inside the kernel. Consequently,
subsequent tests where absolute paths were used instead of relative ones
made the problem disappear.

Modifying busybox to use full paths when loading modules makes module
loading work on all affected kernels. While the long term plan is to fix
the kernel, this workaround will be needed indefinitely for affected
kernels, even after mainline Linux is fixed.

Signed-off-by: Richard Yao <ryao <AT> gentoo.org>

---
 .../busybox/1.20.2/busybox-1.20.2-modprobe.patch   | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/patches/busybox/1.20.2/busybox-1.20.2-modprobe.patch b/patches/busybox/1.20.2/busybox-1.20.2-modprobe.patch
new file mode 100644
index 0000000..491eb05
--- /dev/null
+++ b/patches/busybox/1.20.2/busybox-1.20.2-modprobe.patch
@@ -0,0 +1,26 @@
+diff --git a/modutils/modprobe.c b/modutils/modprobe.c
+index fb6c659..11fa521 100644
+--- a/modutils/modprobe.c
++++ b/modutils/modprobe.c
+@@ -413,7 +413,7 @@ static int do_modprobe(struct module_entry *m)
+ 	rc = 0;
+ 	while (m->deps) {
+ 		struct module_entry *m2;
+-		char *fn, *options;
++		char *fn, *options, *path;
+ 
+ 		rc = 0;
+ 		fn = llist_pop(&m->deps); /* we leak it */
+@@ -460,7 +460,11 @@ static int do_modprobe(struct module_entry *m)
+ 			continue;
+ 		}
+ 
+-		rc = bb_init_module(fn, options);
++		path = xmalloc(strlen(fn) + strlen(CONFIG_DEFAULT_MODULES_DIR) + strlen(G.uts.release) + 3);
++		sprintf(path, "%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, G.uts.release, fn);
++
++		rc = bb_init_module(path, options);
++		free(path);
+ 		DBG("loaded %s '%s', rc:%d", fn, options, rc);
+ 		if (rc == EEXIST)
+ 			rc = 0;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-16  0:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-25  3:11 [gentoo-commits] proj/genkernel:master commit in: patches/busybox/1.20.2/ Richard Yao
  -- strict thread matches above, loose matches on Subject: below --
2014-03-16  0:26 Richard Yao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox