Permalink
Commits on Nov 9, 2018
  1. Merge pull request #84 from ryncsn/doc-update

    ppwaskie committed Nov 9, 2018
    Update document and help message
  2. Update document for option --banmod and --deepestcache

    ryncsn committed Nov 9, 2018
    '--banmod' is not documented, and '--deepestcache's alias '-c' is
    missing.
    
    Also fix an typo.
    
    Signed-off-by: Kairui Song <kasong@redhat.com>
  3. Remove hintpolicy related options in help message

    ryncsn committed Nov 9, 2018
    hintpolicy was dropped sometime ago so related help message should be
    dropped as well.
    
    Signed-off-by: Kairui Song <kasong@redhat.com>
Commits on Nov 5, 2018
  1. Merge pull request #83 from ryncsn/socket-leak

    nhorman committed Nov 5, 2018
    Don't leak socket fd on connection error
    Acked-by: Neil Horman <nhorman@tuxdriver.com>
  2. Don't leak socket fd on connection error

    ryncsn committed Nov 5, 2018
    Signed-off-by: Kairui Song <kasong@redhat.com>
Commits on Oct 27, 2018
  1. Update configure.ac to print latest version

    Neil Horman Neil Horman
    Neil Horman authored and Neil Horman committed Oct 27, 2018
    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Commits on Oct 19, 2018
  1. Merge pull request #82 from gerd-rausch/orabug28420119

    nhorman committed Oct 19, 2018
    Fix ambiguous parsing of *node* entries in /sys.
    
    Acked-by: Neil Horman <nhorman@tuxdriver.com>
Commits on Oct 18, 2018
  1. Fix ambiguous parsing of *node* entries in /sys.

    gerd-rausch committed Oct 18, 2018
    The code used to use strstr(..., "node") while iterating over
    sysfs directories such as /sys/devices/system/cpu/cpu*.
    It then made an assumption that the entry would start with "node",
    which is not necessarily the case (e.g. the "firmware_node" entry).
    
    The code happened to work for as long as the node[0-9]* entry
    would be processed before the "firmware_node" entry shows up.
    
    A change to the linux kernel "end_name_hash" function resulted
    in a different hash, and ultimately in a different order
    by which entries were returned by readdir(3).
    
    This led to the exposure of this bug.
    
    Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
  2. Merge pull request #81 from liangxiao1/upstream

    nhorman committed Oct 18, 2018
    procinterrupts: check xen-dyn-event more flexible
    Acked-by: Neil Horman <nhorman@tuxdriver.com>
  3. procinterrupts: check xen-dyn-event more flexible

    liangxiao1 committed Oct 18, 2018
    In current /proc/interrupts, the 'xen-dyn-event' was split to 'xen-dyn    -event'.
    It causes interrupts not balanced inside xen guest.
    
    Below result is without this patch:
     70:         29          0          0          0   xen-dyn    -event     vif0-q0-tx
     71:        120          0          0          0   xen-dyn    -event     vif0-q0-rx
     72:     586350          0          0          0   xen-dyn    -event     vif0-q1-tx
     73:         44          0          0          0   xen-dyn    -event     vif0-q1-rx
     74:         19          0          0          0   xen-dyn    -event     vif0-q2-tx
     75:        179          0          0          0   xen-dyn    -event     vif0-q2-rx
     76:         67          0          0          0   xen-dyn    -event     vif0-q3-tx
     77:     299637          0          0          0   xen-dyn    -event     vif0-q3-rx
    
    Below result is with this patch:
    [root@dhcp-3-194 ~]# grep vif0 /proc/interrupts
     70:         30          0          0          0   xen-dyn    -event     vif0-q0-tx
     71:        305          0         11          0   xen-dyn    -event     vif0-q0-rx
     72:     586354          0         27          0   xen-dyn    -event     vif0-q1-tx
     73:         49          7          5          0   xen-dyn    -event     vif0-q1-rx
     74:         27          0          0     509373   xen-dyn    -event     vif0-q2-tx
     75:        420          0          5          0   xen-dyn    -event     vif0-q2-rx
     76:        179          0         38          0   xen-dyn    -event     vif0-q3-tx
     77:     299803     281433          0          0   xen-dyn    -event     vif0-q3-rx
    
    Signed-off-by: Xiao Liang <xiliang@redhat.com>
Commits on Oct 12, 2018
  1. Merge pull request #80 from ryncsn/custom-script

    nhorman committed Oct 12, 2018
    misc: Add an example for policy script
    Acked-by: Neil Horman <nhorman@tuxdriver.com>
  2. misc: Add an example for policy script

    ryncsn committed Oct 12, 2018
    Add a do-nothing policy script as an example, pre-implement some basic
    logic that could be used for applying affinity_hinting setting strictly
    for IRQs of certain drivers.
  3. Merge pull request #79 from ryncsn/ignore-non-exec-script

    nhorman committed Oct 12, 2018
    policyscript: ignore non-executable files when specifying a directory
    
    Acked-by: Neil Horman <nhorman@tuxdriver.com>
  4. policyscript: ignore non-executable files when specifying a directory

    ryncsn committed Oct 10, 2018
    Currenly irqbalance require custom scirpts to be executable. If a
    non-executable file is found, irqbalance will stil try to execute it but
    fail with no permission error.
    
    So just ignore non-executable file, this also make is possible to have
    non-executable files in policyscript directory as reference.
    
    Signed-off-by: Kairui Song <kasong@redhat.com>
Commits on Sep 2, 2018
  1. Merge pull request #78 from ryncsn/master

    ppwaskie committed Sep 2, 2018
    Fix an possible overflow error
  2. Merge pull request #77 from ryncsn/irqbalance-ui-fix

    ppwaskie committed Sep 2, 2018
    Fix irqbalance ui failing to connect to irqbalance daemon
  3. Fix irqbalance ui failing to connect to irqbalance daemon

    ryncsn committed Sep 2, 2018
    irqbalance ui is faling due to the changes in commit 19c25dd.
    This patch align irqbalance-ui's socket connecting routine with
    irqbalance.c
  4. Fix an possible overflow error

    ryncsn committed Sep 2, 2018
    Got:
    "specified bound 2048 exceeds the size 19 of the destination"
    when -O2 is used, and a "*** buffer overflow detected ***" error output
    with no backtrace.
    
    With -O0, it's gone, guess it's some gcc optimization problem, and the
    size there is wrong anyway, this patch could fix it.
Commits on Aug 30, 2018
  1. Merge pull request #76 from ryncsn/master

    nhorman committed Aug 30, 2018
    Fix several memleak problems found by covscan
  2. Fix several memleak problems found by covscan

    ryncsn committed Aug 30, 2018
    Some memleak issues is found by static analysis tools, and can confirm
    irqbalance is leaking memory slowly when there are incomming connection
    to socket.
    
    This patch could solve the memleak problem.
Commits on Aug 9, 2018
  1. Merge pull request #74 from Irqbalance/file-socket

    nhorman committed Aug 9, 2018
    irqbalance: Add support for file-based socket for IPC
  2. irqbalance: Add support for file-based socket for IPC

    PJ Waskiewicz
    PJ Waskiewicz committed Aug 9, 2018
    This patch adds support for a file-based socket in tmpfs. It
    also fixes an inadvertent bug that caused the socket in use to
    be an abstract socket, which wasn't the intent.
    
    This addresses Issue #72.
    
    Signed-off-by: PJ Waskiewicz <pjwaskiewicz@gmail.com>
Commits on Jul 10, 2018
  1. Merge pull request #70 from Irqbalance/affinity

    nhorman committed Jul 10, 2018
    Expansion of policy scripting
Commits on Jul 9, 2018
  1. policyscript: Add ability to specify a directory for multiple scripts

    Neil Horman Neil Horman
    Neil Horman authored and Neil Horman committed Jul 9, 2018
    The policyscript directive allows for the specifcaion of a single script
    to define policy for all hardware on a system, which is good as a
    site/host specific utility, but it makes for difficult work in the event
    that vendors wish to provide guidance for only their own hardware (i.e.
    if vendor A wants certain hardware to follow affinity_hinting without
    affecting other hardware).  To manage this, lets enhance policyscript to
    allow the specification of an entire directory, to which multiple
    scripts can be added.  Semantics for this new directory feature are the
    same as for the single script case, except that the script exit codes
    have additional meaning:
    
    exit code 0 - the script indicates that the referenced irq relates to a
    device that this script recognizes and further script processing should
    stop
    
    exit code 1 - the script indicates that the referenced irq does not
    relate to a device the script recognizes, and script processing should
    continue
    
    exit code >2 - the script indicates an error has occured, and any output
    from it should be ignored, script processing should continue
    
    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
  2. Fix some string copy limitations

    Neil Horman Neil Horman
    Neil Horman authored and Neil Horman committed Jul 9, 2018
    Latest gcc caught some errors in our string copying routines.  Fix those
    up
    
    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
  3. Remove banscript option

    Neil Horman Neil Horman
    Neil Horman authored and Neil Horman committed Jul 9, 2018
    Its been deprecated for a few years and releases now, its time to reap
    this option
    
    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
  4. Merge pull request #69 from Polynomial-C/configure.ac_fixes

    nhorman committed Jul 9, 2018
    Two configure.ac fixes
  5. configure.ac: Fix --enable-irqbalance-ui logic

    Polynomial-C committed Jul 9, 2018
    Before this patch --enable-irqbalance-ui disabled compilation/
    installation of the ui because AC_ARG_WITH is used wrong.
    The third arguement to AC_ARG_WITH is _action-if-present_ which means
    that this action gets triggered once the --enable option has been
    submitted to configure on command line no matter if it's enabled or
    disabled.
    See also https://autotools.io/autoconf/arguments.html chapter 3.1
  6. configure.ac: Fix --without-caps option

    Manuel Mommertz authored and Polynomial-C committed Jul 9, 2018
    irqbalance links to libcap-ng if it is installed, even when useflag
    caps is disabled. This is an error in the configure-script, which
    checks for the wrong variable to determine if the user used --with/
    --without for libcap-ng.
    
    Downstream bug report: https://bugs.gentoo.org/660782
    
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Commits on Jun 25, 2018
  1. Merge pull request #67 from lucaswerkmeister/service

    nhorman committed Jun 25, 2018
    Service file improvements - restrict access to network and other capabilities
Commits on Jun 23, 2018
  1. systemd: add sandboxing directives

    lucaswerkmeister committed Jun 7, 2018
    This sandboxes the service in three ways:
    
    * Remove all capabilities by emptying the capability bounding set and
      setting the no_new_privs bit. irqbalance drops capabilities during
      initialization anyways, and as far as I can tell nothing before that
      step requires capabilities, so we might as well drop them even
      earlier.
    
    * Mount the entire file system except for /proc/irq read-only. /proc/irq
      is the only directory that irqbalance should need to write to
      (assuming that no PID file is configured).
    
    * Disable most communication with the outside world by preventing access
      to address families other than unix(7) (e. g. ip(7), ipv6(7)) and
      hiding sockets in the /run directory from it. (Due to the file system
      restrictions, the daemon cannot allocate new socket files either, but
      the abstract namespace remains accessible for communication with
      irqbalance-ui.)
    
    This is not a complete sandbox, but intended to strike a balance between
    security and a readable, not overly long unit file.
    
    Signed-off-by: Lucas Werkmeister <mail@lucaswerkmeister.de>
Commits on Jun 7, 2018
  1. systemd: add Documentation=

    lucaswerkmeister committed Jun 7, 2018
    Add the manual page and the homepage to the systemd unit. This is
    exposed, for instance, via the `systemctl help irqbalance` command.
    
    Signed-off-by: Lucas Werkmeister <mail@lucaswerkmeister.de>
Commits on May 29, 2018
  1. parse_proc_interrupts: ensure that buffer is long enough for a string

    Neil Horman Neil Horman
    Neil Horman authored and Neil Horman committed May 29, 2018
    Instead of using strcpy to a save each line in /proc/interrupts, use
    strdup  and free to ensure that the buffer will hold the string
    consistently, avoiding the gcc error that using a fixed size stack
    variable triggers
    
    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
  2. classify: remove unused label

    Neil Horman Neil Horman
    Neil Horman authored and Neil Horman committed May 29, 2018
    A recent refactoring in commit a4fbf90
    left us with an unused label 'free' in rebuild_irq_db, just remove it
    
    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
  3. cputree: adjust snprintf sizes to avoid gcc warnings

    Neil Horman Neil Horman
    Neil Horman authored and Neil Horman committed May 29, 2018
    Gcc detects potential overruns in our use of PATH_MAX arrays when
    parsing cpu topology.  This commit corrects those issues by ensuing that
    the print size is no longer than the array size in all cases
    
    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>