25 May, 2013

1 commit


02 May, 2013

1 commit

  • Pull networking updates from David Miller:
    "Highlights (1721 non-merge commits, this has to be a record of some
    sort):

    1) Add 'random' mode to team driver, from Jiri Pirko and Eric
    Dumazet.

    2) Make it so that any driver that supports configuration of multiple
    MAC addresses can provide the forwarding database add and del
    calls by providing a default implementation and hooking that up if
    the driver doesn't have an explicit set of handlers. From Vlad
    Yasevich.

    3) Support GSO segmentation over tunnels and other encapsulating
    devices such as VXLAN, from Pravin B Shelar.

    4) Support L2 GRE tunnels in the flow dissector, from Michael Dalton.

    5) Implement Tail Loss Probe (TLP) detection in TCP, from Nandita
    Dukkipati.

    6) In the PHY layer, allow supporting wake-on-lan in situations where
    the PHY registers have to be written for it to be configured.

    Use it to support wake-on-lan in mv643xx_eth.

    From Michael Stapelberg.

    7) Significantly improve firewire IPV6 support, from YOSHIFUJI
    Hideaki.

    8) Allow multiple packets to be sent in a single transmission using
    network coding in batman-adv, from Martin Hundebøll.

    9) Add support for T5 cxgb4 chips, from Santosh Rastapur.

    10) Generalize the VXLAN forwarding tables so that there is more
    flexibility in configurating various aspects of the endpoints.
    From David Stevens.

    11) Support RSS and TSO in hardware over GRE tunnels in bxn2x driver,
    from Dmitry Kravkov.

    12) Zero copy support in nfnelink_queue, from Eric Dumazet and Pablo
    Neira Ayuso.

    13) Start adding networking selftests.

    14) In situations of overload on the same AF_PACKET fanout socket, or
    per-cpu packet receive queue, minimize drop by distributing the
    load to other cpus/fanouts. From Willem de Bruijn and Eric
    Dumazet.

    15) Add support for new payload offset BPF instruction, from Daniel
    Borkmann.

    16) Convert several drivers over to mdoule_platform_driver(), from
    Sachin Kamat.

    17) Provide a minimal BPF JIT image disassembler userspace tool, from
    Daniel Borkmann.

    18) Rewrite F-RTO implementation in TCP to match the final
    specification of it in RFC4138 and RFC5682. From Yuchung Cheng.

    19) Provide netlink socket diag of netlink sockets ("Yo dawg, I hear
    you like netlink, so I implemented netlink dumping of netlink
    sockets.") From Andrey Vagin.

    20) Remove ugly passing of rtnetlink attributes into rtnl_doit
    functions, from Thomas Graf.

    21) Allow userspace to be able to see if a configuration change occurs
    in the middle of an address or device list dump, from Nicolas
    Dichtel.

    22) Support RFC3168 ECN protection for ipv6 fragments, from Hannes
    Frederic Sowa.

    23) Increase accuracy of packet length used by packet scheduler, from
    Jason Wang.

    24) Beginning set of changes to make ipv4/ipv6 fragment handling more
    scalable and less susceptible to overload and locking contention,
    from Jesper Dangaard Brouer.

    25) Get rid of using non-type-safe NLMSG_* macros and use nlmsg_*()
    instead. From Hong Zhiguo.

    26) Optimize route usage in IPVS by avoiding reference counting where
    possible, from Julian Anastasov.

    27) Convert IPVS schedulers to RCU, also from Julian Anastasov.

    28) Support cpu fanouts in xt_NFQUEUE netfilter target, from Holger
    Eitzenberger.

    29) Network namespace support for nf_log, ebt_log, xt_LOG, ipt_ULOG,
    nfnetlink_log, and nfnetlink_queue. From Gao feng.

    30) Implement RFC3168 ECN protection, from Hannes Frederic Sowa.

    31) Support several new r8169 chips, from Hayes Wang.

    32) Support tokenized interface identifiers in ipv6, from Daniel
    Borkmann.

    33) Use usbnet_link_change() helper in USB net driver, from Ming Lei.

    34) Add 802.1ad vlan offload support, from Patrick McHardy.

    35) Support mmap() based netlink communication, also from Patrick
    McHardy.

    36) Support HW timestamping in mlx4 driver, from Amir Vadai.

    37) Rationalize AF_PACKET packet timestamping when transmitting, from
    Willem de Bruijn and Daniel Borkmann.

    38) Bring parity to what's provided by /proc/net/packet socket dumping
    and the info provided by netlink socket dumping of AF_PACKET
    sockets. From Nicolas Dichtel.

    39) Fix peeking beyond zero sized SKBs in AF_UNIX, from Benjamin
    Poirier"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1722 commits)
    filter: fix va_list build error
    af_unix: fix a fatal race with bit fields
    bnx2x: Prevent memory leak when cnic is absent
    bnx2x: correct reading of speed capabilities
    net: sctp: attribute printl with __printf for gcc fmt checks
    netlink: kconfig: move mmap i/o into netlink kconfig
    netpoll: convert mutex into a semaphore
    netlink: Fix skb ref counting.
    net_sched: act_ipt forward compat with xtables
    mlx4_en: fix a build error on 32bit arches
    Revert "bnx2x: allow nvram test to run when device is down"
    bridge: avoid OOPS if root port not found
    drivers: net: cpsw: fix kernel warn on cpsw irq enable
    sh_eth: use random MAC address if no valid one supplied
    3c509.c: call SET_NETDEV_DEV for all device types (ISA/ISAPnP/EISA)
    tg3: fix to append hardware time stamping flags
    unix/stream: fix peeking with an offset larger than data in queue
    unix/dgram: fix peeking with an offset larger than data in queue
    unix/dgram: peek beyond 0-sized skbs
    openvswitch: Remove unneeded ovs_netdev_get_ifindex()
    ...

    Linus Torvalds
     

01 May, 2013

2 commits

  • * Dump signals from process-wide and per-thread queues with
    different sizes of buffers.
    * Check error paths for buffers with restricted permissions. A part of
    buffer or a whole buffer is for read-only.
    * Try to get nonexistent signal.

    Signed-off-by: Andrew Vagin
    Cc: Roland McGrath
    Cc: Oleg Nesterov
    Cc: "Paul E. McKenney"
    Cc: David Howells
    Cc: Dave Jones
    Cc: "Michael Kerrisk (man-pages)"
    Cc: Pavel Emelyanov
    Cc: Linus Torvalds
    Cc: Pedro Alves
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Vagin
     
  • It creates a mapping of 3 pages and checks that reads, writes and
    clear-refs result in present and soft-dirt bits reported from pagemap2
    set as expected.

    [akpm@linux-foundation.org: alphasort the Makefile TARGETS to reduce rejects]
    Signed-off-by: Pavel Emelyanov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     

30 Apr, 2013

2 commits

  • Pull ktest update from Steven Rostedt:
    "A couple of fixes to handle a config file that tests multiple machines
    and has conflicts it the grub menus. That is, if the machines use the
    same grub menu name, but they are at different locations in the
    menu.lst file"

    * tag 'ktest-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Reset grub menu cache with different machines
    ktest: Allow tests to use different GRUB_MENUs

    Linus Torvalds
     
  • Testing like this for TP_STATUS_AVAILABLE clearly is a stupid bug
    since it always returns true. Fix this by only checking for flags
    where the kernel owns the packet and negate this result, since we
    also could run into the non-zero status TP_STATUS_WRONG_FORMAT
    and need to reclaim frames.

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

25 Apr, 2013

1 commit


20 Apr, 2013

1 commit


08 Apr, 2013

1 commit

  • This patch adds a simple test case that probes the packet socket's
    TPACKET_V1, TPACKET_V2 and TPACKET_V3 behavior regarding mmap(2)'ed
    I/O for a small burst of 100 packets. The test currently runs for ...

    TPACKET_V1: RX_RING, TX_RING
    TPACKET_V2: RX_RING, TX_RING
    TPACKET_V3: RX_RING

    ... and will output on success:

    test: TPACKET_V1 with PACKET_RX_RING .................... 100 pkts (9600 bytes)
    test: TPACKET_V1 with PACKET_TX_RING .................... 100 pkts (9600 bytes)
    test: TPACKET_V2 with PACKET_RX_RING .................... 100 pkts (9600 bytes)
    test: TPACKET_V2 with PACKET_TX_RING .................... 100 pkts (9600 bytes)
    test: TPACKET_V3 with PACKET_RX_RING .................... 100 pkts (9600 bytes)
    OK. All tests passed

    Reusable parts of psock_fanout.c have been put into a psock_lib.h
    file for common usage. Test case successfully tested on x86_64.

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

22 Mar, 2013

1 commit

  • The packetsocket fanout test uses a packet ring. Use TPACKET_V2
    instead of TPACKET_V1 to work around a known 32/64 bit issue in
    the older ring that manifests on sparc64.

    Signed-off-by: Willem de Bruijn
    Signed-off-by: David S. Miller

    Willem de Bruijn
     

21 Mar, 2013

3 commits


20 Mar, 2013

4 commits

  • Reported-by: Daniel Baluta
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Changes:
    v3->v2: rebase (no other changes)
    passes selftest
    v2->v1: read f->num_members only once
    fix bug: test rollover mode + flag

    Minimize packet drop in a fanout group. If one socket is full,
    roll over packets to another from the group. Maintain flow
    affinity during normal load using an rxhash fanout policy, while
    dispersing unexpected traffic storms that hit a single cpu, such
    as spoofed-source DoS flows. Rollover breaks affinity for flows
    arriving at saturated sockets during those conditions.

    The patch adds a fanout policy ROLLOVER that rotates between sockets,
    filling each socket before moving to the next. It also adds a fanout
    flag ROLLOVER. If passed along with any other fanout policy, the
    primary policy is applied until the chosen socket is full. Then,
    rollover selects another socket, to delay packet drop until the
    entire system is saturated.

    Probing sockets is not free. Selecting the last used socket, as
    rollover does, is a greedy approach that maximizes chance of
    success, at the cost of extreme load imbalance. In practice, with
    sufficiently long queues to absorb bursts, sockets are drained in
    parallel and load balance looks uniform in `top`.

    To avoid contention, scales counters with number of sockets and
    accesses them lockfree. Values are bounds checked to ensure
    correctness.

    Tested using an application with 9 threads pinned to CPUs, one socket
    per thread and sufficient busywork per packet operation to limits each
    thread to handling 32 Kpps. When sent 500 Kpps single UDP stream
    packets, a FANOUT_CPU setup processes 32 Kpps in total without this
    patch, 270 Kpps with the patch. Tested with read() and with a packet
    ring (V1).

    Also, passes psock_fanout.c unit test added to selftests.

    Signed-off-by: Willem de Bruijn
    Reviewed-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Willem de Bruijn
     
  • Signed-off-by: David S. Miller

    David S. Miller
     

08 Mar, 2013

1 commit

  • To save connecting and searching for a given grub menu for each test,
    ktest.pl will cache the grub number it found. The problem is that
    different tests might use a different grub menu, but ktest.pl will
    ignore it.

    Instead, have ktest.pl check if the grub menu it used to cache the
    content is the same as when it grabbed the menu. If not, grab it again,
    otherwise just return the cached value.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

06 Mar, 2013

1 commit

  • Stricter validation was introduced with commit da27a24383b2b
    ("efivarfs: guid part of filenames are case-insensitive") and commit
    47f531e8ba3b ("efivarfs: Validate filenames much more aggressively"),
    which is necessary for the guid portion of efivarfs filenames, but we
    don't need to be so strict with the first part, the variable name. The
    UEFI specification doesn't impose any constraints on variable names
    other than they be a NULL-terminated string.

    The above commits caused a regression that resulted in users seeing
    the following message,

    $ sudo mount -v /sys/firmware/efi/efivars mount: Cannot allocate memory

    whenever pstore EFI variables were present in the variable store,
    since their variable names failed to pass the following check,

    /* GUID should be right after the first '-' */
    if (s - 1 != strchr(str, '-'))

    as a typical pstore filename is of the form, dump-type0-10-1-.
    The fix is trivial since the guid portion of the filename is GUID_LEN
    bytes, we can use (len - GUID_LEN) to ensure the '-' character is
    where we expect it to be.

    (The bogus ENOMEM error value will be fixed in a separate patch.)

    Reported-by: Joseph Yasi
    Tested-by: Joseph Yasi
    Reported-by: Lingzhu Xiang
    Cc: Josh Boyer
    Cc: Jeremy Kerr
    Cc: Matthew Garrett
    Cc: # v3.8
    Signed-off-by: Matt Fleming

    Matt Fleming
     

28 Feb, 2013

5 commits


18 Feb, 2013

1 commit

  • The index of a line where a warning is tested can be returned
    differently on different versions of gcc (or same version compiled
    differently). That is, a tab + space can give different results. This
    causes the warning check to produce a false positive. Removing the
    index from the check fixes this issue.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

05 Feb, 2013

2 commits

  • The reboot just wants to get to the next kernel. But if a warning (Call
    Trace) appears, the monitor will report an error, and the reboot will
    think something went wrong and power cycle the box, even though we
    successfully made it to the next kernel.

    Ignore warnings during the reboot until we get to the next kernel. It
    will still timeout if we never get to the next kernel and then a power
    cycle will happen. That's what we want it to do.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • Sometimes when a test kernel passed fine, but on reboot it crashed,
    ktest could get stuck and not proceed. This would be frustrating if you
    let a test run overnight to find out the next morning that it was stuck
    on the first test.

    To fix this, I made reboot check for the REBOOT_SUCCESS_LINE. If the
    line was not detected, then it would power cycle the box.

    What it didn't cover was if the REBOOT_SUCCESS_LINE wasn't defined or if
    a 'good' kernel did not display the line. Instead have it search for the
    Linux banner "Linux version". The reboot just needs to get to the start
    of the next kernel, it does not need to test if the next kernel makes it
    to a boot prompt.

    After we find the next kernel has booted, then we just wait for either
    the REBOOT_SUCCESS_LINE to appear or the timeout.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

31 Jan, 2013

4 commits

  • Although the patchcheck test checks for warnings in the files that were
    changed, this check does not catch warnings that were caused by header
    file changes and the warnings appear in C files not touched by the
    commit.

    Add a new option called WARNINGS_FILE. If this option is set, then the
    file it points to is read before bulid, and the file should contain a
    list of known warnings. If a warning appears in the build, this file is
    checked, and if the warning does not exist in this file, then it fails
    the build showing the new warning.

    If the WARNINGS_FILE points to a file that does not exist, this will
    cause any warning in the build to fail.

    A new test is also added called "make_warnings_file". This test will
    create do a build and record any warnings it finds into the
    WARNINGS_FILE. This test is something that can be run before other tests
    to build a warnings file of "known warnings", ie, warnings that were
    there before your changes.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • Options are allowed to use other options, for example:

    LOG_FILE = ${OUTPUT_DIR}/${MACHINE}.log

    where the option LOG_FILE used the options OUTPUT_DIR and MACHINE.

    But if a test option were to use a default option, it will not get
    substituted:

    OUTPUT_DIR = ${THIS_DIR}/${MACHINE}

    TEST_START
    OUTPUT_DIR = ${OUTPUT_DIR}/t1

    For the above test, OUTPUT_DIR will stay literally "${OUTPUT_DIR}/t1"
    and not be converted to "${THIS_DIR}/${MACHINE}/t1". When the test runs,
    it will pass the ${OUTPUT_DIR} to the shell, which would probaly
    interpret it as "", and the output directory will end up as "/t1".

    Change the code where if a test option has its own option name in
    its defined field, and a default option exists, then substitute the
    default option in its place.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • The patchcheck test looks at what files are modified for each patch it
    checks and makes sure that those files do not produce any warnings.

    Unfortunately, when it read the diffstat, the newlines were added on the
    files and this made compares miss warnings, and commits that should not
    have passed, ktest let pass.

    Fix this by using the perl command "chomp" that strips off whitespace at
    the end of lines.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • If the user is doing a build or install bisect, there's no reason to
    have them define CONSOLE, as the console does not need to be read. The
    console only needs to be read for boot tests.

    CONSOLE is not required for normal build or install tests, let's not
    require it for bisect tests with BISECT_TYPE of build or install.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

05 Jan, 2013

1 commit

  • This test can be used to check wheither kernel supports IPC message queue
    copy and restore features (required by CRIU project).

    Signed-off-by: Stanislav Kinsbursky
    Cc: Serge Hallyn
    Cc: "Eric W. Biederman"
    Cc: Pavel Emelyanov
    Cc: Al Viro
    Cc: KOSAKI Motohiro
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stanislav Kinsbursky
     

18 Dec, 2012

8 commits

  • I was curious why sys_kcmp wasn't working, which led me to the testcase.
    It turned out I hadn't enabled CHECKPOINT_RESTORE in the kernel I was
    testing. Add a decoding of errno to the testcase to make that obvious.

    Signed-off-by: Dave Jones
    Acked-by: Cyrill Gorcunov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • In case breakpoint test exit non zero value it will cause make error.
    Better way is just print the test failure status.

    Signed-off-by: Dave Young
    Reviewed-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • In case kcmp_test exit non zero value it will cause make error.
    Better way is just print the test failure status.

    Signed-off-by: Dave Young
    Reviewed-by: Pekka Enberg
    Cc: Cyrill Gorcunov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • make run_tests need the target is run_tests instead of run-tests
    Also gcc output should be kcmp_test. Fix these two issues.

    Signed-off-by: Dave Young
    Cc: Pekka Enberg
    Cc: Cyrill Gorcunov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Original behavior:
    bash-4.1$ make -C memory-hotplug run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/memory-hotplug'
    ./on-off-test.sh
    make: execvp: ./on-off-test.sh: Permission denied
    make: *** [run_tests] Error 127
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/memory-hotplug'

    After applying the patch:
    bash-4.1$ make -C memory-hotplug run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/memory-hotplug'
    /bin/sh: ./on-off-test.sh: Permission denied
    memory-hotplug selftests: [FAIL]
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/memory-hotplug'

    Signed-off-by: Dave Young
    Reviewed-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Original behavior:
    bash-4.1$ make -C cpu-hotplug run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/cpu-hotplug'
    ./on-off-test.sh
    make: execvp: ./on-off-test.sh: Permission denied
    make: *** [run_tests] Error 127
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/cpu-hotplug'

    After applying the patch:
    bash-4.1$ make -C cpu-hotplug run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/cpu-hotplug'
    /bin/sh: ./on-off-test.sh: Permission denied
    cpu-hotplug selftests: [FAIL]
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/cpu-hotplug'

    Signed-off-by: Dave Young
    Reviewed-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Original behavior:
    bash-4.1$ make -C mqueue run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'
    ./mq_open_tests /test1
    Not running as root, but almost all tests require root in order to modify
    system settings. Exiting.
    make: *** [run_tests] Error 1
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'

    After applying the patch:
    bash-4.1$ make -C mqueue run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'
    Not running as root, but almost all tests require root in order to modify
    system settings. Exiting.
    mq_open_tests: [FAIL]
    Not running as root, but almost all tests require root in order to modify
    system settings. Exiting.
    mq_perf_tests: [FAIL]
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'

    Signed-off-by: Dave Young
    Reviewed-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Original behavior:
    bash-4.1$ make -C vm run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/vm'
    /bin/sh ./run_vmtests
    ./run_vmtests: line 24: /proc/sys/vm/nr_hugepages: Permission denied
    Please run this test as root
    make: *** [run_tests] Error 1
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/vm'

    After applying the patch:
    bash-4.1$ make -C vm run_tests
    make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/vm'
    ./run_vmtests: line 24: /proc/sys/vm/nr_hugepages: Permission denied
    Please run this test as root
    vmtests: [FAIL]
    make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/vm'

    Signed-off-by: Dave Young
    Cc: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young