20 Apr, 2014

1 commit

  • Pull drm fixes from Dave Airlie:
    "Unfortunately this contains no easter eggs, its a bit larger than I'd
    like, but I included a patch that just moves code from one file to
    another and I'd like to avoid merge conflicts with that later, so it
    makes it seem worse than it is,

    Otherwise:
    - radeon: fixes to use new microcode to stabilise some cards, use
    some common displayport code, some runtime pm fixes, pll regression
    fixes
    - i915: fix for some context oopses, a warn in a used path, backlight
    fixes
    - nouveau: regression fix
    - omap: a bunch of fixes"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (51 commits)
    drm: bochs: drop unused struct fields
    drm: bochs: add power management support
    drm: cirrus: add power management support
    drm: Split out drm_probe_helper.c from drm_crtc_helper.c
    drm/plane-helper: Don't fake-implement primary plane disabling
    drm/ast: fix value check in cbr_scan2
    drm/nouveau/bios: fix a bit shift error introduced by 457e77b
    drm/radeon/ci: make sure mc ucode is loaded before checking the size
    drm/radeon/si: make sure mc ucode is loaded before checking the size
    drm/radeon: improve PLL params if we don't match exactly v2
    drm/radeon: memory leak on bo reservation failure. v2
    drm/radeon: fix VCE fence command
    drm/radeon: re-enable mclk dpm on R7 260X asics
    drm/radeon: add support for newer mc ucode on CI (v2)
    drm/radeon: add support for newer mc ucode on SI (v2)
    drm/radeon: apply more strict limits for PLL params v2
    drm/radeon: update CI DPM powertune settings
    drm/radeon: fix runpm handling on APUs (v4)
    drm/radeon: disable mclk dpm on R7 260X
    drm/tegra: Remove gratuitous pad field
    ...

    Linus Torvalds
     

19 Apr, 2014

11 commits

  • Some i2c fixes over DisplayPort.

    * 'drm-next-3.15-wip' of git://people.freedesktop.org/~deathsimple/linux:
    drm/radeon: Improve vramlimit module param documentation
    drm/radeon: fix audio pin counts for DCE6+ (v2)
    drm/radeon/dp: switch to the common i2c over aux code
    drm/dp/i2c: Update comments about common i2c over dp assumptions (v3)
    drm/dp/i2c: send bare addresses to properly reset i2c connections (v4)
    drm/radeon/dp: handle zero sized i2c over aux transactions (v2)
    drm/i915: support address only i2c-over-aux transactions
    drm/tegra: dp: Support address-only I2C-over-AUX transactions

    Dave Airlie
     
  • Pull more networking fixes from David Miller:

    1) Fix mlx4_en_netpoll implementation, it needs to schedule a NAPI
    context, not synchronize it. From Chris Mason.

    2) Ipv4 flow input interface should never be zero, it should be
    LOOPBACK_IFINDEX instead. From Cong Wang and Julian Anastasov.

    3) Properly configure MAC to PHY connection in mvneta devices, from
    Thomas Petazzoni.

    4) sys_recv should use SYSCALL_DEFINE. From Jan Glauber.

    5) Tunnel driver ioctls do not use the correct namespace, fix from
    Nicolas Dichtel.

    6) Fix memory leak on seccomp filter attach, from Kees Cook.

    7) Fix lockdep warning for nested vlans, from Ding Tianhong.

    8) Crashes can happen in SCTP due to how the auth_enable value is
    managed, fix from Vlad Yasevich.

    9) Wireless fixes from John W Linville and co.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (45 commits)
    net: sctp: cache auth_enable per endpoint
    tg3: update rx_jumbo_pending ring param only when jumbo frames are enabled
    vlan: Fix lockdep warning when vlan dev handle notification
    seccomp: fix memory leak on filter attach
    isdn: icn: buffer overflow in icn_command()
    ip6_tunnel: use the right netns in ioctl handler
    sit: use the right netns in ioctl handler
    ip_tunnel: use the right netns in ioctl handler
    net: use SYSCALL_DEFINEx for sys_recv
    net: mdio-gpio: Add support for separate MDI and MDO gpio pins
    net: mdio-gpio: Add support for active low gpio pins
    net: mdio-gpio: Use devm_ functions where possible
    ipv4, route: pass 0 instead of LOOPBACK_IFINDEX to fib_validate_source()
    ipv4, fib: pass LOOPBACK_IFINDEX instead of 0 to flowi4_iif
    mlx4_en: don't use napi_synchronize inside mlx4_en_netpoll
    net: mvneta: properly configure the MAC PHY connection in all situations
    net: phy: add minimal support for QSGMII PHY
    sfc:On MCDI timeout, issue an FLR (and mark MCDI to fail-fast)
    mwifiex: fix hung task on command timeout
    mwifiex: process event before command response
    ...

    Linus Torvalds
     
  • Pull char/misc driver fixes from Greg KH:
    "Here are a few driver fixes for char/misc drivers that resolve
    reported issues.

    All have been in linux-next successfully for a few days"

    * tag 'char-misc-3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    Drivers: hv: vmbus: Negotiate version 3.0 when running on ws2012r2 hosts
    Tools: hv: Handle the case when the target file exists correctly
    vme_tsi148: Utilize to_pci_dev() macro
    vme_tsi148: Fix PCI address mapping assumption
    vme_tsi148: Fix typo in tsi148_slave_get()
    w1: avoid recursive device_add
    w1: fix netlink refcnt leak on error path
    misc: Grammar s/addition/additional/
    drivers: mcb: fix memory leak in chameleon_parse_cells() error path
    mei: ignore client writing state during cb completion
    mei: me: do not load the driver if the FW doesn't support MEI interface
    GenWQE: Increase driver version number
    GenWQE: Fix multithreading problems
    GenWQE: Ensure rc is not returning an uninitialized value
    GenWQE: Add wmb before DDCB is started
    GenWQE: Enable access to VPD flash area

    Linus Torvalds
     
  • Pull driver core fixes from Greg KH:
    "Here are some driver core fixes for 3.15-rc2. Also in here are some
    documentation updates, as well as an API removal that had to wait for
    after -rc1 due to the cleanups coming into you from multiple developer
    trees (this one and the PPC tree.)

    All have been in linux next successfully"

    * tag 'driver-core-3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    drivers/base/dd.c incorrect pr_debug() parameters
    Documentation: Update stable address in Chinese and Japanese translations
    topology: Fix compilation warning when not in SMP
    Chinese: add translation of io_ordering.txt
    stable_kernel_rules: spelling/word usage
    sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()
    kernfs: protect lazy kernfs_iattrs allocation with mutex
    fs: Don't return 0 from get_anon_bdev

    Linus Torvalds
     
  • Merge misc fixes from Andrew Morton:
    "13 fixes"

    * emailed patches from Andrew Morton :
    thp: close race between split and zap huge pages
    mm: fix new kernel-doc warning in filemap.c
    mm: fix CONFIG_DEBUG_VM_RB description
    mm: use paravirt friendly ops for NUMA hinting ptes
    mips: export flush_icache_range
    mm/hugetlb.c: add cond_resched_lock() in return_unused_surplus_pages()
    wait: explain the shadowing and type inconsistencies
    Shiraz has moved
    Documentation/vm/numa_memory_policy.txt: fix wrong document in numa_memory_policy.txt
    powerpc/mm: fix ".__node_distance" undefined
    kernel/watchdog.c:touch_softlockup_watchdog(): use raw_cpu_write()
    init/Kconfig: move the trusted keyring config option to general setup
    vmscan: reclaim_clean_pages_from_list() must use mod_zone_page_state()

    Linus Torvalds
     
  • David Vrabel identified a regression when using automatic NUMA balancing
    under Xen whereby page table entries were getting corrupted due to the
    use of native PTE operations. Quoting him

    Xen PV guest page tables require that their entries use machine
    addresses if the preset bit (_PAGE_PRESENT) is set, and (for
    successful migration) non-present PTEs must use pseudo-physical
    addresses. This is because on migration MFNs in present PTEs are
    translated to PFNs (canonicalised) so they may be translated back
    to the new MFN in the destination domain (uncanonicalised).

    pte_mknonnuma(), pmd_mknonnuma(), pte_mknuma() and pmd_mknuma()
    set and clear the _PAGE_PRESENT bit using pte_set_flags(),
    pte_clear_flags(), etc.

    In a Xen PV guest, these functions must translate MFNs to PFNs
    when clearing _PAGE_PRESENT and translate PFNs to MFNs when setting
    _PAGE_PRESENT.

    His suggested fix converted p[te|md]_[set|clear]_flags to using
    paravirt-friendly ops but this is overkill. He suggested an alternative
    of using p[te|md]_modify in the NUMA page table operations but this is
    does more work than necessary and would require looking up a VMA for
    protections.

    This patch modifies the NUMA page table operations to use paravirt
    friendly operations to set/clear the flags of interest. Unfortunately
    this will take a performance hit when updating the PTEs on
    CONFIG_PARAVIRT but I do not see a way around it that does not break
    Xen.

    Signed-off-by: Mel Gorman
    Acked-by: David Vrabel
    Tested-by: David Vrabel
    Cc: Ingo Molnar
    Cc: Peter Anvin
    Cc: Fengguang Wu
    Cc: Linus Torvalds
    Cc: Steven Noonan
    Cc: Rik van Riel
    Cc: Peter Zijlstra
    Cc: Andrea Arcangeli
    Cc: Dave Hansen
    Cc: Srikar Dronamraju
    Cc: Cyrill Gorcunov
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • Stick in a comment before someone else tries to fix the sparse warning
    this generates.

    Suggested-by: Andrew Morton
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-o2ro6f3vkxklni0bc8f7m68s@git.kernel.org
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • shiraz.hashim@st.com email-id doesn't exist anymore as he has left the
    company. Replace ST's id with shiraz.linux.kernel@gmail.com.

    It also updates .mailmap file to fix address for 'git shortlog'.

    Signed-off-by: Viresh Kumar
    Cc: Shiraz Hashim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Viresh Kumar
     
  • Currently, it is possible to create an SCTP socket, then switch
    auth_enable via sysctl setting to 1 and crash the system on connect:

    Oops[#1]:
    CPU: 0 PID: 0 Comm: swapper Not tainted 3.14.1-mipsgit-20140415 #1
    task: ffffffff8056ce80 ti: ffffffff8055c000 task.ti: ffffffff8055c000
    [...]
    Call Trace:
    [] sctp_auth_asoc_set_default_hmac+0x68/0x80
    [] sctp_process_init+0x5e0/0x8a4
    [] sctp_sf_do_5_1B_init+0x234/0x34c
    [] sctp_do_sm+0xb4/0x1e8
    [] sctp_endpoint_bh_rcv+0x1c4/0x214
    [] sctp_rcv+0x588/0x630
    [] sctp6_rcv+0x10/0x24
    [] ip6_input+0x2c0/0x440
    [] __netif_receive_skb_core+0x4a8/0x564
    [] process_backlog+0xb4/0x18c
    [] net_rx_action+0x12c/0x210
    [] __do_softirq+0x17c/0x2ac
    [] irq_exit+0x54/0xb0
    [] ret_from_irq+0x0/0x4
    [] rm7k_wait_irqoff+0x24/0x48
    [] cpu_startup_entry+0xc0/0x148
    [] start_kernel+0x37c/0x398
    Code: dd0900b8 000330f8 0126302d 50c0fff1 0047182a a48306a0
    03e00008 00000000
    ---[ end trace b530b0551467f2fd ]---
    Kernel panic - not syncing: Fatal exception in interrupt

    What happens while auth_enable=0 in that case is, that
    ep->auth_hmacs is initialized to NULL in sctp_auth_init_hmacs()
    when endpoint is being created.

    After that point, if an admin switches over to auth_enable=1,
    the machine can crash due to NULL pointer dereference during
    reception of an INIT chunk. When we enter sctp_process_init()
    via sctp_sf_do_5_1B_init() in order to respond to an INIT chunk,
    the INIT verification succeeds and while we walk and process
    all INIT params via sctp_process_param() we find that
    net->sctp.auth_enable is set, therefore do not fall through,
    but invoke sctp_auth_asoc_set_default_hmac() instead, and thus,
    dereference what we have set to NULL during endpoint
    initialization phase.

    The fix is to make auth_enable immutable by caching its value
    during endpoint initialization, so that its original value is
    being carried along until destruction. The bug seems to originate
    from the very first days.

    Fix in joint work with Daniel Borkmann.

    Reported-by: Joshua Kinard
    Signed-off-by: Vlad Yasevich
    Signed-off-by: Daniel Borkmann
    Acked-by: Neil Horman
    Tested-by: Joshua Kinard
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • Pull infiniband/rdma updates from Roland Dreier:

    - mostly cxgb4 fixes unblocked by the merge of some prerequisites via
    the net tree

    - drop deprecated MSI-X API use.

    - a couple other miscellaneous things.

    * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    RDMA/cxgb4: Fix over-dereference when terminating
    RDMA/cxgb4: Use uninitialized_var()
    RDMA/cxgb4: Add missing debug stats
    RDMA/cxgb4: Initialize reserved fields in a FW work request
    RDMA/cxgb4: Use pr_warn_ratelimited
    RDMA/cxgb4: Max fastreg depth depends on DSGL support
    RDMA/cxgb4: SQ flush fix
    RDMA/cxgb4: rmb() after reading valid gen bit
    RDMA/cxgb4: Endpoint timeout fixes
    RDMA/cxgb4: Use the BAR2/WC path for kernel QPs and T5 devices
    IB/mlx5: Add block multicast loopback support
    IB/mthca: Use pci_enable_msix_exact() instead of pci_enable_msix()
    IB/qib: Use pci_enable_msix_range() instead of pci_enable_msix()

    Linus Torvalds
     
  • Pull devicetree fixes from Rob Herring:
    - fix error handling in of_update_property
    - fix section mismatch warnings in __reserved_mem_check_root
    - add empty of_find_node_by_path for !OF builds
    - add various missing binding documentation

    * tag 'dt-fixes-for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    of: add empty of_find_node_by_path() for !OF
    of: Clean up of_update_property
    DT: add vendor prefix for EBV Elektronik
    of: Fix the section mismatch warnings.
    of: Add vendor prefix for Digi International Inc.
    DT: I2C: Add trivial bindings used by kirkwood boards
    DT: Vendor: Add prefixes used by Kirkwood devices
    DT: bindings: add missing Marvell Kirkwood SoC documentation
    dt-bindings: add vendor-prefix for Newhaven Display
    of: add vendor prefix for I2SE GmbH
    of: add vendor prefix for ISEE 2007 S.L.

    Linus Torvalds
     

18 Apr, 2014

5 commits

  • Add an empty version of of_find_node_by_path().
    This fixes following build error for asoc tree:
    sound/soc/fsl/fsl_ssi.c: In function 'fsl_ssi_probe':
    sound/soc/fsl/fsl_ssi.c:1471:2: error: implicit declaration of function 'of_find_node_by_path' [-Werror=implicit-function-declaration]
    sprop = of_get_property(of_find_node_by_path("/"), "compatible", NULL);

    Reported-by: Stephen Rothwell
    Signed-off-by: Alexander Shiyan
    Signed-off-by: Rob Herring

    Alexander Shiyan
     
  • This is leftover stuff from my previous doc round which I kinda wanted
    to do but didn't yet due to rebase hell.

    The modeset helpers and the probing helpers a independent and e.g.
    i915 uses the probing stuff but has its own modeset infrastructure. It
    hence makes to split this up. While at it add a DOC: comment for the
    probing libraray.

    It would be rather neat to pull some of the DocBook documenting these
    two helpers into in-line DOC: comments. But unfortunately kerneldoc
    doesn't support markdown or something similar to make nice-looking
    documentation, so the current state is better.

    Signed-off-by: Daniel Vetter
    Signed-off-by: Dave Airlie

    Daniel Vetter
     
  • Merge ipmi fixes from Corey Minyard:
    "Things collected since last kernel release.

    Some of these are pretty important. The first three are bug fixes.
    The next two are to hopefully make everyone happy about allowing
    ACPI to be on all the time and not have IPMI have an effect on the
    system when not in use. The last is a little cleanup"

    * emailed patches from Corey Minyard :
    ipmi: boolify some things
    ipmi: Turn off all activity on an idle ipmi interface
    ipmi: Turn off default probing of interfaces
    ipmi: Reset the KCS timeout when starting error recovery
    ipmi: Fix a race restarting the timer
    Char: ipmi_bt_sm, fix infinite loop

    Linus Torvalds
     
  • Convert some ints to bools.

    Signed-off-by: Corey Minyard
    Signed-off-by: Linus Torvalds

    Corey Minyard
     
  • The IPMI driver would wake up periodically looking for events and
    watchdog pretimeouts. If there is nothing waiting for these events,
    it's really kind of pointless to be checking for them. So modify the
    driver so the message handler can pass down if it needs the lower layer
    to be waiting for these. Modify the system interface lower layer to
    turn off all timer and thread activity if the upper layer doesn't need
    anything and it is not currently handling messages. And modify the
    message handler to not restart the timer if its timer is not needed.

    The timers and kthread will still be enabled if:
    - the SI interface is handling a message.
    - a user has enabled watching for events.
    - the IPMI watchdog timer is in use (since it uses pretimeouts).
    - the message handler is waiting on a remote response.
    - a user has registered to receive commands.

    This mostly affects interfaces without interrupts. Interfaces with
    interrupts already don't use CPU in the system interface when the
    interface is idle.

    Signed-off-by: Corey Minyard
    Signed-off-by: Linus Torvalds

    Corey Minyard
     

17 Apr, 2014

8 commits

  • Pull x86 fixes from Ingo Molnar:
    "Various fixes:

    - reboot regression fix
    - build message spam fix
    - GPU quirk fix
    - 'make kvmconfig' fix

    plus the wire-up of the renameat2() system call on i386"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86: Remove the PCI reboot method from the default chain
    x86/build: Supress "Nothing to be done for ..." messages
    x86/gpu: Fix sign extension issue in Intel graphics stolen memory quirks
    x86/platform: Fix "make O=dir kvmconfig"
    i386: Wire up the renameat2() syscall

    Linus Torvalds
     
  • Only ws2012r2 hosts support the ability to reconnect to the host on VMBUS. This functionality
    is needed by kexec in Linux. To use this functionality we need to negotiate version 3.0 of the
    VMBUS protocol.

    Signed-off-by: K. Y. Srinivasan
    Cc: [3.9+]
    Signed-off-by: Greg Kroah-Hartman

    K. Y. Srinivasan
     
  • Return the appropriate error code and handle the case when the target
    file exists correctly. This fixes a bug.

    Signed-off-by: K. Y. Srinivasan
    Cc: [3.14]
    Signed-off-by: Greg Kroah-Hartman

    K. Y. Srinivasan
     
  • This is for a system with fixed assignments of input and output pins
    (various variants of Kontron COMe).

    Signed-off-by: Guenter Roeck
    Signed-off-by: David S. Miller

    Guenter Roeck
     
  • Some systems using mdio-gpio may use active-low gpio pins
    (eg with inverters or FETs connected to all or some of the
    gpio pins).

    Signed-off-by: Guenter Roeck
    Signed-off-by: David S. Miller

    Guenter Roeck
     
  • As suggested by Julian:

    Simply, flowi4_iif must not contain 0, it does not
    look logical to ignore all ip rules with specified iif.

    because in fib_rule_match() we do:

    if (rule->iifindex && (rule->iifindex != fl->flowi_iif))
    goto out;

    flowi4_iif should be LOOPBACK_IFINDEX by default.

    We need to move LOOPBACK_IFINDEX to include/net/flow.h:

    1) It is mostly used by flowi_iif

    2) Fix the following compile error if we use it in flow.h
    by the patches latter:

    In file included from include/linux/netfilter.h:277:0,
    from include/net/netns/netfilter.h:5,
    from include/net/net_namespace.h:21,
    from include/linux/netdevice.h:43,
    from include/linux/icmpv6.h:12,
    from include/linux/ipv6.h:61,
    from include/net/ipv6.h:16,
    from include/linux/sunrpc/clnt.h:27,
    from include/linux/nfs_fs.h:30,
    from init/do_mounts.c:32:
    include/net/flow.h: In function ‘flowi4_init_output’:
    include/net/flow.h:84:32: error: ‘LOOPBACK_IFINDEX’ undeclared (first use in this function)

    Cc: Eric Biederman
    Cc: Julian Anastasov
    Cc: David S. Miller
    Signed-off-by: Cong Wang
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     
  • All device_schedule_callback_owner() users are converted to use
    device_remove_file_self(). Remove now unused
    {sysfs|device}_schedule_callback_owner().

    Signed-off-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     
  • This commit adds the necessary definitions for the PHY layer to
    recognize "qsgmii" as a valid PHY interface. A QSMII interface, as
    defined at
    http://en.wikipedia.org/wiki/Media_Independent_Interface#Quad_Serial_Gigabit_Media_Independent_Interface,
    is "is a method of combining four SGMII lines into a 5Gbit/s
    interface. QSGMII, like SGMII, uses LVDS signalling for the TX and RX
    data and a single LVDS clock signal. QSGMII uses significantly fewer
    signal lines than four SGMII busses."

    This type of MAC PHY connection might require special handling on
    the MAC driver side, so it should be possible to express this type of
    MAC PHY connection, for example in the Device Tree.

    Signed-off-by: Thomas Petazzoni
    Cc: devicetree@vger.kernel.org
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Thomas Petazzoni
     

16 Apr, 2014

5 commits

  • The version of the drm_tegra_submit structure that was merged all the
    way back in 3.10 contains a pad field that was originally intended to
    properly pad the following __u64 field. Unfortunately it seems like a
    different field was dropped during review that caused this padding to
    become unnecessary, but the pad field wasn't removed at that time.

    One possible side-effect of this is that since the __u64 following the
    pad is now no longer properly aligned, the compiler may (or may not)
    introduce padding itself, which results in no predictable ABI.

    Rectify this by removing the pad field so that all fields are again
    naturally aligned. Technically this is breaking existing userspace ABI,
    but given that there aren't any (released) userspace drivers that make
    use of this yet, the fallout should be minimal.

    Fixes: d43f81cbaf43 ("drm/tegra: Add gr2d device")
    Cc: # 3.10
    Signed-off-by: Thierry Reding

    Thierry Reding
     
  • Steve reported a reboot hang and bisected it back to this commit:

    a4f1987e4c54 x86, reboot: Add EFI and CF9 reboot methods into the default list

    He heroically tested all reboot methods and found the following:

    reboot=t # triple fault ok
    reboot=k # keyboard ctrl FAIL
    reboot=b # BIOS ok
    reboot=a # ACPI FAIL
    reboot=e # EFI FAIL [system has no EFI]
    reboot=p # PCI 0xcf9 FAIL

    And I think it's pretty obvious that we should only try PCI 0xcf9 as a
    last resort - if at all.

    The other observation is that (on this box) we should never try
    the PCI reboot method, but close with either the 'triple fault'
    or the 'BIOS' (terminal!) reboot methods.

    Thirdly, CF9_COND is a total misnomer - it should be something like
    CF9_SAFE or CF9_CAREFUL, and 'CF9' should be 'CF9_FORCE' ...

    So this patch fixes the worst problems:

    - it orders the actual reboot logic to follow the reboot ordering
    pattern - it was in a pretty random order before for no good
    reason.

    - it fixes the CF9 misnomers and uses BOOT_CF9_FORCE and
    BOOT_CF9_SAFE flags to make the code more obvious.

    - it tries the BIOS reboot method before the PCI reboot method.
    (Since 'BIOS' is a terminal reboot method resulting in a hang
    if it does not work, this is essentially equivalent to removing
    the PCI reboot method from the default reboot chain.)

    - just for the miraculous possibility of terminal (resulting
    in hang) reboot methods of triple fault or BIOS returning
    without having done their job, there's an ordering between
    them as well.

    Reported-and-bisected-and-tested-by: Steven Rostedt
    Cc: Li Aubrey
    Cc: Linus Torvalds
    Cc: Matthew Garrett
    Link: http://lkml.kernel.org/r/20140404064120.GB11877@gmail.com
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Pull networking fixes from David Miller:

    1) Fix BPF filter validation of netlink attribute accesses, from
    Mathias Kruase.

    2) Netfilter conntrack generation seqcount not initialized properly,
    from Andrey Vagin.

    3) Fix comparison mask computation on big-endian in nft_cmp_fast(),
    from Patrick McHardy.

    4) Properly limit MTU over ipv6, from Eric Dumazet.

    5) Fix seccomp system call argument population on 32-bit, from Daniel
    Borkmann.

    6) skb_network_protocol() should not use hard-coded ETH_HLEN, instead
    skb->mac_len needs to be used. From Vlad Yasevich.

    7) We have several cases of using socket based communications to
    implement a tunnel. For example, some tunnels are encapsulations
    over UDP so we use an internal kernel UDP socket to do the
    transmits.

    These tunnels should behave just like other software devices and
    pass the packets on down to the next layer.

    Most importantly we want the top-level socket (eg TCP) that created
    the traffic to be charged for the SKB memory.

    However, once you get into the IP output path, we have code that
    assumed that whatever was attached to skb->sk is an IP socket.

    To keep the top-level socket being charged for the SKB memory,
    whilst satisfying the needs of the IP output path, we now pass in an
    explicit 'sk' argument.

    From Eric Dumazet.

    8) ping_init_sock() leaks group info, from Xiaoming Wang.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (33 commits)
    cxgb4: use the correct max size for firmware flash
    qlcnic: Fix MSI-X initialization code
    ip6_gre: don't allow to remove the fb_tunnel_dev
    ipv4: add a sock pointer to dst->output() path.
    ipv4: add a sock pointer to ip_queue_xmit()
    driver/net: cosa driver uses udelay incorrectly
    at86rf230: fix __at86rf230_read_subreg function
    at86rf230: remove check if AVDD settled
    net: cadence: Add architecture dependencies
    net: Start with correct mac_len in skb_network_protocol
    Revert "net: sctp: Fix a_rwnd/rwnd management to reflect real state of the receiver's buffer"
    cxgb4: Save the correct mac addr for hw-loopback connections in the L2T
    net: filter: seccomp: fix wrong decoding of BPF_S_ANC_SECCOMP_LD_W
    seccomp: fix populating a0-a5 syscall args in 32-bit x86 BPF
    qlcnic: Do not disable SR-IOV when VFs are assigned to VMs
    qlcnic: Fix QLogic application/driver interface for virtual NIC configuration
    qlcnic: Fix PVID configuration on eSwitch port.
    qlcnic: Fix max ring count calculation
    qlcnic: Fix to send INIT_NIC_FUNC as first mailbox.
    qlcnic: Fix panic due to uninitialzed delayed_work struct in use.
    ...

    Linus Torvalds
     
  • In the dst->output() path for ipv4, the code assumes the skb it has to
    transmit is attached to an inet socket, specifically via
    ip_mc_output() : The sk_mc_loop() test triggers a WARN_ON() when the
    provider of the packet is an AF_PACKET socket.

    The dst->output() method gets an additional 'struct sock *sk'
    parameter. This needs a cascade of changes so that this parameter can
    be propagated from vxlan to final consumer.

    Fixes: 8f646c922d55 ("vxlan: keep original skb ownership")
    Reported-by: lucien xin
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • ip_queue_xmit() assumes the skb it has to transmit is attached to an
    inet socket. Commit 31c70d5956fc ("l2tp: keep original skb ownership")
    changed l2tp to not change skb ownership and thus broke this assumption.

    One fix is to add a new 'struct sock *sk' parameter to ip_queue_xmit(),
    so that we do not assume skb->sk points to the socket used by l2tp
    tunnel.

    Fixes: 31c70d5956fc ("l2tp: keep original skb ownership")
    Reported-by: Zhan Jianyu
    Tested-by: Zhan Jianyu
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

15 Apr, 2014

4 commits

  • Pablo Neira Ayuso says:

    ====================
    Netfilter fixes for net

    The following patchset contains three Netfilter fixes for your net tree,
    they are:

    * Fix missing generation sequence initialization which results in a splat
    if lockdep is enabled, it was introduced in the recent works to improve
    nf_conntrack scalability, from Andrey Vagin.

    * Don't flush the GRE keymap list in nf_conntrack when the pptp helper is
    disabled otherwise this crashes due to a double release, from Andrey
    Vagin.

    * Fix nf_tables cmp fast in big endian, from Patrick McHardy.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This reverts commit ef2820a735f7 ("net: sctp: Fix a_rwnd/rwnd management
    to reflect real state of the receiver's buffer") as it introduced a
    serious performance regression on SCTP over IPv4 and IPv6, though a not
    as dramatic on the latter. Measurements are on 10Gbit/s with ixgbe NICs.

    Current state:

    [root@Lab200slot2 ~]# iperf3 --sctp -4 -c 192.168.241.3 -V -l 1452 -t 60
    iperf version 3.0.1 (10 January 2014)
    Linux Lab200slot2 3.14.0 #1 SMP Thu Apr 3 23:18:29 EDT 2014 x86_64
    Time: Fri, 11 Apr 2014 17:56:21 GMT
    Connecting to host 192.168.241.3, port 5201
    Cookie: Lab200slot2.1397238981.812898.548918
    [ 4] local 192.168.241.2 port 38616 connected to 192.168.241.3 port 5201
    Starting Test: protocol: SCTP, 1 streams, 1452 byte blocks, omitting 0 seconds, 60 second test
    [ ID] Interval Transfer Bandwidth
    [ 4] 0.00-1.09 sec 20.8 MBytes 161 Mbits/sec
    [ 4] 1.09-2.13 sec 10.8 MBytes 86.8 Mbits/sec
    [ 4] 2.13-3.15 sec 3.57 MBytes 29.5 Mbits/sec
    [ 4] 3.15-4.16 sec 4.33 MBytes 35.7 Mbits/sec
    [ 4] 4.16-6.21 sec 10.4 MBytes 42.7 Mbits/sec
    [ 4] 6.21-6.21 sec 0.00 Bytes 0.00 bits/sec
    [ 4] 6.21-7.35 sec 34.6 MBytes 253 Mbits/sec
    [ 4] 7.35-11.45 sec 22.0 MBytes 45.0 Mbits/sec
    [ 4] 11.45-11.45 sec 0.00 Bytes 0.00 bits/sec
    [ 4] 11.45-11.45 sec 0.00 Bytes 0.00 bits/sec
    [ 4] 11.45-11.45 sec 0.00 Bytes 0.00 bits/sec
    [ 4] 11.45-12.51 sec 16.0 MBytes 126 Mbits/sec
    [ 4] 12.51-13.59 sec 20.3 MBytes 158 Mbits/sec
    [ 4] 13.59-14.65 sec 13.4 MBytes 107 Mbits/sec
    [ 4] 14.65-16.79 sec 33.3 MBytes 130 Mbits/sec
    [ 4] 16.79-16.79 sec 0.00 Bytes 0.00 bits/sec
    [ 4] 16.79-17.82 sec 5.94 MBytes 48.7 Mbits/sec
    (etc)

    [root@Lab200slot2 ~]# iperf3 --sctp -6 -c 2001:db8:0:f101::1 -V -l 1400 -t 60
    iperf version 3.0.1 (10 January 2014)
    Linux Lab200slot2 3.14.0 #1 SMP Thu Apr 3 23:18:29 EDT 2014 x86_64
    Time: Fri, 11 Apr 2014 19:08:41 GMT
    Connecting to host 2001:db8:0:f101::1, port 5201
    Cookie: Lab200slot2.1397243321.714295.2b3f7c
    [ 4] local 2001:db8:0:f101::2 port 55804 connected to 2001:db8:0:f101::1 port 5201
    Starting Test: protocol: SCTP, 1 streams, 1400 byte blocks, omitting 0 seconds, 60 second test
    [ ID] Interval Transfer Bandwidth
    [ 4] 0.00-1.00 sec 169 MBytes 1.42 Gbits/sec
    [ 4] 1.00-2.00 sec 201 MBytes 1.69 Gbits/sec
    [ 4] 2.00-3.00 sec 188 MBytes 1.58 Gbits/sec
    [ 4] 3.00-4.00 sec 174 MBytes 1.46 Gbits/sec
    [ 4] 4.00-5.00 sec 165 MBytes 1.39 Gbits/sec
    [ 4] 5.00-6.00 sec 199 MBytes 1.67 Gbits/sec
    [ 4] 6.00-7.00 sec 163 MBytes 1.36 Gbits/sec
    [ 4] 7.00-8.00 sec 174 MBytes 1.46 Gbits/sec
    [ 4] 8.00-9.00 sec 193 MBytes 1.62 Gbits/sec
    [ 4] 9.00-10.00 sec 196 MBytes 1.65 Gbits/sec
    [ 4] 10.00-11.00 sec 157 MBytes 1.31 Gbits/sec
    [ 4] 11.00-12.00 sec 175 MBytes 1.47 Gbits/sec
    [ 4] 12.00-13.00 sec 192 MBytes 1.61 Gbits/sec
    [ 4] 13.00-14.00 sec 199 MBytes 1.67 Gbits/sec
    (etc)

    After patch:

    [root@Lab200slot2 ~]# iperf3 --sctp -4 -c 192.168.240.3 -V -l 1452 -t 60
    iperf version 3.0.1 (10 January 2014)
    Linux Lab200slot2 3.14.0+ #1 SMP Mon Apr 14 12:06:40 EDT 2014 x86_64
    Time: Mon, 14 Apr 2014 16:40:48 GMT
    Connecting to host 192.168.240.3, port 5201
    Cookie: Lab200slot2.1397493648.413274.65e131
    [ 4] local 192.168.240.2 port 50548 connected to 192.168.240.3 port 5201
    Starting Test: protocol: SCTP, 1 streams, 1452 byte blocks, omitting 0 seconds, 60 second test
    [ ID] Interval Transfer Bandwidth
    [ 4] 0.00-1.00 sec 240 MBytes 2.02 Gbits/sec
    [ 4] 1.00-2.00 sec 239 MBytes 2.01 Gbits/sec
    [ 4] 2.00-3.00 sec 240 MBytes 2.01 Gbits/sec
    [ 4] 3.00-4.00 sec 239 MBytes 2.00 Gbits/sec
    [ 4] 4.00-5.00 sec 245 MBytes 2.05 Gbits/sec
    [ 4] 5.00-6.00 sec 240 MBytes 2.01 Gbits/sec
    [ 4] 6.00-7.00 sec 240 MBytes 2.02 Gbits/sec
    [ 4] 7.00-8.00 sec 239 MBytes 2.01 Gbits/sec

    With the reverted patch applied, the SCTP/IPv4 performance is back
    to normal on latest upstream for IPv4 and IPv6 and has same throughput
    as 3.4.2 test kernel, steady and interval reports are smooth again.

    Fixes: ef2820a735f7 ("net: sctp: Fix a_rwnd/rwnd management to reflect real state of the receiver's buffer")
    Reported-by: Peter Butler
    Reported-by: Dongsheng Song
    Reported-by: Fengguang Wu
    Tested-by: Peter Butler
    Signed-off-by: Daniel Borkmann
    Cc: Matija Glavinic Pecotic
    Cc: Alexander Sverdlin
    Cc: Vlad Yasevich
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • While reviewing seccomp code, we found that BPF_S_ANC_SECCOMP_LD_W has
    been wrongly decoded by commit a8fc927780 ("sk-filter: Add ability to
    get socket filter program (v2)") into the opcode BPF_LD|BPF_B|BPF_ABS
    although it should have been decoded as BPF_LD|BPF_W|BPF_ABS.

    In practice, this should not have much side-effect though, as such
    conversion is/was being done through prctl(2) PR_SET_SECCOMP. Reverse
    operation PR_GET_SECCOMP will only return the current seccomp mode, but
    not the filter itself. Since the transition to the new BPF infrastructure,
    it's also not used anymore, so we can simply remove this as it's
    unreachable.

    Fixes: a8fc927780 ("sk-filter: Add ability to get socket filter program (v2)")
    Signed-off-by: Daniel Borkmann
    Signed-off-by: Alexei Starovoitov
    Cc: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Francois reported that setting big mtu on loopback device could prevent
    tcp sessions making progress.

    We do not support (yet ?) IPv6 Jumbograms and cook corrupted packets.

    We must limit the IPv6 MTU to (65535 + 40) bytes in theory.

    Tested:

    ifconfig lo mtu 70000
    netperf -H ::1

    Before patch : Throughput : 0.05 Mbits

    After patch : Throughput : 35484 Mbits

    Reported-by: Francois WELLENREITER
    Signed-off-by: Eric Dumazet
    Acked-by: YOSHIFUJI Hideaki
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Eric Dumazet
     

14 Apr, 2014

2 commits

  • nft_cmp_fast is used for equality comparisions of size < 4 byte a mask is calculated that is applied to
    both the data from userspace (during initialization) and the register
    value (during runtime). Both values are stored using (in effect) memcpy
    to a memory area that is then interpreted as u32 by nft_cmp_fast.

    This works fine on little endian since smaller types have the same base
    address, however on big endian this is not true and the smaller types
    are interpreted as a big number with trailing zero bytes.

    The mask therefore must not include the lower bytes, but the higher bytes
    on big endian. Add a helper function that does a cpu_to_le32 to switch
    the bytes on big endian. Since we're dealing with a mask of just consequitive
    bits, this works out fine.

    Signed-off-by: Patrick McHardy
    Signed-off-by: Pablo Neira Ayuso

    Patrick McHardy
     
  • Pull slab changes from Pekka Enberg:
    "The biggest change is byte-sized freelist indices which reduces slab
    freelist memory usage:

    https://lkml.org/lkml/2013/12/2/64"

    * 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
    mm: slab/slub: use page->list consistently instead of page->lru
    mm/slab.c: cleanup outdated comments and unify variables naming
    slab: fix wrongly used macro
    slub: fix high order page allocation problem with __GFP_NOFAIL
    slab: Make allocations with GFP_ZERO slightly more efficient
    slab: make more slab management structure off the slab
    slab: introduce byte sized index for the freelist of a slab
    slab: restrict the number of objects in a slab
    slab: introduce helper functions to get/set free object
    slab: factor out calculate nr objects in cache_estimate

    Linus Torvalds
     

13 Apr, 2014

4 commits

  • Pull yet more networking updates from David Miller:

    1) Various fixes to the new Redpine Signals wireless driver, from
    Fariya Fatima.

    2) L2TP PPP connect code takes PMTU from the wrong socket, fix from
    Dmitry Petukhov.

    3) UFO and TSO packets differ in whether they include the protocol
    header in gso_size, account for that in skb_gso_transport_seglen().
    From Florian Westphal.

    4) If VLAN untagging fails, we double free the SKB in the bridging
    output path. From Toshiaki Makita.

    5) Several call sites of sk->sk_data_ready() were referencing an SKB
    just added to the socket receive queue in order to calculate the
    second argument via skb->len. This is dangerous because the moment
    the skb is added to the receive queue it can be consumed in another
    context and freed up.

    It turns out also that none of the sk->sk_data_ready()
    implementations even care about this second argument.

    So just kill it off and thus fix all these use-after-free bugs as a
    side effect.

    6) Fix inverted test in tcp_v6_send_response(), from Lorenzo Colitti.

    7) pktgen needs to do locking properly for LLTX devices, from Daniel
    Borkmann.

    8) xen-netfront driver initializes TX array entries in RX loop :-) From
    Vincenzo Maffione.

    9) After refactoring, some tunnel drivers allow a tunnel to be
    configured on top itself. Fix from Nicolas Dichtel.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (46 commits)
    vti: don't allow to add the same tunnel twice
    gre: don't allow to add the same tunnel twice
    drivers: net: xen-netfront: fix array initialization bug
    pktgen: be friendly to LLTX devices
    r8152: check RTL8152_UNPLUG
    net: sun4i-emac: add promiscuous support
    net/apne: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
    net: ipv6: Fix oif in TCP SYN+ACK route lookup.
    drivers: net: cpsw: enable interrupts after napi enable and clearing previous interrupts
    drivers: net: cpsw: discard all packets received when interface is down
    net: Fix use after free by removing length arg from sk_data_ready callbacks.
    Drivers: net: hyperv: Address UDP checksum issues
    Drivers: net: hyperv: Negotiate suitable ndis version for offload support
    Drivers: net: hyperv: Allocate memory for all possible per-pecket information
    bridge: Fix double free and memory leak around br_allowed_ingress
    bonding: Remove debug_fs files when module init fails
    i40evf: program RSS LUT correctly
    i40evf: remove open-coded skb_cow_head
    ixgb: remove open-coded skb_cow_head
    igbvf: remove open-coded skb_cow_head
    ...

    Linus Torvalds
     
  • Pull llvm patches from Behan Webster:
    "These are some initial updates to support compiling the kernel with
    clang.

    These patches have been through the proper reviews to the best of my
    ability, and have been soaking in linux-next for a few weeks. These
    patches by themselves still do not completely allow clang to be used
    with the kernel code, but lay the foundation for other patches which
    are still under review.

    Several other of the LLVMLinux patches have been already added via
    maintainer trees"

    * tag 'llvmlinux-for-v3.15' of git://git.linuxfoundation.org/llvmlinux/kernel:
    x86: LLVMLinux: Fix "incomplete type const struct x86cpu_device_id"
    x86 kbuild: LLVMLinux: More cc-options added for clang
    x86, acpi: LLVMLinux: Remove nested functions from Thinkpad ACPI
    LLVMLinux: Add support for clang to compiler.h and new compiler-clang.h
    LLVMLinux: Remove warning about returning an uninitialized variable
    kbuild: LLVMLinux: Fix LINUX_COMPILER definition script for compilation with clang
    Documentation: LLVMLinux: Update Documentation/dontdiff
    kbuild: LLVMLinux: Adapt warnings for compilation with clang
    kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang

    Linus Torvalds
     
  • Pull SCSI target updates from Nicholas Bellinger:
    "Here are the target pending updates for v3.15-rc1. Apologies in
    advance for waiting until the second to last day of the merge window
    to send these out.

    The highlights this round include:

    - iser-target support for T10 PI (DIF) offloads (Sagi + Or)
    - Fix Task Aborted Status (TAS) handling in target-core (Alex Leung)
    - Pass in transport supported PI at session initialization (Sagi + MKP + nab)
    - Add WRITE_INSERT + READ_STRIP T10 PI support in target-core (nab + Sagi)
    - Fix iscsi-target ERL=2 ASYNC_EVENT connection pointer bug (nab)
    - Fix tcm_fc use-after-free of ft_tpg (Andy Grover)
    - Use correct ib_sg_dma primitives in ib_isert (Mike Marciniszyn)

    Also, note the virtio-scsi + vhost-scsi changes to expose T10 PI
    metadata into KVM guest have been left-out for now, as there where a
    few comments from MST + Paolo that where not able to be addressed in
    time for v3.15. Please expect this feature for v3.16-rc1"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (43 commits)
    ib_srpt: Use correct ib_sg_dma primitives
    target/tcm_fc: Rename ft_tport_create to ft_tport_get
    target/tcm_fc: Rename ft_{add,del}_lport to {add,del}_wwn
    target/tcm_fc: Rename structs and list members for clarity
    target/tcm_fc: Limit to 1 TPG per wwn
    target/tcm_fc: Don't export ft_lport_list
    target/tcm_fc: Fix use-after-free of ft_tpg
    target: Add check to prevent Abort Task from aborting itself
    target: Enable READ_STRIP emulation in target_complete_ok_work
    target/sbc: Add sbc_dif_read_strip software emulation
    target: Enable WRITE_INSERT emulation in target_execute_cmd
    target/sbc: Add sbc_dif_generate software emulation
    target/sbc: Only expose PI read_cap16 bits when supported by fabric
    target/spc: Only expose PI mode page bits when supported by fabric
    target/spc: Only expose PI inquiry bits when supported by fabric
    target: Pass in transport supported PI at session initialization
    target/iblock: Fix double bioset_integrity_free bug
    Target/sbc: Initialize COMPARE_AND_WRITE write_sg scatterlist
    target/rd: T10-Dif: RAM disk is allocating more space than required.
    iscsi-target: Fix ERL=2 ASYNC_EVENT connection pointer bug
    ...

    Linus Torvalds
     
  • Pull media fixes from Mauro Carvalho Chehab:
    "A series of bug fix patches for v3.15-rc1. Most are just driver
    fixes. There are some changes at remote controller core level, fixing
    some definitions on a new API added for Kernel v3.15.

    It also adds the missing include at include/uapi/linux/v4l2-common.h,
    to allow its compilation on userspace, as pointed by you"

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (24 commits)
    [media] gpsca: remove the risk of a division by zero
    [media] stk1160: warrant a NUL terminated string
    [media] v4l: ti-vpe: retain v4l2_buffer flags for captured buffers
    [media] v4l: ti-vpe: Set correct field parameter for output and capture buffers
    [media] v4l: ti-vpe: zero out reserved fields in try_fmt
    [media] v4l: ti-vpe: Fix initial configuration queue data
    [media] v4l: ti-vpe: Use correct bus_info name for the device in querycap
    [media] v4l: ti-vpe: report correct capabilities in querycap
    [media] v4l: ti-vpe: Allow usage of smaller images
    [media] v4l: ti-vpe: Use video_device_release_empty
    [media] v4l: ti-vpe: Make sure in job_ready that we have the needed number of dst_bufs
    [media] lgdt3305: include sleep functionality in lgdt3304_ops
    [media] drx-j: use customise option correctly
    [media] m88rs2000: fix sparse static warnings
    [media] r820t: fix size and init values
    [media] rc-core: remove generic scancode filter
    [media] rc-core: split dev->s_filter
    [media] rc-core: do not change 32bit NEC scancode format for now
    [media] rtl28xxu: remove duplicate ID 0458:707f Genius TVGo DVB-T03
    [media] xc2028: add missing break to switch
    ...

    Linus Torvalds