13 Jan, 2019

1 commit

  • commit 7ed1c1901fe52e6c5828deb155920b44b0adabb1 upstream.

    Currently a number of Makefiles break when used with toolchains that
    pass extra flags in CC and other cross-compile related variables (such
    as --sysroot).

    Thus we get this error when we use a toolchain that puts --sysroot in
    the CC var:

    ~/src/linux/tools$ make iio
    [snip]
    iio_event_monitor.c:18:10: fatal error: unistd.h: No such file or directory
    #include
    ^~~~~~~~~~

    This occurs because we clobber several env vars related to
    cross-compiling with lines like this:

    CC = $(CROSS_COMPILE)gcc

    Although this will point to a valid cross-compiler, we lose any extra
    flags that might exist in the CC variable, which can break toolchains
    that rely on them (for example, those that use --sysroot).

    This easily shows up using a Yocto SDK:

    $ . [snip]/sdk/environment-setup-cortexa8hf-neon-poky-linux-gnueabi

    $ echo $CC
    arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=hard
    -mcpu=cortex-a8
    --sysroot=[snip]/sdk/sysroots/cortexa8hf-neon-poky-linux-gnueabi

    $ echo $CROSS_COMPILE
    arm-poky-linux-gnueabi-

    $ echo ${CROSS_COMPILE}gcc
    krm-poky-linux-gnueabi-gcc

    Although arm-poky-linux-gnueabi-gcc is a cross-compiler, we've lost the
    --sysroot and other flags that enable us to find the right libraries to
    link against, so we can't find unistd.h and other libraries and headers.
    Normally with the --sysroot flag we would find unistd.h in the sdk
    directory in the sysroot:

    $ find [snip]/sdk/sysroots -path '*/usr/include/unistd.h'
    [snip]/sdk/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/include/unistd.h

    The perf Makefile adds CC = $(CROSS_COMPILE)gcc if and only if CC is not
    already set, and it compiles correctly with the above toolchain.

    So, generalize the logic that perf uses in the common Makefile and
    remove the manual CC = $(CROSS_COMPILE)gcc lines from each Makefile.

    Note that this patch does not fix cross-compile for all the tools (some
    have other bugs), but it does fix it for all except usb and acpi, which
    still have other unrelated issues.

    I tested both with and without the patch on native and cross-build and
    there appear to be no regressions.

    Link: http://lkml.kernel.org/r/20180107214028.23771-1-martin@martingkelly.com
    Signed-off-by: Martin Kelly
    Acked-by: Mark Brown
    Cc: Tejun Heo
    Cc: Li Zefan
    Cc: Johannes Weiner
    Cc: Linus Walleij
    Cc: "K. Y. Srinivasan"
    Cc: Haiyang Zhang
    Cc: Stephen Hemminger
    Cc: Jonathan Cameron
    Cc: Pali Rohar
    Cc: Richard Purdie
    Cc: Jacek Anaszewski
    Cc: Pavel Machek
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Arnaldo Carvalho de Melo
    Cc: Robert Moore
    Cc: Lv Zheng
    Cc: "Rafael J. Wysocki"
    Cc: Greg Kroah-Hartman
    Cc: Valentina Manea
    Cc: Shuah Khan
    Cc: Mario Limonciello
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Cc: Ignat Korchagin
    Signed-off-by: Greg Kroah-Hartman

    Martin Kelly
     

10 Oct, 2018

1 commit


26 Sep, 2018

1 commit


30 May, 2018

1 commit

  • [ Upstream commit 1330fc35327f3ecdfa1aa645e7321ced7349b2cd ]

    This patch fixes the below warnings with new glibc and gcc:

    hv_vss_daemon.c:100:13: warning: In the GNU C Library, "major" is defined
    by . For historical compatibility, it is currently
    defined by as well, but we plan to remove this soon.
    To use "major", include directly.

    hv_fcopy_daemon.c:42:2: note: 'snprintf' output between 2 and 1040
    bytes into a destination of size 260

    Signed-off-by: Dexuan Cui
    Cc: Stephen Hemminger
    Cc: K. Y. Srinivasan
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Dexuan Cui
     

14 Dec, 2017

1 commit

  • commit 297d6b6e56c2977fc504c61bbeeaa21296923f89 upstream.

    While reading in more than one block (50) of KVP records, the allocation
    goes per block, but the reads used the total number of allocated records
    (without resetting the pointer/stream). This causes the records buffer to
    overrun when the refresh reads more than one block over the previous
    capacity (e.g. reading more than 100 KVP records whereas the in-memory
    database was empty before).

    Fix this by reading the correct number of KVP records from file each time.

    Signed-off-by: Paul Meyer
    Signed-off-by: Long Li
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Paul Meyer
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

07 Sep, 2017

1 commit

  • Pull networking updates from David Miller:

    1) Support ipv6 checksum offload in sunvnet driver, from Shannon
    Nelson.

    2) Move to RB-tree instead of custom AVL code in inetpeer, from Eric
    Dumazet.

    3) Allow generic XDP to work on virtual devices, from John Fastabend.

    4) Add bpf device maps and XDP_REDIRECT, which can be used to build
    arbitrary switching frameworks using XDP. From John Fastabend.

    5) Remove UFO offloads from the tree, gave us little other than bugs.

    6) Remove the IPSEC flow cache, from Florian Westphal.

    7) Support ipv6 route offload in mlxsw driver.

    8) Support VF representors in bnxt_en, from Sathya Perla.

    9) Add support for forward error correction modes to ethtool, from
    Vidya Sagar Ravipati.

    10) Add time filter for packet scheduler action dumping, from Jamal Hadi
    Salim.

    11) Extend the zerocopy sendmsg() used by virtio and tap to regular
    sockets via MSG_ZEROCOPY. From Willem de Bruijn.

    12) Significantly rework value tracking in the BPF verifier, from Edward
    Cree.

    13) Add new jump instructions to eBPF, from Daniel Borkmann.

    14) Rework rtnetlink plumbing so that operations can be run without
    taking the RTNL semaphore. From Florian Westphal.

    15) Support XDP in tap driver, from Jason Wang.

    16) Add 32-bit eBPF JIT for ARM, from Shubham Bansal.

    17) Add Huawei hinic ethernet driver.

    18) Allow to report MD5 keys in TCP inet_diag dumps, from Ivan
    Delalande.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1780 commits)
    i40e: point wb_desc at the nvm_wb_desc during i40e_read_nvm_aq
    i40e: avoid NVM acquire deadlock during NVM update
    drivers: net: xgene: Remove return statement from void function
    drivers: net: xgene: Configure tx/rx delay for ACPI
    drivers: net: xgene: Read tx/rx delay for ACPI
    rocker: fix kcalloc parameter order
    rds: Fix non-atomic operation on shared flag variable
    net: sched: don't use GFP_KERNEL under spin lock
    vhost_net: correctly check tx avail during rx busy polling
    net: mdio-mux: add mdio_mux parameter to mdio_mux_init()
    rxrpc: Make service connection lookup always check for retry
    net: stmmac: Delete dead code for MDIO registration
    gianfar: Fix Tx flow control deactivation
    cxgb4: Ignore MPS_TX_INT_CAUSE[Bubble] for T6
    cxgb4: Fix pause frame count in t4_get_port_stats
    cxgb4: fix memory leak
    tun: rename generic_xdp to skb_xdp
    tun: reserve extra headroom only when XDP is set
    net: dsa: bcm_sf2: Configure IMP port TC2QOS mapping
    net: dsa: bcm_sf2: Advertise number of egress queues
    ...

    Linus Torvalds
     

17 Aug, 2017

3 commits

  • Currently this warning is triggered when compiling hv_fcopy_daemon:

    hv_fcopy_daemon.c:216:4: warning: dereferencing type-punned pointer will break
    strict-aliasing rules [-Wstrict-aliasing]
    kernel_modver = *(__u32 *)buffer;

    Convert the send/receive buffer to a union and pass individual members as
    needed. This also gives the correct size for the buffer.

    Signed-off-by: Olaf Hering
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Olaf Hering
     
  • Increase buffer size so that "_{-INT_MAX}" will fit.
    Spotted by the gcc7 snprintf checker.

    Signed-off-by: Olaf Hering
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Olaf Hering
     
  • Since a loop device is backed by a file, a backup will already result in
    its parent filesystem being frozen. It's sufficient to just freeze the
    parent filesystem, so we can skip the loop device.

    This avoids a situation where a loop device and its parent filesystem are
    both frozen and then thawed out of order. For example, if the loop device
    is enumerated first, we would thaw it while its parent filesystem is still
    frozen. The thaw operation fails and the loop device remains frozen.

    Signed-off-by: Alex Ng
    Signed-off-by: Vyronas Tsingaras
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Alex Ng
     

03 Aug, 2017

1 commit


17 Jul, 2017

1 commit


06 Jul, 2017

1 commit

  • Pull networking updates from David Miller:
    "Reasonably busy this cycle, but perhaps not as busy as in the 4.12
    merge window:

    1) Several optimizations for UDP processing under high load from
    Paolo Abeni.

    2) Support pacing internally in TCP when using the sch_fq packet
    scheduler for this is not practical. From Eric Dumazet.

    3) Support mutliple filter chains per qdisc, from Jiri Pirko.

    4) Move to 1ms TCP timestamp clock, from Eric Dumazet.

    5) Add batch dequeueing to vhost_net, from Jason Wang.

    6) Flesh out more completely SCTP checksum offload support, from
    Davide Caratti.

    7) More plumbing of extended netlink ACKs, from David Ahern, Pablo
    Neira Ayuso, and Matthias Schiffer.

    8) Add devlink support to nfp driver, from Simon Horman.

    9) Add RTM_F_FIB_MATCH flag to RTM_GETROUTE queries, from Roopa
    Prabhu.

    10) Add stack depth tracking to BPF verifier and use this information
    in the various eBPF JITs. From Alexei Starovoitov.

    11) Support XDP on qed device VFs, from Yuval Mintz.

    12) Introduce BPF PROG ID for better introspection of installed BPF
    programs. From Martin KaFai Lau.

    13) Add bpf_set_hash helper for TC bpf programs, from Daniel Borkmann.

    14) For loads, allow narrower accesses in bpf verifier checking, from
    Yonghong Song.

    15) Support MIPS in the BPF selftests and samples infrastructure, the
    MIPS eBPF JIT will be merged in via the MIPS GIT tree. From David
    Daney.

    16) Support kernel based TLS, from Dave Watson and others.

    17) Remove completely DST garbage collection, from Wei Wang.

    18) Allow installing TCP MD5 rules using prefixes, from Ivan
    Delalande.

    19) Add XDP support to Intel i40e driver, from Björn Töpel

    20) Add support for TC flower offload in nfp driver, from Simon
    Horman, Pieter Jansen van Vuuren, Benjamin LaHaise, Jakub
    Kicinski, and Bert van Leeuwen.

    21) IPSEC offloading support in mlx5, from Ilan Tayari.

    22) Add HW PTP support to macb driver, from Rafal Ozieblo.

    23) Networking refcount_t conversions, From Elena Reshetova.

    24) Add sock_ops support to BPF, from Lawrence Brako. This is useful
    for tuning the TCP sockopt settings of a group of applications,
    currently via CGROUPs"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1899 commits)
    net: phy: dp83867: add workaround for incorrect RX_CTRL pin strap
    dt-bindings: phy: dp83867: provide a workaround for incorrect RX_CTRL pin strap
    cxgb4: Support for get_ts_info ethtool method
    cxgb4: Add PTP Hardware Clock (PHC) support
    cxgb4: time stamping interface for PTP
    nfp: default to chained metadata prepend format
    nfp: remove legacy MAC address lookup
    nfp: improve order of interfaces in breakout mode
    net: macb: remove extraneous return when MACB_EXT_DESC is defined
    bpf: add missing break in for the TCP_BPF_SNDCWND_CLAMP case
    bpf: fix return in load_bpf_file
    mpls: fix rtm policy in mpls_getroute
    net, ax25: convert ax25_cb.refcount from atomic_t to refcount_t
    net, ax25: convert ax25_route.refcount from atomic_t to refcount_t
    net, ax25: convert ax25_uid_assoc.refcount from atomic_t to refcount_t
    net, sctp: convert sctp_ep_common.refcnt from atomic_t to refcount_t
    net, sctp: convert sctp_transport.refcnt from atomic_t to refcount_t
    net, sctp: convert sctp_chunk.refcnt from atomic_t to refcount_t
    net, sctp: convert sctp_datamsg.refcnt from atomic_t to refcount_t
    net, sctp: convert sctp_auth_bytes.refcnt from atomic_t to refcount_t
    ...

    Linus Torvalds
     

03 Jun, 2017

2 commits


18 May, 2017

2 commits

  • Paths can be up to PATH_MAX long and PATH_MAX is usually greater than 256.
    While on it, simplify path reconstruction to a simple snprintf(), define
    and reuse KVP_NET_DIR.

    Suggested-by: Tomas Hozza
    Signed-off-by: Vitaly Kuznetsov
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Vitaly Kuznetsov
     
  • If a FREEZE operation takes too long, the driver may time out and move on
    to another operation. The daemon is unaware of this and attempts to
    notify the driver that the FREEZE succeeded. This results in an error from
    the driver and the daemon leaves the filesystem in frozen state.

    Fix this by thawing the filesystem and continuing.

    Signed-off-by: Michael Gissing
    Signed-off-by: Alex Ng
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Alex Ng
     

16 May, 2017

1 commit


07 Mar, 2017

1 commit


14 Dec, 2016

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here's the big char/misc driver patches for 4.10-rc1. Lots of tiny
    changes over lots of "minor" driver subsystems, the largest being some
    new FPGA drivers. Other than that, a few other new drivers, but no new
    driver subsystems added for this kernel cycle, a nice change.

    All of these have been in linux-next with no reported issues"

    * tag 'char-misc-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (107 commits)
    uio-hv-generic: store physical addresses instead of virtual
    Tools: hv: kvp: configurable external scripts path
    uio-hv-generic: new userspace i/o driver for VMBus
    vmbus: add support for dynamic device id's
    hv: change clockevents unbind tactics
    hv: acquire vmbus_connection.channel_mutex in vmbus_free_channels()
    hyperv: Fix spelling of HV_UNKOWN
    mei: bus: enable non-blocking RX
    mei: fix the back to back interrupt handling
    mei: synchronize irq before initiating a reset.
    VME: Remove shutdown entry from vme_driver
    auxdisplay: ht16k33: select framebuffer helper modules
    MAINTAINERS: add git url for fpga
    fpga: Clarify how write_init works streaming modes
    fpga zynq: Fix incorrect ISR state on bootup
    fpga zynq: Remove priv->dev
    fpga zynq: Add missing \n to messages
    fpga: Add COMPILE_TEST to all drivers
    uio: pruss: add clk_disable()
    char/pcmcia: add some error checking in scr24x_read()
    ...

    Linus Torvalds
     

06 Dec, 2016

2 commits

  • We found network manager is necessary on RHEL to make the synthetic
    NIC, VF NIC bonding operations handled automatically. So, enabling
    network manager here.

    Signed-off-by: Haiyang Zhang
    Reviewed-by: K. Y. Srinivasan
    Signed-off-by: David S. Miller

    Haiyang Zhang
     
  • error when running hypervkvpd:
    $ sudo ./hv_kvp_daemon -n

    sh: hv_get_dns_info: command not found
    sh: hv_get_dhcp_info: command not found
    sh: hv_get_dns_info: command not found
    sh: hv_get_dhcp_info: command not found

    The external scripts are not installed in system path,
    adding a configurable macro.

    Signed-off-by: Alex Fluter
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Alex Fluter
     

07 Nov, 2016

3 commits


02 Sep, 2016

1 commit

  • Hyper-V host will send a VSS_OP_HOT_BACKUP request to check if guest is
    ready for a live backup/snapshot. The driver should respond to the check
    only if the daemon is running and listening to requests. This allows the
    host to fallback to standard snapshots in case the VSS daemon is not
    running.

    Signed-off-by: Alex Ng
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Alex Ng
     

31 Aug, 2016

1 commit

  • KVP daemon does fork()/exec() (with popen()) so we need to close our fds
    to avoid sharing them with child processes. The immediate implication of
    not doing so I see is SELinux complaining about 'ip' trying to access
    '/dev/vmbus/hv_kvp'.

    Signed-off-by: Vitaly Kuznetsov
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Vitaly Kuznetsov
     

13 Jul, 2016

1 commit

  • This script helps to create bonding network devices based on synthetic NIC
    (the virtual network adapter usually provided by Hyper-V) and the matching
    VF NIC (SRIOV virtual function). So the synthetic NIC and VF NIC can
    function as one network device, and fail over to the synthetic NIC if VF is
    down.

    Mayjor distros (RHEL, Ubuntu, SLES) supported by Hyper-V are supported by
    this script.

    Signed-off-by: Haiyang Zhang
    Reviewed-by: K. Y. Srinivasan
    Signed-off-by: David S. Miller

    Haiyang Zhang
     

02 May, 2016

1 commit


08 Feb, 2016

1 commit


15 Dec, 2015

3 commits


06 Aug, 2015

1 commit


25 May, 2015

4 commits


25 Mar, 2015

2 commits