1. 30 Aug, 2013 1 commit
  2. 27 Mar, 2013 1 commit
  3. 05 Feb, 2013 1 commit
    • Arnd Bergmann's avatar
      samples/seccomp: be less stupid about cross compiling · 275aaa68
      Arnd Bergmann authored
      The seccomp filters are currently built for the build host, not for the
      machine that they are going to run on, but they are also built for with
      the -m32 flag if the kernel is built for a 32 bit machine, both of which
      seems rather odd.
      It broke allyesconfig on my machine, which is x86-64, but building for
      32 bit ARM, with this error message:
        In file included from /usr/include/stdio.h:28:0,
                         from samples/seccomp/bpf-fancy.c:15:
        /usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
      because there are no 32 bit libc headers installed on this machine.  We
      should really be building all the samples for the target machine rather
      than the build host, but since the infrastructure for that appears to be
      missing right now, let's be a little bit smarter and not pass the '-m32'
      flag to the HOSTCC when cross- compiling.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: James Morris <james.l.morris@oracle.com>
      Acked-by: default avatarWill Drewry <wad@chromium.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  4. 25 Jan, 2013 1 commit
  5. 03 Jan, 2013 1 commit
    • Greg Kroah-Hartman's avatar
      misc: remove __dev* attributes. · 6ae14171
      Greg Kroah-Hartman authored
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      This change removes the last of the __dev* markings from the kernel from
      a variety of different, tiny, places.
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  6. 12 Sep, 2012 1 commit
  7. 03 Aug, 2012 1 commit
  8. 28 Jun, 2012 1 commit
  9. 18 Jun, 2012 1 commit
    • David Herrmann's avatar
      HID: uhid: add example program · 5148fa52
      David Herrmann authored
      This adds an example user-space program that emulates a 3 button mouse
      with wheel. It detects keyboard presses and moves the mouse accordingly.
      It register a fake HID device to feed the raw HID reports into the kernel.
      In this example, you could use uinput to get the same result, but this
      shows how to get the same behavior with uhid so you don't need HID parsers
      in user-space.
      Signed-off-by: default avatarDavid Herrmann <dh.herrmann@googlemail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
  10. 19 Apr, 2012 1 commit
  11. 14 Apr, 2012 1 commit
    • Will Drewry's avatar
      Documentation: prctl/seccomp_filter · 8ac270d1
      Will Drewry authored
      Documents how system call filtering using Berkeley Packet
      Filter programs works and how it may be used.
      Includes an example for x86 and a semi-generic
      example using a macro-based code generator.
      Acked-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarWill Drewry <wad@chromium.org>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      v18: - added acked by
           - update no new privs numbers
      v17: - remove @compat note and add Pitfalls section for arch checking
      v16: -
      v15: -
      v14: - rebase/nochanges
      v13: - rebase on to 88ebdda6
      v12: - comment on the ptrace_event use
           - update arch support comment
           - note the behavior of SECCOMP_RET_DATA when there are multiple filters
           - lots of samples/ clean up incl 64-bit bpf-direct support
           - rebase to linux-next
      v11: - overhaul return value language, updates (keescook@chromium.org)
           - comment on do_exit(SIGSYS)
      v10: - update for SIGSYS
           - update for new seccomp_data layout
           - update for ptrace option use
      v9: - updated bpf-direct.c for SIGILL
      v8: - add PR_SET_NO_NEW_PRIVS to the samples.
      v7: - updated for all the new stuff in v7: TRAP, TRACE
          - only talk about PR_SET_SECCOMP now
          - fixed bad JLE32 check (coreyb@linux.vnet.ibm.com)
          - adds dropper.c: a simple system call disabler
      v6: - tweak the language to note the requirement of
            PR_SET_NO_NEW_PRIVS being called prior to use. (luto@mit.edu)
      v5: - update sample to use system call arguments
          - adds a "fancy" example using a macro-based generator
          - cleaned up bpf in the sample
          - update docs to mention arguments
          - fix prctl value (eparis@redhat.com)
          - language cleanup (rdunlap@xenotime.net)
      v4: - update for no_new_privs use
          - minor tweaks
      v3: - call out BPF <-> Berkeley Packet Filter (rdunlap@xenotime.net)
          - document use of tentative always-unprivileged
          - guard sample compilation for i386 and x86_64
      v2: - move code to samples (corbet@lwn.net)
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
  12. 08 Feb, 2012 1 commit
    • Ohad Ben-Cohen's avatar
      samples/rpmsg: add an rpmsg driver sample · 779b96d2
      Ohad Ben-Cohen authored
      Add an rpmsg driver sample, which demonstrates how to communicate with
      an AMP-configured remote processor over the rpmsg bus.
      Note how once probed, the driver can immediately start sending messages
      using the rpmsg_send() API, without having to worry about creating endpoints
      or allocating rpmsg addresses: all that work is done by the rpmsg bus,
      and the required information is already embedded in the rpmsg channel
      that the driver is probed with.
      In this sample, the driver simply sends a "Hello World!" message to the remote
      processor repeatedly.
      Designed with Brian Swetland <swetland@google.com>.
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      Cc: Brian Swetland <swetland@google.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Greg KH <greg@kroah.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
  13. 31 Oct, 2011 1 commit
  14. 01 Jul, 2011 2 commits
    • Avi Kivity's avatar
      perf: Add context field to perf_event · 4dc0da86
      Avi Kivity authored
      The perf_event overflow handler does not receive any caller-derived
      argument, so many callers need to resort to looking up the perf_event
      in their local data structure.  This is ugly and doesn't scale if a
      single callback services many perf_events.
      Fix by adding a context parameter to perf_event_create_kernel_counter()
      (and derived hardware breakpoints APIs) and storing it in the perf_event.
      The field can be accessed from the callback as event->overflow_handler_context.
      All callers are updated.
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1309362157-6596-2-git-send-email-avi@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
    • Peter Zijlstra's avatar
      perf: Remove the nmi parameter from the swevent and overflow interface · a8b0ca17
      Peter Zijlstra authored
      The nmi parameter indicated if we could do wakeups from the current
      context, if not, we would set some state and self-IPI and let the
      resulting interrupt do the wakeup.
      For the various event classes:
        - hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from
          the PMI-tail (ARM etc.)
        - tracepoint: nmi=0; since tracepoint could be from NMI context.
        - software: nmi=[0,1]; some, like the schedule thing cannot
          perform wakeups, and hence need 0.
      As one can see, there is very little nmi=1 usage, and the down-side of
      not using it is that on some platforms some software events can have a
      jiffy delay in wakeup (when arch_irq_work_raise isn't implemented).
      The up-side however is that we can remove the nmi parameter and save a
      bunch of conditionals in fast paths.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Michael Cree <mcree@orcon.net.nz>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Eric B Munson <emunson@mgebm.net>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Link: http://lkml.kernel.org/n/tip-agjev8eu666tvknpb3iaj0fg@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
  15. 21 Apr, 2011 1 commit
    • Randy Dunlap's avatar
      HID: hid-example: fix some build issues · d431b2e3
      Randy Dunlap authored
      samples/hid-example.o needs some Kconfig and Makefile additions in order
      to build.  It should use <linux/*.h> headers from the build tree, so use
      HEADERS_CHECK to require that those header files be present.
      Change the kconfig symbol from tristate to bool since userspace cannot be
      built as loadable modules.
      However, I don't understand why the userspace header files are not present
      as reported in Andrew's build log, since it builds OK on x86_64 without
      any of these changes.
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Alan Ott <alan@signal11.us>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
  16. 08 Apr, 2011 1 commit
  17. 31 Mar, 2011 1 commit
  18. 22 Mar, 2011 1 commit
  19. 29 Oct, 2010 1 commit
  20. 15 Oct, 2010 1 commit
    • Arnd Bergmann's avatar
      llseek: automatically add .llseek fop · 6038f373
      Arnd Bergmann authored
      All file_operations should get a .llseek operation so we can make
      nonseekable_open the default for future file operations without a
      .llseek pointer.
      The three cases that we can automatically detect are no_llseek, seq_lseek
      and default_llseek. For cases where we can we can automatically prove that
      the file offset is always ignored, we use noop_llseek, which maintains
      the current behavior of not returning an error from a seek.
      New drivers should normally not use noop_llseek but instead use no_llseek
      and call nonseekable_open at open time.  Existing drivers can be converted
      to do the same when the maintainer knows for certain that no user code
      relies on calling seek on the device file.
      The generated code is often incorrectly indented and right now contains
      comments that clarify for each added line why a specific variant was
      chosen. In the version that gets submitted upstream, the comments will
      be gone and I will manually fix the indentation, because there does not
      seem to be a way to do that using coccinelle.
      Some amount of new code is currently sitting in linux-next that should get
      the same modifications, which I will do at the end of the merge window.
      Many thanks to Julia Lawall for helping me learn to write a semantic
      patch that does all this.
      ===== begin semantic patch =====
      // This adds an llseek= method to all file operations,
      // as a preparation for making no_llseek the default.
      // The rules are
      // - use no_llseek explicitly if we do nonseekable_open
      // - use seq_lseek for sequential files
      // - use default_llseek if we know we access f_pos
      // - use noop_llseek if we know we don't access f_pos,
      //   but we still want to allow users to call lseek
      @ open1 exists @
      identifier nested_open;
      @ open exists@
      identifier open_f;
      identifier i, f;
      identifier open1.nested_open;
      int open_f(struct inode *i, struct file *f)
      @ read disable optional_qualifier exists @
      identifier read_f;
      identifier f, p, s, off;
      type ssize_t, size_t, loff_t;
      expression E;
      identifier func;
      ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
         *off = E
         *off += E
         func(..., off, ...)
         E = *off
      @ read_no_fpos disable optional_qualifier exists @
      identifier read_f;
      identifier f, p, s, off;
      type ssize_t, size_t, loff_t;
      ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
      ... when != off
      @ write @
      identifier write_f;
      identifier f, p, s, off;
      type ssize_t, size_t, loff_t;
      expression E;
      identifier func;
      ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
        *off = E
        *off += E
        func(..., off, ...)
        E = *off
      @ write_no_fpos @
      identifier write_f;
      identifier f, p, s, off;
      type ssize_t, size_t, loff_t;
      ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
      ... when != off
      @ fops0 @
      identifier fops;
      struct file_operations fops = {
      @ has_llseek depends on fops0 @
      identifier fops0.fops;
      identifier llseek_f;
      struct file_operations fops = {
       .llseek = llseek_f,
      @ has_read depends on fops0 @
      identifier fops0.fops;
      identifier read_f;
      struct file_operations fops = {
       .read = read_f,
      @ has_write depends on fops0 @
      identifier fops0.fops;
      identifier write_f;
      struct file_operations fops = {
       .write = write_f,
      @ has_open depends on fops0 @
      identifier fops0.fops;
      identifier open_f;
      struct file_operations fops = {
       .open = open_f,
      // use no_llseek if we call nonseekable_open
      @ nonseekable1 depends on !has_llseek && has_open @
      identifier fops0.fops;
      identifier nso ~= "nonseekable_open";
      struct file_operations fops = {
      ...  .open = nso, ...
      +.llseek = no_llseek, /* nonseekable */
      @ nonseekable2 depends on !has_llseek @
      identifier fops0.fops;
      identifier open.open_f;
      struct file_operations fops = {
      ...  .open = open_f, ...
      +.llseek = no_llseek, /* open uses nonseekable */
      // use seq_lseek for sequential files
      @ seq depends on !has_llseek @
      identifier fops0.fops;
      identifier sr ~= "seq_read";
      struct file_operations fops = {
      ...  .read = sr, ...
      +.llseek = seq_lseek, /* we have seq_read */
      // use default_llseek if there is a readdir
      @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier readdir_e;
      // any other fop is used that changes pos
      struct file_operations fops = {
      ... .readdir = readdir_e, ...
      +.llseek = default_llseek, /* readdir is present */
      // use default_llseek if at least one of read/write touches f_pos
      @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier read.read_f;
      // read fops use offset
      struct file_operations fops = {
      ... .read = read_f, ...
      +.llseek = default_llseek, /* read accesses f_pos */
      @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier write.write_f;
      // write fops use offset
      struct file_operations fops = {
      ... .write = write_f, ...
      +	.llseek = default_llseek, /* write accesses f_pos */
      // Use noop_llseek if neither read nor write accesses f_pos
      @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier read_no_fpos.read_f;
      identifier write_no_fpos.write_f;
      // write fops use offset
      struct file_operations fops = {
       .write = write_f,
       .read = read_f,
      +.llseek = noop_llseek, /* read and write both use no f_pos */
      @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier write_no_fpos.write_f;
      struct file_operations fops = {
      ... .write = write_f, ...
      +.llseek = noop_llseek, /* write uses no f_pos */
      @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier read_no_fpos.read_f;
      struct file_operations fops = {
      ... .read = read_f, ...
      +.llseek = noop_llseek, /* read uses no f_pos */
      @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      struct file_operations fops = {
      +.llseek = noop_llseek, /* no read or write fn */
      ===== End semantic patch =====
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: Christoph Hellwig <hch@infradead.org>
  21. 01 Oct, 2010 1 commit
    • Ira W. Snyder's avatar
      kfifo: fix scatterlist usage · 399f1e30
      Ira W. Snyder authored
      The kfifo_dma family of functions use sg_mark_end() on the last element in
      their scatterlist.  This forces use of a fresh scatterlist for each DMA
      operation, which makes recycling a single scatterlist impossible.
      Change the behavior of the kfifo_dma functions to match the usage of the
      dma_map_sg function.  This means that users must respect the returned
      nents value.  The sample code is updated to reflect the change.
      This bug is trivial to cause: call kfifo_dma_in_prepare() such that it
      prepares a scatterlist with a single entry comprising the whole fifo.
      This is the case when you map the entirety of a newly created empty fifo.
      This causes the setup_sgl() function to mark the first scatterlist entry
      as the end of the chain, no matter what comes after it.
      Afterwards, add and remove some data from the fifo such that another call
      to kfifo_dma_in_prepare() will create two scatterlist entries.  It returns
      nents=2.  However, due to the previous sg_mark_end() call, sg_is_last()
      will now return true for the first scatterlist element.  This causes the
      sample code to print a single scatterlist element when it should print
      By removing the call to sg_mark_end(), we make the API as similar as
      possible to the DMA mapping API.  All users are required to respect the
      returned nents.
      Signed-off-by: default avatarIra W. Snyder <iws@ovro.caltech.edu>
      Cc: Stefani Seibold <stefani@seibold.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  22. 20 Aug, 2010 5 commits
  23. 11 Aug, 2010 1 commit
  24. 05 Aug, 2010 1 commit
  25. 14 May, 2010 1 commit
    • Steven Rostedt's avatar
      tracing: Let tracepoints have data passed to tracepoint callbacks · 38516ab5
      Steven Rostedt authored
      This patch adds data to be passed to tracepoint callbacks.
      The created functions from DECLARE_TRACE() now need a mandatory data
      parameter. For example:
      DECLARE_TRACE(mytracepoint, int value, value)
      Will create the register function:
      int register_trace_mytracepoint((void(*)(void *data, int value))probe,
                                      void *data);
      As the first argument, all callbacks (probes) must take a (void *data)
      parameter. So a callback for the above tracepoint will look like:
      void myprobe(void *data, int value)
      The callback may choose to ignore the data parameter.
      This change allows callbacks to register a private data pointer along
      with the function probe.
      	void mycallback(void *data, int value);
      	register_trace_mytracepoint(mycallback, mydata);
      Then the mycallback() will receive the "mydata" as the first parameter
      before the args.
      A more detailed example:
        DECLARE_TRACE(mytracepoint, TP_PROTO(int status), TP_ARGS(status));
        /* In the C file */
        DEFINE_TRACE(mytracepoint, TP_PROTO(int status), TP_ARGS(status));
        /* In a file registering this tracepoint */
        int my_callback(void *data, int status)
      	struct my_struct my_data = data;
      	my_data = kmalloc(sizeof(*my_data), GFP_KERNEL);
      	register_trace_mytracepoint(my_callback, my_data);
      The same callback can also be registered to the same tracepoint as long
      as the data registered is different. Note, the data must also be used
      to unregister the callback:
      	unregister_trace_mytracepoint(my_callback, my_data);
      Because of the data parameter, tracepoints declared this way can not have
      no args. That is:
        DECLARE_TRACE(mytracepoint, TP_PROTO(void), TP_ARGS());
      will cause an error.
      If no arguments are needed, a new macro can be used instead:
      Since there are no arguments, the proto and args fields are left out.
      This is part of a series to make the tracepoint footprint smaller:
         text	   data	    bss	    dec	    hex	filename
      4913961	1088356	 861512	6863829	 68bbd5	vmlinux.orig
      4914025	1088868	 861512	6864405	 68be15	vmlinux.class
      4918492	1084612	 861512	6864616	 68bee8	vmlinux.tracepoint
      Again, this patch also increases the size of the kernel, but
      lays the ground work for decreasing it.
       v5: Fixed net/core/drop_monitor.c to handle these updates.
       v4: Moved the DECLARE_TRACE() DECLARE_TRACE_NOARGS out of the
           #ifdef CONFIG_TRACE_POINTS, since the two are the same in both
           cases. The __DECLARE_TRACE() is what changes.
           Thanks to Frederic Weisbecker for pointing this out.
       v3: Made all register_* functions require data to be passed and
           all callbacks to take a void * parameter as its first argument.
           This makes the calling functions comply with C standards.
           Also added more comments to the modifications of DECLARE_TRACE().
       v2: Made the DECLARE_TRACE() have the ability to pass arguments
           and added a new DECLARE_TRACE_NOARGS() for tracepoints that
           do not need any arguments.
      Acked-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Acked-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
  26. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      The script does the followings.
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
      The conversion was done in the following steps.
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
      6. percpu.h was updated not to include slab.h.
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
  27. 08 Mar, 2010 3 commits
  28. 27 Feb, 2010 1 commit
    • Tejun Heo's avatar
      percpu: Add __percpu sparse annotations to hw_breakpoint · 44ee6358
      Tejun Heo authored
      Add __percpu sparse annotations to hw_breakpoint.
      These annotations are to make sparse consider percpu variables to be
      in a different address space and warn if accessed without going
      through percpu accessors.  This patch doesn't affect normal builds.
      In kernel/hw_breakpoint.c, per_cpu(nr_task_bp_pinned, cpu)'s will
      trigger spurious noderef related warnings from sparse.  Changing it to
      &per_cpu(nr_task_bp_pinned[0], cpu) will work around the problem but
      deemed to ugly by the maintainer.  Leave it alone until better
      solution can be found.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      LKML-Reference: <4B7B4B7A.9050902@kernel.org>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
  29. 06 Dec, 2009 1 commit
  30. 27 Nov, 2009 1 commit
  31. 26 Nov, 2009 1 commit
    • Frederic Weisbecker's avatar
      hw-breakpoints: Simplify error handling in breakpoint creation requests · 605bfaee
      Frederic Weisbecker authored
      This simplifies the error handling when we create a breakpoint.
      We don't need to check the NULL return value corner case anymore
      since we have improved perf_event_create_kernel_counter() to
      always return an error code in the failure case.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Prasad <prasad@linux.vnet.ibm.com>
      LKML-Reference: <1259210142-5714-3-git-send-regression-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
  32. 23 Nov, 2009 1 commit
  33. 10 Nov, 2009 1 commit