summaryrefslogtreecommitdiff
path: root/debian/patches/04-cve-2009-0148.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/04-cve-2009-0148.dpatch')
-rwxr-xr-xdebian/patches/04-cve-2009-0148.dpatch344
1 files changed, 344 insertions, 0 deletions
diff --git a/debian/patches/04-cve-2009-0148.dpatch b/debian/patches/04-cve-2009-0148.dpatch
new file mode 100755
index 0000000..8f2125e
--- /dev/null
+++ b/debian/patches/04-cve-2009-0148.dpatch
@@ -0,0 +1,344 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 04-cve-2009-0148.dpatch
+##
+## DP: Fix for CVE-2009-0148 by Moritz Muehlenhoff and Matthew Murphy
+## DP: Closes: 528510
+
+diff --git a/src/build.c b/src/build.c
+index ada2ea1..717d618 100644
+--- a/src/build.c
++++ b/src/build.c
+@@ -223,7 +223,7 @@ build(void)
+ if (strcmp(currentdir, home) == 0) {
+ strcpy(newdir, "$HOME");
+ } else if (strncmp(currentdir, home, strlen(home)) == 0) {
+- sprintf(newdir, "$HOME%s", currentdir + strlen(home));
++ snprintf(newdir, sizeof(newdir), "$HOME%s", currentdir + strlen(home));
+ }
+ /* sort the source file names (needed for rebuilding) */
+ qsort(srcfiles, nsrcfiles, sizeof(char *), compare);
+@@ -454,7 +454,7 @@ cscope: converting to new symbol database file format\n");
+ }
+ fstat(fileno(postings), &statstruct);
+ fclose(postings);
+- sprintf(sortcommand, "env LC_ALL=C sort -T %s %s", tmpdir, temp1);
++ snprintf(sortcommand, sizeof(sortcommand), "env LC_ALL=C sort -T %s %s", tmpdir, temp1);
+ if ((postings = mypopen(sortcommand, "r")) == NULL) {
+ fprintf(stderr, "cscope: cannot open pipe to sort command\n");
+ cannotindex();
+diff --git a/src/command.c b/src/command.c
+index 0974352..8c9f277 100644
+--- a/src/command.c
++++ b/src/command.c
+@@ -739,7 +739,7 @@ changestring(void)
+
+ /* make sure it can be changed */
+ if (access(newfile, WRITE) != 0) {
+- sprintf(msg, "Cannot write to file %s", newfile);
++ snprintf(msg, sizeof(msg), "Cannot write to file %s", newfile);
+ postmsg(msg);
+ anymarked = NO;
+ break;
+diff --git a/src/dir.c b/src/dir.c
+index 5773231..33fd7d1 100644
+--- a/src/dir.c
++++ b/src/dir.c
+@@ -139,7 +139,7 @@ sourcedir(char *dirlist)
+
+ /* compute its path from higher view path source dirs */
+ for (i = 1; i < nvpsrcdirs; ++i) {
+- sprintf(path, "%.*s/%s",
++ snprintf(path, sizeof(path), "%.*s/%s",
+ PATHLEN - 2 - dir_len,
+ srcdirs[i], dir);
+ addsrcdir(path);
+@@ -207,7 +207,7 @@ includedir(char *dirlist)
+
+ /* compute its path from higher view path source dirs */
+ for (i = 1; i < nvpsrcdirs; ++i) {
+- sprintf(path, "%.*s/%s",
++ snprintf(path, sizeof(path), "%.*s/%s",
+ PATHLEN - 2 - dir_len,
+ srcdirs[i], dir);
+ addincdir(dir, path);
+@@ -482,8 +482,6 @@ scan_dir(const char *adir, BOOL recurse_dir)
+ DIR *dirfile;
+ int adir_len = strlen(adir);
+
+- /* FIXME: no guards against adir_len > PATHLEN, yet */
+-
+ if ((dirfile = opendir(adir)) != NULL) {
+ struct dirent *entry;
+ char path[PATHLEN + 1];
+@@ -494,7 +492,7 @@ scan_dir(const char *adir, BOOL recurse_dir)
+ && (strcmp("..",entry->d_name) != 0)) {
+ struct stat buf;
+
+- sprintf(path,"%s/%.*s", adir,
++ snprintf(path, sizeof(path), "%s/%.*s", adir,
+ PATHLEN - 2 - adir_len,
+ entry->d_name);
+
+@@ -604,14 +602,14 @@ incfile(char *file, char *type)
+ /* search for the file in the #include directory list */
+ for (i = 0; i < nincdirs; ++i) {
+ /* don't include the file from two directories */
+- sprintf(name, "%.*s/%s",
++ snprintf(name, sizeof(name), "%.*s/%s",
+ PATHLEN - 2 - file_len, incnames[i],
+ file);
+ if (infilelist(name) == YES) {
+ break;
+ }
+ /* make sure it exists and is readable */
+- sprintf(path, "%.*s/%s",
++ snprintf(path, sizeof(path), "%.*s/%s",
+ PATHLEN - 2 - file_len, incdirs[i],
+ file);
+ if (access(compath(path), READ) == 0) {
+@@ -659,7 +657,7 @@ inviewpath(char *file)
+
+ /* compute its path from higher view path source dirs */
+ for (i = 1; i < nvpsrcdirs; ++i) {
+- sprintf(path, "%.*s/%s",
++ snprintf(path, sizeof(path), "%.*s/%s",
+ PATHLEN - 2 - file_len, srcdirs[i],
+ file);
+ if (access(compath(path), READ) == 0) {
+diff --git a/src/display.c b/src/display.c
+index 7ef03cb..dc81226 100644
+--- a/src/display.c
++++ b/src/display.c
+@@ -478,20 +478,20 @@ search(void)
+ /* see if it is empty */
+ if ((c = getc(refsfound)) == EOF) {
+ if (findresult != NULL) {
+- (void) sprintf(lastmsg, "Egrep %s in this pattern: %s",
++ (void) snprintf(lastmsg, sizeof(lastmsg), "Egrep %s in this pattern: %s",
+ findresult, Pattern);
+ } else if (rc == NOTSYMBOL) {
+- (void) sprintf(lastmsg, "This is not a C symbol: %s",
++ (void) snprintf(lastmsg, sizeof(lastmsg), "This is not a C symbol: %s",
+ Pattern);
+ } else if (rc == REGCMPERROR) {
+- (void) sprintf(lastmsg, "Error in this regcomp(3) regular expression: %s",
++ (void) snprintf(lastmsg, sizeof(lastmsg), "Error in this regcomp(3) regular expression: %s",
+ Pattern);
+
+ } else if (funcexist == NO) {
+- (void) sprintf(lastmsg, "Function definition does not exist: %s",
++ (void) snprintf(lastmsg, sizeof(lastmsg), "Function definition does not exist: %s",
+ Pattern);
+ } else {
+- (void) sprintf(lastmsg, "Could not find the %s: %s",
++ (void) snprintf(lastmsg, sizeof(lastmsg), "Could not find the %s: %s",
+ fields[field].text2, Pattern);
+ }
+ return(NO);
+@@ -527,17 +527,17 @@ progress(char *what, long current, long max)
+ move(MSGLINE, 0);
+ clrtoeol();
+ addstr(what);
+- sprintf(msg, "%ld", current);
++ snprintf(msg, sizeof(msg), "%ld", current);
+ move(MSGLINE, (COLS / 2) - (strlen(msg) / 2));
+ addstr(msg);
+- sprintf(msg, "%ld", max);
++ snprintf(msg, sizeof(msg), "%ld", max);
+ move(MSGLINE, COLS - strlen(msg));
+ addstr(msg);
+ refresh();
+ }
+ else if (verbosemode == YES)
+ {
+- sprintf(msg, "> %s %ld of %ld", what, current, max);
++ snprintf(msg, sizeof(msg), "> %s %ld of %ld", what, current, max);
+ }
+
+ start = now;
+@@ -575,7 +575,7 @@ myperror(char *text)
+ s = sys_errlist[errno];
+ }
+ #endif
+- (void) sprintf(msg, "%s: %s", text, s);
++ (void) snprintf(msg, sizeof(msg), "%s: %s", text, s);
+ postmsg(msg);
+ }
+
+@@ -647,11 +647,7 @@ posterr(char *msg, ...)
+ (void) vfprintf(stderr, msg, ap);
+ (void) fputc('\n', stderr);
+ } else {
+-#if HAVE_VSNPRINTF
+ vsnprintf(errbuf, sizeof(errbuf), msg, ap);
+-#else
+- vsprintf(errbuf, msg, ap);
+-#endif
+ postmsg2(errbuf);
+ }
+ }
+@@ -664,11 +660,7 @@ postfatal(const char *msg, ...)
+ char errbuf[MSGLEN];
+
+ va_start(ap, msg);
+-#if HAVE_VSNPRINTF
+ vsnprintf(errbuf, sizeof(errbuf), msg, ap);
+-#else
+- vsprintf(errbuf, msg, ap);
+-#endif
+ /* restore the terminal to its original mode */
+ if (incurses == YES) {
+ exitcurses();
+diff --git a/src/edit.c b/src/edit.c
+index 5d97949..89a4296 100644
+--- a/src/edit.c
++++ b/src/edit.c
+@@ -105,9 +105,9 @@ edit(char *file, char *linenum)
+ char *s;
+
+ file = filepath(file);
+- (void) sprintf(msg, "%s +%s %s", mybasename(editor), linenum, file);
++ (void) snprintf(msg, sizeof(msg), "%s +%s %s", mybasename(editor), linenum, file);
+ postmsg(msg);
+- (void) sprintf(plusnum, lineflag, linenum);
++ (void) snprintf(plusnum, sizeof(plusnum), lineflag, linenum);
+ /* if this is the more or page commands */
+ if (strcmp(s = mybasename(editor), "more") == 0 || strcmp(s, "page") == 0) {
+
+@@ -132,7 +132,7 @@ filepath(char *file)
+ static char path[PATHLEN + 1];
+
+ if (prependpath != NULL && *file != '/') {
+- (void) sprintf(path, "%s/%s", prependpath, file);
++ (void) snprintf(path, sizeof(path), "%s/%s", prependpath, file);
+ file = path;
+ }
+ return(file);
+diff --git a/src/exec.c b/src/exec.c
+index 7e4899d..467634e 100644
+--- a/src/exec.c
++++ b/src/exec.c
+@@ -123,7 +123,7 @@ myexecvp(char *a, char **args)
+
+ /* execute the program or shell script */
+ execvp(a, args); /* returns only on failure */
+- sprintf(msg, "\nCannot exec %s", a);
++ snprintf(msg, sizeof(msg), "\nCannot exec %s", a);
+ perror(msg); /* display the reason */
+ askforreturn(); /* wait until the user sees the message */
+ myexit(1); /* exit the child */
+diff --git a/src/find.c b/src/find.c
+index f6a6387..1d0a503 100644
+--- a/src/find.c
++++ b/src/find.c
+@@ -673,7 +673,7 @@ findinit(char *pattern)
+ /* must be an exact match */
+ /* note: regcomp doesn't recognize ^*keypad$ as a syntax error
+ unless it is given as a single arg */
+- (void) sprintf(buf, "^%s$", s);
++ (void) snprintf(buf, sizeof(buf), "^%s$", s);
+ if (regcomp (&regexp, buf, REG_EXTENDED | REG_NOSUB) != 0) {
+ return(REGCMPERROR);
+ }
+diff --git a/src/main.c b/src/main.c
+index ca90ea9..5bca752 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -359,7 +359,7 @@ cscope: TMPDIR to a valid directory\n");
+ /* create the temporary file names */
+ orig_umask = umask(S_IRWXG|S_IRWXO);
+ pid = getpid();
+- sprintf(tempdirpv, "%s/cscope.%d", tmpdir, pid);
++ snprintf(tempdirpv, sizeof(tempdirpv), "%s/cscope.%d", tmpdir, pid);
+ if(mkdir(tempdirpv,S_IRWXU)) {
+ fprintf(stderr, "\
+ cscope: Could not create private temp dir %s\n",
+@@ -368,8 +368,8 @@ cscope: Could not create private temp dir %s\n",
+ }
+ umask(orig_umask);
+
+- sprintf(temp1, "%s/cscope.1", tempdirpv);
+- sprintf(temp2, "%s/cscope.2", tempdirpv);
++ snprintf(temp1, sizeof(temp1), "%s/cscope.1", tempdirpv);
++ snprintf(temp2, sizeof(temp2), "%s/cscope.2", tempdirpv);
+
+ /* if running in the foreground */
+ if (signal(SIGINT, SIG_IGN) != SIG_IGN) {
+@@ -389,12 +389,12 @@ cscope: Could not create private temp dir %s\n",
+ * used instead of failing to open a non-existant database in
+ * the home directory
+ */
+- sprintf(path, "%s/%s", home, reffile);
++ snprintf(path, sizeof(path), "%s/%s", home, reffile);
+ if (isuptodate == NO || access(path, READ) == 0) {
+ reffile = my_strdup(path);
+- sprintf(path, "%s/%s", home, invname);
++ snprintf(path, sizeof(path), "%s/%s", home, invname);
+ invname = my_strdup(path);
+- sprintf(path, "%s/%s", home, invpost);
++ snprintf(path, sizeof(path), "%s/%s", home, invpost);
+ invpost = my_strdup(path);
+ }
+ }
+@@ -728,22 +728,12 @@ cannotopen(char *file)
+ void
+ cannotwrite(char *file)
+ {
+-#if HAVE_SNPRINTF
+ char msg[MSGLEN + 1];
+
+ snprintf(msg, sizeof(msg), "Removed file %s because write failed", file);
+-#else
+- char *msg = mymalloc(50 + strlen(file));
+-
+- sprintf(msg, "Removed file %s because write failed", file);
+-#endif
+
+ myperror(msg); /* display the reason */
+
+-#if !HAVE_SNPRINTF
+- free(msg);
+-#endif
+-
+ unlink(file);
+ myexit(1); /* calls exit(2), which closes files */
+ }
+diff --git a/src/vpaccess.c b/src/vpaccess.c
+index cb56730..a3a7ad9 100644
+--- a/src/vpaccess.c
++++ b/src/vpaccess.c
+@@ -49,7 +49,7 @@ vpaccess(char *path, mode_t amode)
+ if ((returncode = access(path, amode)) == -1 && path[0] != '/') {
+ vpinit(NULL);
+ for (i = 1; i < vpndirs; i++) {
+- (void) sprintf(buf, "%s/%s", vpdirs[i], path);
++ (void) snprintf(buf, sizeof(buf), "%s/%s", vpdirs[i], path);
+ if ((returncode = access(buf, amode)) != -1) {
+ break;
+ }
+diff --git a/src/vpfopen.c b/src/vpfopen.c
+index bffbc20..b5f592c 100644
+--- a/src/vpfopen.c
++++ b/src/vpfopen.c
+@@ -53,7 +53,7 @@ vpfopen(char *filename, char *type)
+ ) {
+ vpinit(NULL);
+ for (i = 1; i < vpndirs; i++) {
+- (void) sprintf(buf, "%s/%s", vpdirs[i], filename);
++ (void) snprintf(buf, sizeof(buf), "%s/%s", vpdirs[i], filename);
+ if ((returncode = myfopen(buf, type)) != NULL) {
+ break;
+ }
+diff --git a/src/vpopen.c b/src/vpopen.c
+index 777f168..de7cc53 100644
+--- a/src/vpopen.c
++++ b/src/vpopen.c
+@@ -52,7 +52,7 @@ vpopen(char *path, int oflag)
+ oflag == OPENFLAG_READ) {
+ vpinit(NULL);
+ for (i = 1; i < vpndirs; i++) {
+- (void) sprintf(buf, "%s/%s", vpdirs[i], path);
++ (void) snprintf(buf, sizeof(buf), "%s/%s", vpdirs[i], path);
+ if ((returncode = myopen(buf, oflag, 0666)) != -1) {
+ break;
+ }
asm-generic. Use that to avoid code repetition in arm64. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Cc: will.deacon@arm.com Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: arnd@arndb.de Cc: gregkh@linuxfoundation.org Cc: m.szyprowski@samsung.com Cc: x86@kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-arch@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/7358/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> 2014-09-13arm64: Tell irq work about self IPI supportFrederic Weisbecker1-1/+0 ARM64 irq work self-IPI support depends on __smp_cross_call to point to some relevant IRQ controller operations. This information should be available after the call to init_IRQ(). Lets implement arch_irq_work_has_interrupt() accordingly. Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> 2014-09-13irq_work: Introduce arch_irq_work_has_interrupt()Peter Zijlstra1-1/+2 The nohz full code needs irq work to trigger its own interrupt so that the subsystem can work even when the tick is stopped. Lets introduce arch_irq_work_has_interrupt() that archs can override to tell about their support for this ability. Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> 2014-06-18arm64: uid16: fix __kernel_old_{gid,uid}_t definitionsWill Deacon1-1/+0 Whilst native arm64 applications don't have the 16-bit UID/GID syscalls wired up, compat tasks can still access them. The 16-bit wrappers for these syscalls use __kernel_old_uid_t and __kernel_old_gid_t, which must be 16-bit data types to maintain compatibility with the 16-bit UIDs used by compat applications. This patch defines 16-bit __kernel_old_{gid,uid}_t types for arm64 instead of using the 32-bit types provided by asm-generic. Signed-off-by: Will Deacon <will.deacon@arm.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: <stable@vger.kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> 2014-05-14arm64: pull in <asm/simd.h> from asm-genericArd Biesheuvel1-0/+1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> 2014-04-07arm64: add early_ioremap supportMark Salter1-0/+1 Add support for early IO or memory mappings which are needed before the normal ioremap() is usable. This also adds fixmap support for permanent fixed mappings such as that used by the earlyprintk device register region. Signed-off-by: Mark Salter <msalter@redhat.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Borislav Petkov <borislav.petkov@amd.com> Cc: Dave Young <dyoung@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> 2014-03-31Merge tag 'arm64-upstream' of ↵Linus Torvalds1-0/+1 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull ARM64 updates from Catalin Marinas: - KGDB support for arm64 - PCI I/O space extended to 16M (in preparation of PCIe support patches) - Dropping ZONE_DMA32 in favour of ZONE_DMA (we only need one for the time being), together with swiotlb late initialisation to correctly setup the bounce buffer - DMA API cache maintenance support (not all ARMv8 platforms have hardware cache coherency) - Crypto extensions advertising via ELF_HWCAP2 for compat user space - Perf support for dwarf unwinding in compat mode - asm/tlb.h converted to the generic mmu_gather code - asm-generic rwsem implementation - Code clean-up * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (42 commits) arm64: Remove pgprot_dmacoherent() arm64: Support DMA_ATTR_WRITE_COMBINE arm64: Implement custom mmap functions for dma mapping arm64: Fix __range_ok macro arm64: Fix duplicated Kconfig entries arm64: mm: Route pmd thp functions through pte equivalents arm64: rwsem: use asm-generic rwsem implementation asm-generic: rwsem: de-PPCify rwsem.h arm64: enable generic CPU feature modalias matching for this architecture arm64: smp: make local symbol static arm64: debug: make local symbols static ARM64: perf: support dwarf unwinding in compat mode ARM64: perf: add support for frame pointer unwinding in compat mode ARM64: perf: add support for perf registers API arm64: Add boot time configuration of Intermediate Physical Address size arm64: Do not synchronise I and D caches for special ptes arm64: Make DMA coherent and strongly ordered mappings not executable arm64: barriers: add dmb barrier arm64: topology: Implement basic CPU topology support arm64: advertise ARMv8 extensions to 32-bit compat ELF binaries ... 2014-03-14arm64: rwsem: use asm-generic rwsem implementationWill Deacon1-0/+1 asm-generic offers an atomic-add based rwsem implementation, which can avoid the need for heavier, spinlock-based synchronisation on the fast path. This patch makes use of the optimised implementation for arm64 CPUs. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> 2014-02-09locking/mcs: Allow architecture specific asm files to be used for contended caseTim Chen1-0/+1 This patch allows each architecture to add its specific assembly optimized arch_mcs_spin_lock_contended and arch_mcs_spinlock_uncontended for MCS lock and unlock functions. Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com> Cc: Scott J Norton <scott.norton@hp.com> Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> Cc: AswinChandramouleeswaran <aswin@hp.com> Cc: George Spelvin <linux@horizon.com> Cc: Rik vanRiel <riel@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: MichelLespinasse <walken@google.com> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Alex Shi <alex.shi@linaro.org> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Figo.zhang" <figo1802@gmail.com> Cc: "Paul E.McKenney" <paulmck@linux.vnet.ibm.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Davidlohr Bueso <davidlohr.bueso@hp.com> Cc: Waiman Long <waiman.long@hp.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Will Deacon <will.deacon@arm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Matthew R Wilcox <matthew.r.wilcox@intel.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1390347382.3138.67.camel@schen9-DESK Signed-off-by: Ingo Molnar <mingo@kernel.org> 2014-02-09locking/mcs: Order the header files in Kbuild of each architecture in ↵Tim Chen1-3/+3 alphabetical order We perform a clean up of the Kbuid files in each architecture. We order the files in each Kbuild in alphabetical order by running the below script. for i in arch/*/include/asm/Kbuild do cat $i | gawk '/^generic-y/ { i = 3; do { for (; i <= NF; i++) { if ($i == "\\") { getline; i = 1; continue; } if ($i != "") hdr[$i] = $i; } break; } while (1); next; } // { print $0; } END { n = asort(hdr); for (i = 1; i <= n; i++) print "generic-y += " hdr[i]; }' > ${i}.sorted; mv ${i}.sorted $i; done Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Matthew R Wilcox <matthew.r.wilcox@intel.com> Cc: AswinChandramouleeswaran <aswin@hp.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: "Paul E.McKenney" <paulmck@linux.vnet.ibm.com> Cc: Scott J Norton <scott.norton@hp.com> Cc: Will Deacon <will.deacon@arm.com> Cc: "Figo.zhang" <figo1802@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Rik van Riel <riel@redhat.com> Cc: Waiman Long <waiman.long@hp.com> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Alex Shi <alex.shi@linaro.org> Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: George Spelvin <linux@horizon.com> Cc: MichelLespinasse <walken@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Davidlohr Bueso <davidlohr.bueso@hp.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Peter Zijlstra <peterz@infradead.org> [ Fixed build bug. ] Signed-off-by: Ingo Molnar <mingo@kernel.org> 2014-01-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds1-0/+1 Pull networking updates from David Miller: 1) BPF debugger and asm tool by Daniel Borkmann. 2) Speed up create/bind in AF_PACKET, also from Daniel Borkmann. 3) Correct reciprocal_divide and update users, from Hannes Frederic Sowa and Daniel Borkmann. 4) Currently we only have a "set" operation for the hw timestamp socket ioctl, add a "get" operation to match. From Ben Hutchings. 5) Add better trace events for debugging driver datapath problems, also from Ben Hutchings. 6) Implement auto corking in TCP, from Eric Dumazet. Basically, if we have a small send and a previous packet is already in the qdisc or device queue, defer until TX completion or we get more data. 7) Allow userspace to manage ipv6 temporary addresses, from Jiri Pirko. 8) Add a qdisc bypass option for AF_PACKET sockets, from Daniel Borkmann. 9) Share IP header compression code between Bluetooth and IEEE802154 layers, from Jukka Rissanen. 10) Fix ipv6 router reachability probing, from Jiri Benc. 11) Allow packets to be captured on macvtap devices, from Vlad Yasevich. 12) Support tunneling in GRO layer, from Jerry Chu. 13) Allow bonding to be configured fully using netlink, from Scott Feldman. 14) Allow AF_PACKET users to obtain the VLAN TPID, just like they can already get the TCI. From Atzm Watanabe. 15) New "Heavy Hitter" qdisc, from Terry Lam. 16) Significantly improve the IPSEC support in pktgen, from Fan Du. 17) Allow ipv4 tunnels to cache routes, just like sockets. From Tom Herbert. 18) Add Proportional Integral Enhanced packet scheduler, from Vijay Subramanian. 19) Allow openvswitch to mmap'd netlink, from Thomas Graf. 20) Key TCP metrics blobs also by source address, not just destination address. From Christoph Paasch. 21) Support 10G in generic phylib. From Andy Fleming. 22) Try to short-circuit GRO flow compares using device provided RX hash, if provided. From Tom Herbert. The wireless and netfilter folks have been busy little bees too. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2064 commits) net/cxgb4: Fix referencing freed adapter ipv6: reallocate addrconf router for ipv6 address when lo device up fib_frontend: fix possible NULL pointer dereference rtnetlink: remove IFLA_BOND_SLAVE definition rtnetlink: remove check for fill_slave_info in rtnl_have_link_slave_info qlcnic: update version to 5.3.55 qlcnic: Enhance logic to calculate msix vectors. qlcnic: Refactor interrupt coalescing code for all adapters. qlcnic: Update poll controller code path qlcnic: Interrupt code cleanup qlcnic: Enhance Tx timeout debugging. qlcnic: Use bool for rx_mac_learn. bonding: fix u64 division rtnetlink: add missing IFLA_BOND_AD_INFO_UNSPEC sfc: Use the correct maximum TX DMA ring size for SFC9100 Add Shradha Shah as the sfc driver maintainer. net/vxlan: Share RX skb de-marking and checksum checks with ovs tulip: cleanup by using ARRAY_SIZE() ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called net/cxgb4: Don't retrieve stats during recovery ... 2013-12-19arm64: percpu: implement optimised pcpu access using tpidr_el1Will Deacon1-1/+0 This patch implements optimised percpu variable accesses using the el1 r/w thread register (tpidr_el1) along the same lines as arch/arm/. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> 2013-12-17lib: Add missing arch generic-y entries for asm-generic/hash.hDavid S. Miller1-0/+1 Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net> 2013-09-25sched, arch: Create asm/preempt.hPeter Zijlstra1-0/+1 In order to prepare to per-arch implementations of preempt_count move the required bits into an asm-generic header and use this for all archs. Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/n/tip-h5j0c1r3e3fk015m30h8f1zx@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> 2013-04-25arm64: compiling issue, need add include/asm/vga.h fileChen Gang1-0/+1 For compiling with allmodconfig, need vga.h file, so generate it which just only include the asm-generic one. It is firstly used by drivers/gpu/drm/drm_irq.c. The related error: include/video/vga.h:22:21: fatal error: asm/vga.h: No such file or directory Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> 2013-03-21arm64: klib: Optimised memory functionsCatalin Marinas1-1/+0 This patch introduces AArch64-specific memory functions (memcpy, memmove, memchr, memset). These functions are not optimised for any CPU implementation but can be used as a starting point once hardware is available. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> 2013-01-29arm64: Add kvm_para.h and xor.h generic headersCatalin Marinas1-0/+2 Required for make allyesconfig. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> 2012-12-12Merge tag 'arm64-for-linus' of ↵Linus Torvalds1-0/+1 git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64 Pull ARM64 updates from Catalin Marinas: - Generic execve, kernel_thread, fork/vfork/clone. - Preparatory patches for KVM support (initialising EL2 mode for later installing KVM support, hypervisor stub). - Signal handling corner case fix (alternative signal stack set up for a SEGV handler, which is raised in response to RLIMIT_STACK being reached). - Sub-nanosecond timer error fix. * tag 'arm64-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64: (30 commits) arm64: Update the MAINTAINERS entry arm64: compat for clock_adjtime(2) is miswired arm64: move FP-SIMD save/restore code to a macro arm64: hyp: initialize vttbr_el2 to zero arm64: add hypervisor stub arm64: record boot mode when entering the kernel arm64: move vector entry macro to assembler.h arm64: add AArch32 execution modes to ptrace.h arm64: expand register mapping between AArch32 and AArch64 arm64: generic timer: use virtual counter instead of physical at EL0 arm64: vdso: defer shifting of nanosecond component of timespec arm64: vdso: rework __do_get_tspec register allocation and return shift arm64: vdso: check sequence counter even for coarse realtime operations arm64: vdso: fix clocksource mask when extracting bottom 56 bits ARM64: Remove incorrect Kconfig symbol HAVE_SPARSE_IRQ Documentation: Fixes a word in Documentation/arm64/memory.txt arm64: Make !dirty ptes read-only arm64: Convert empty flush_cache_{mm,page} functions to static inline arm64: signal: let the compiler inline compat_get_sigframe arm64: signal: return struct rt_sigframe from get_sigframe ... Conflicts: arch/arm64/include/asm/unistd32.h 2012-11-23arm64: Include the clkdev.h generic headerCatalin Marinas1-0/+1 This patch updates the arm64 asm/Kbuild file to include the clkdev.h generic header. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Viresh Kumar <Viresh.kumar@linaro.org> 2012-11-13tracing,x86: Add a TSC trace_clockDavid Sharp1-0/+1 In order to promote interoperability between userspace tracers and ftrace, add a trace_clock that reports raw TSC values which will then be recorded in the ring buffer. Userspace tracers that also record TSCs are then on exactly the same time base as the kernel and events can be unambiguously interlaced. Tested: Enabled a tracepoint and the "tsc" trace_clock and saw very large timestamp values. v2: Move arch-specific bits out of generic code. v3: Rename "x86-tsc", cleanups v7: Generic arch bits in Kbuild. Google-Bug-Id: 6980623 Link: http://lkml.kernel.org/r/1352837903-32191-1-git-send-email-dhsharp@google.com Acked-by: Ingo Molnar <mingo@kernel.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@linux.intel.com> Signed-off-by: David Sharp <dhsharp@google.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> 2012-10-20arm64: fix alignment padding in assembly codeMarc Zyngier1-1/+0 An interesting effect of using the generic version of linkage.h is that the padding is defined in terms of x86 NOPs, which can have even more interesting effects when the assembly code looks like this: ENTRY(func1) mov x0, xzr ENDPROC(func1) // fall through ENTRY(func2) mov x0, #1 ret ENDPROC(func2) Admittedly, the code is not very nice. But having code from another architecture doesn't look completely sane either. The fix is to add arm64's version of linkage.h, which causes the insertion of proper AArch64 NOPs. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> 2012-10-11UAPI: (Scripted) Disintegrate arch/arm64/include/asmDavid Howells1-2/+0 Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com> 2012-09-17arm64: Miscellaneous header filesCatalin Marinas1-0/+51 This patch introduces a few AArch64-specific header files together with Kbuild entries for generic headers. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Nicolas Pitre <nico@linaro.org> Acked-by: Olof Johansson <olof@lixom.net> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Arnd Bergmann <arnd@arndb.de>