aboutsummaryrefslogtreecommitdiffstats
diff options
-rw-r--r--hfsplus-bugfixes.patch73
-rw-r--r--perf-turn-off-compiler-warnings-for-flex-and-bison-generated-files.patch43
-rw-r--r--series2
-rw-r--r--time-don-t-inline-export_symbol-functions.patch46
4 files changed, 164 insertions, 0 deletions
diff --git a/hfsplus-bugfixes.patch b/hfsplus-bugfixes.patch
new file mode 100644
index 00000000000000..6675e2acc37da9
--- /dev/null
+++ b/hfsplus-bugfixes.patch
@@ -0,0 +1,73 @@
+From foo@baz Fri May 4 12:02:41 PDT 2012
+Date: Fri, 04 May 2012 12:02:41 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: [PATCH] hfsplus: Fix potential buffer overflows
+
+commit ec81aecb29668ad71f699f4e7b96ec46691895b6 (hfs: fix a potential
+buffer overflow) fixed a few potential buffer overflows in the hfs
+filesystem. But as Timo Warns pointed out, these changes also need to
+be made on the hfsplus filesystem as well.
+
+Reported-by: Timo Warns <warns@pre-sense.de>
+Signed-off-by: WANG Cong <amwang@redhat.com>
+Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
+Cc: Cong Wang <amwang@redhat.com>
+Cc: Miklos Szeredi <mszeredi@suse.cz>
+Cc: Sage Weil <sage@newdream.net>
+Cc: Eugene Teo <eteo@redhat.com>
+Cc: Roman Zippel <zippel@linux-m68k.org>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Cc: Christoph Hellwig <hch@lst.de>
+Cc: Alexey Dobriyan <adobriyan@gmail.com>
+Cc: Dave Anderson <anderson@redhat.com>
+Cc: stable <stable@vger.kernel.org>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/hfsplus/catalog.c | 4 ++++
+ fs/hfsplus/dir.c | 11 +++++++++++
+ 2 files changed, 15 insertions(+)
+
+--- a/fs/hfsplus/catalog.c
++++ b/fs/hfsplus/catalog.c
+@@ -366,6 +366,10 @@ int hfsplus_rename_cat(u32 cnid,
+ err = hfs_brec_find(&src_fd);
+ if (err)
+ goto out;
++ if (src_fd.entrylength > sizeof(entry) || src_fd.entrylength < 0) {
++ err = -EIO;
++ goto out;
++ }
+
+ hfs_bnode_read(src_fd.bnode, &entry, src_fd.entryoffset,
+ src_fd.entrylength);
+--- a/fs/hfsplus/dir.c
++++ b/fs/hfsplus/dir.c
+@@ -150,6 +150,11 @@ static int hfsplus_readdir(struct file *
+ filp->f_pos++;
+ /* fall through */
+ case 1:
++ if (fd.entrylength > sizeof(entry) || fd.entrylength < 0) {
++ err = -EIO;
++ goto out;
++ }
++
+ hfs_bnode_read(fd.bnode, &entry, fd.entryoffset,
+ fd.entrylength);
+ if (be16_to_cpu(entry.type) != HFSPLUS_FOLDER_THREAD) {
+@@ -181,6 +186,12 @@ static int hfsplus_readdir(struct file *
+ err = -EIO;
+ goto out;
+ }
++
++ if (fd.entrylength > sizeof(entry) || fd.entrylength < 0) {
++ err = -EIO;
++ goto out;
++ }
++
+ hfs_bnode_read(fd.bnode, &entry, fd.entryoffset,
+ fd.entrylength);
+ type = be16_to_cpu(entry.type);
diff --git a/perf-turn-off-compiler-warnings-for-flex-and-bison-generated-files.patch b/perf-turn-off-compiler-warnings-for-flex-and-bison-generated-files.patch
new file mode 100644
index 00000000000000..e8c89e70dbeda5
--- /dev/null
+++ b/perf-turn-off-compiler-warnings-for-flex-and-bison-generated-files.patch
@@ -0,0 +1,43 @@
+From foo@baz Fri May 4 11:27:46 PDT 2012
+Date: Fri, 04 May 2012 11:27:46 -0700
+To: Peter Zijlstra <a.p.zijlstra@chello.nl>
+To: Paul Mackerras <paulus@samba.org>
+To: Ingo Molnar <mingo@redhat.com>
+To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: [PATCH] perf: turn off compiler warnings for flex and bison generated files
+
+We don't know what types of warnings different versions of flex and bison
+combined with different versions of gcc is going to generate, so just punt and
+don't warn about anything.
+
+This fixes the build of perf for me on an openSUSE 12.1 system.
+
+Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+Note, I don't really like this, but how else are we going to ensure that we
+catch all warnings? Pick them off one by one? Better ideas are accepted...
+
+ tools/perf/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/tools/perf/Makefile
++++ b/tools/perf/Makefile
+@@ -774,10 +774,10 @@ $(OUTPUT)perf.o perf.spec \
+ # over the general rule for .o
+
+ $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS
+- $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
++ $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -w $<
+
+ $(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS
+- $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
++ $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -w $<
+
+ $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS
+ $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
diff --git a/series b/series
index 3d51948f311902..01e0d098f5f137 100644
--- a/series
+++ b/series
@@ -1,4 +1,6 @@
# My specific stuff, at the top to make it easier to work stuff below.
+time-don-t-inline-export_symbol-functions.patch
+perf-turn-off-compiler-warnings-for-flex-and-bison-generated-files.patch
hfsplus-bugfixes.patch
usb-rename-the-usb-misc-class-from-usb-to-usbmisc.patch
modpost-use-proper-kernel-style-for-autogenerated-files.patch
diff --git a/time-don-t-inline-export_symbol-functions.patch b/time-don-t-inline-export_symbol-functions.patch
new file mode 100644
index 00000000000000..b0dd9de32c6ad2
--- /dev/null
+++ b/time-don-t-inline-export_symbol-functions.patch
@@ -0,0 +1,46 @@
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+To: Thomas Gleixner <tglx@linutronix.de>
+Subject: [PATCH] time: don't inline EXPORT_SYMBOL functions
+
+How is the compiler even handling exported functions that are marked
+inline? Anyway, these shouldn't be inline because of that, so remove
+that marking.
+
+Based on a larger patch by Mark Charlebois to get LLVM to build the
+kernel.
+
+
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Mark Charlebois <mcharleb@qualcomm.com>
+Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: hank <pyu@redhat.com>
+Cc: John Stultz <john.stultz@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/time.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/kernel/time.c b/kernel/time.c
+index ba744cf..8d8bebd9 100644
+--- a/kernel/time.c
++++ b/kernel/time.c
+@@ -232,7 +232,7 @@ EXPORT_SYMBOL(current_fs_time);
+ * Avoid unnecessary multiplications/divisions in the
+ * two most common HZ cases:
+ */
+-inline unsigned int jiffies_to_msecs(const unsigned long j)
++unsigned int jiffies_to_msecs(const unsigned long j)
+ {
+ #if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
+ return (MSEC_PER_SEC / HZ) * j;
+@@ -248,7 +248,7 @@ inline unsigned int jiffies_to_msecs(const unsigned long j)
+ }
+ EXPORT_SYMBOL(jiffies_to_msecs);
+
+-inline unsigned int jiffies_to_usecs(const unsigned long j)
++unsigned int jiffies_to_usecs(const unsigned long j)
+ {
+ #if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ)
+ return (USEC_PER_SEC / HZ) * j;