10 Apr, 2020

1 commit

  • If the local node id(qrtr_local_nid) is not modified after its
    initialization, it equals to the broadcast node id(QRTR_NODE_BCAST).
    So the messages from local node should not be taken as broadcast
    and keep the process going to send them out anyway.

    The definitions are as follow:
    static unsigned int qrtr_local_nid = NUMA_NO_NODE;

    Fixes: fdf5fd397566 ("net: qrtr: Broadcast messages only from control port")
    Signed-off-by: Wang Wenhu
    Signed-off-by: David S. Miller

    Wang Wenhu
     

04 Mar, 2020

2 commits

  • The 2 second delay before calling qrtr_ns_init() meant that the remote
    processors would register as endpoints in qrtr and the say_hello() call
    would therefor broadcast the outgoing HELLO to them. With the HELLO
    handshake corrected this delay is no longer needed.

    Reviewed-by: Manivannan Sadhasivam
    Tested-by: Manivannan Sadhasivam
    Signed-off-by: Bjorn Andersson
    Signed-off-by: David S. Miller

    Bjorn Andersson
     
  • Lost in the translation from the user space implementation was the
    detail that HELLO mesages must be exchanged between each node pair. As
    such the incoming HELLO must be replied to.

    Similar to the previous implementation no effort is made to prevent two
    Linux boxes from continuously sending HELLO messages back and forth,
    this is left to a follow up patch.

    say_hello() is moved, to facilitate the new call site.

    Fixes: 0c2204a4ad71 ("net: qrtr: Migrate nameservice to kernel from userspace")
    Reviewed-by: Manivannan Sadhasivam
    Tested-by: Manivannan Sadhasivam
    Signed-off-by: Bjorn Andersson
    Signed-off-by: David S. Miller

    Bjorn Andersson
     

27 Feb, 2020

1 commit


25 Feb, 2020

1 commit


22 Feb, 2020

2 commits

  • In order to start the QRTR nameservice, the local node ID needs to be
    valid. Hence, fix it to 1. Previously, the node ID was configured through
    a userspace tool before starting the nameservice daemon. Since we have now
    integrated the nameservice handling to kernel, this change is necessary
    for making it functional.

    Signed-off-by: Manivannan Sadhasivam
    Signed-off-by: David S. Miller

    Manivannan Sadhasivam
     
  • The QRTR nameservice has been maintained in userspace for some time. This
    commit migrates it to Linux kernel. This change is required in order to
    eliminate the need of starting a userspace daemon for making the WiFi
    functional for ath11k based devices. Since the QRTR NS is not usually
    packed in most of the distros, users need to clone, build and install it
    to get the WiFi working. It will become a hassle when the user doesn't
    have any other source of network connectivity.

    Signed-off-by: Manivannan Sadhasivam
    Signed-off-by: David S. Miller

    Manivannan Sadhasivam
     

15 Jan, 2020

5 commits

  • Rather than enqueuing messages and scheduling a worker to deliver them
    to the individual sockets we can now, thanks to the previous work, move
    this directly into the endpoint callback.

    This saves us a context switch per incoming message and removes the
    possibility of an opportunistic suspend to happen between the message is
    coming from the endpoint until it ends up in the socket's receive
    buffer.

    Signed-off-by: Bjorn Andersson
    Signed-off-by: David S. Miller

    Bjorn Andersson
     
  • The important part of qrtr_port_lookup() wrt synchronization is that the
    function returns a reference counted struct qrtr_sock, or fail.

    As such we need only to ensure that an decrement of the object's
    refcount happens inbetween the finding of the object in the idr and
    qrtr_port_lookup()'s own increment of the object.

    By using RCU and putting a synchronization point after we remove the
    mapping from the idr, but before it can be released we achieve this -
    with the benefit of not having to hold the mutex in qrtr_port_lookup().

    Signed-off-by: Bjorn Andersson
    Signed-off-by: David S. Miller

    Bjorn Andersson
     
  • Move operations on the qrtr_nodes radix tree under a separate spinlock
    and make the qrtr_nodes tree GFP_ATOMIC, to allow operation from atomic
    context in a subsequent patch.

    Signed-off-by: Bjorn Andersson
    Signed-off-by: David S. Miller

    Bjorn Andersson
     
  • In order to prevent overconsumption of resources on the remote side QRTR
    implements a flow control mechanism.

    The mechanism works by the sender keeping track of the number of
    outstanding unconfirmed messages that has been transmitted to a
    particular node/port pair.

    Upon count reaching a low watermark (L) the confirm_rx bit is set in the
    outgoing message and when the count reaching a high watermark (H)
    transmission will be blocked upon the reception of a resume_tx message
    from the remote, that resets the counter to 0.

    This guarantees that there will be at most 2H - L messages in flight.
    Values chosen for L and H are 5 and 10 respectively.

    Signed-off-by: Bjorn Andersson
    Signed-off-by: David S. Miller

    Bjorn Andersson
     
  • The confirm-rx bit is used to implement a per port flow control, in
    order to make sure that no messages are dropped due to resource
    exhaustion. Move the resume-tx transmission to recvmsg to only confirm
    messages as they are consumed by the application.

    Signed-off-by: Bjorn Andersson
    Signed-off-by: David S. Miller

    Bjorn Andersson
     

06 Jan, 2020

1 commit

  • The len used for skb_put_padto is wrong, it need to add len of hdr.

    In qrtr_node_enqueue, local variable size_t len is assign with
    skb->len, then skb_push(skb, sizeof(*hdr)) will add skb->len with
    sizeof(*hdr), so local variable size_t len is not same with skb->len
    after skb_push(skb, sizeof(*hdr)).

    Then the purpose of skb_put_padto(skb, ALIGN(len, 4)) is to add add
    pad to the end of the skb's data if skb->len is not aligned to 4, but
    unfortunately it use len instead of skb->len, at this line, skb->len
    is 32 bytes(sizeof(*hdr)) more than len, for example, len is 3 bytes,
    then skb->len is 35 bytes(3 + 32), and ALIGN(len, 4) is 4 bytes, so
    __skb_put_padto will do nothing after check size(35) < len(4), the
    correct value should be 36(sizeof(*hdr) + ALIGN(len, 4) = 32 + 4),
    then __skb_put_padto will pass check size(35) < len(36) and add 1 byte
    to the end of skb's data, then logic is correct.

    function of skb_push:
    void *skb_push(struct sk_buff *skb, unsigned int len)
    {
    skb->data -= len;
    skb->len += len;
    if (unlikely(skb->data < skb->head))
    skb_under_panic(skb, len, __builtin_return_address(0));
    return skb->data;
    }

    function of skb_put_padto
    static inline int skb_put_padto(struct sk_buff *skb, unsigned int len)
    {
    return __skb_put_padto(skb, len, true);
    }

    function of __skb_put_padto
    static inline int __skb_put_padto(struct sk_buff *skb, unsigned int len,
    bool free_on_error)
    {
    unsigned int size = skb->len;

    if (unlikely(size < len)) {
    len -= size;
    if (__skb_pad(skb, len, free_on_error))
    return -ENOMEM;
    __skb_put(skb, len);
    }
    return 0;
    }

    Signed-off-by: Carl Huang
    Signed-off-by: Wen Gong
    Signed-off-by: David S. Miller

    Carl Huang
     

31 Oct, 2019

1 commit


22 Sep, 2019

1 commit

  • As the endpoint is unregistered there might still be work pending to
    handle incoming messages, which will result in a use after free
    scenario. The plan is to remove the rx_worker, but until then (and for
    stable@) ensure that the work is stopped before the node is freed.

    Fixes: bdabad3e363d ("net: Add Qualcomm IPC router")
    Cc: stable@vger.kernel.org
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Jakub Kicinski

    Bjorn Andersson
     

12 Sep, 2019

1 commit


05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 and
    only version 2 as published by the free software foundation this
    program is distributed in the hope that it will be useful but
    without any warranty without even the implied warranty of
    merchantability or fitness for a particular purpose see the gnu
    general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 294 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Alexios Zavras
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190529141900.825281744@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

22 May, 2019

1 commit

  • Pull networking fixes from David Miller:

    1) Clear up some recent tipc regressions because of registration
    ordering. Fix from Junwei Hu.

    2) tipc's TLV_SET() can read past the end of the supplied buffer during
    the copy. From Chris Packham.

    3) ptp example program doesn't match the kernel, from Richard Cochran.

    4) Outgoing message type fix in qrtr, from Bjorn Andersson.

    5) Flow control regression in stmmac, from Tan Tee Min.

    6) Fix inband autonegotiation in phylink, from Russell King.

    7) Fix sk_bound_dev_if handling in rawv6_bind(), from Mike Manning.

    8) Fix usbnet crash after disconnect, from Kloetzke Jan.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (21 commits)
    usbnet: fix kernel crash after disconnect
    selftests: fib_rule_tests: use pre-defined DEV_ADDR
    net-next: net: Fix typos in ip-sysctl.txt
    ipv6: Consider sk_bound_dev_if when binding a raw socket to an address
    net: phylink: ensure inband AN works correctly
    usbnet: ipheth: fix racing condition
    net: stmmac: dma channel control register need to be init first
    net: stmmac: fix ethtool flow control not able to get/set
    net: qrtr: Fix message type of outgoing packets
    networking: : fix typos in code comments
    ptp: Fix example program to match kernel.
    fddi: fix typos in code comments
    selftests: fib_rule_tests: enable forwarding before ipv4 from/iif test
    selftests: fib_rule_tests: fix local IPv4 address typo
    tipc: Avoid copying bytes beyond the supplied data
    2/2] net: xilinx_emaclite: use readx_poll_timeout() in mdio wait function
    1/2] net: axienet: use readx_poll_timeout() in mdio wait function
    vlan: Mark expected switch fall-through
    macvlan: Mark expected switch fall-through
    net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query
    ...

    Linus Torvalds
     

21 May, 2019

2 commits

  • Add SPDX license identifiers to all Make/Kconfig files which:

    - Have no license information of any form

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • QRTR packets has a message type in the header, which is repeated in the
    control header. For control packets we therefor copy the type from
    beginning of the outgoing payload and use that as message type.

    For non-control messages an endianness fix introduced in v5.2-rc1 caused the
    type to be 0, rather than QRTR_TYPE_DATA, causing all messages to be dropped by
    the receiver. Fix this by converting and using qrtr_type, which will remain
    QRTR_TYPE_DATA for non-control messages.

    Fixes: 8f5e24514cbd ("net: qrtr: use protocol endiannes variable")
    Signed-off-by: Bjorn Andersson
    Signed-off-by: David S. Miller

    Bjorn Andersson
     

12 May, 2019

1 commit

  • sparse was unable to verify endiannes correctness due to reassignment
    from le32_to_cpu to the same variable - fix this warning up by providing
    a proper __le32 type and initializing it. This is not actually fixing
    any bug - rather just addressing the sparse warning.

    Signed-off-by: Nicholas Mc Guire
    Signed-off-by: David S. Miller

    Nicholas Mc Guire
     

28 Apr, 2019

1 commit

  • We currently have two levels of strict validation:

    1) liberal (default)
    - undefined (type >= max) & NLA_UNSPEC attributes accepted
    - attribute length >= expected accepted
    - garbage at end of message accepted
    2) strict (opt-in)
    - NLA_UNSPEC attributes accepted
    - attribute length >= expected accepted

    Split out parsing strictness into four different options:
    * TRAILING - check that there's no trailing data after parsing
    attributes (in message or nested)
    * MAXTYPE - reject attrs > max known type
    * UNSPEC - reject attributes with NLA_UNSPEC policy entries
    * STRICT_ATTRS - strictly validate attribute size

    The default for future things should be *everything*.
    The current *_strict() is a combination of TRAILING and MAXTYPE,
    and is renamed to _deprecated_strict().
    The current regular parsing has none of this, and is renamed to
    *_parse_deprecated().

    Additionally it allows us to selectively set one of the new flags
    even on old policies. Notably, the UNSPEC flag could be useful in
    this case, since it can be arranged (by filling in the policy) to
    not be an incompatible userspace ABI change, but would then going
    forward prevent forgetting attribute entries. Similar can apply
    to the POLICY flag.

    We end up with the following renames:
    * nla_parse -> nla_parse_deprecated
    * nla_parse_strict -> nla_parse_deprecated_strict
    * nlmsg_parse -> nlmsg_parse_deprecated
    * nlmsg_parse_strict -> nlmsg_parse_deprecated_strict
    * nla_parse_nested -> nla_parse_nested_deprecated
    * nla_validate_nested -> nla_validate_nested_deprecated

    Using spatch, of course:
    @@
    expression TB, MAX, HEAD, LEN, POL, EXT;
    @@
    -nla_parse(TB, MAX, HEAD, LEN, POL, EXT)
    +nla_parse_deprecated(TB, MAX, HEAD, LEN, POL, EXT)

    @@
    expression NLH, HDRLEN, TB, MAX, POL, EXT;
    @@
    -nlmsg_parse(NLH, HDRLEN, TB, MAX, POL, EXT)
    +nlmsg_parse_deprecated(NLH, HDRLEN, TB, MAX, POL, EXT)

    @@
    expression NLH, HDRLEN, TB, MAX, POL, EXT;
    @@
    -nlmsg_parse_strict(NLH, HDRLEN, TB, MAX, POL, EXT)
    +nlmsg_parse_deprecated_strict(NLH, HDRLEN, TB, MAX, POL, EXT)

    @@
    expression TB, MAX, NLA, POL, EXT;
    @@
    -nla_parse_nested(TB, MAX, NLA, POL, EXT)
    +nla_parse_nested_deprecated(TB, MAX, NLA, POL, EXT)

    @@
    expression START, MAX, POL, EXT;
    @@
    -nla_validate_nested(START, MAX, POL, EXT)
    +nla_validate_nested_deprecated(START, MAX, POL, EXT)

    @@
    expression NLH, HDRLEN, MAX, POL, EXT;
    @@
    -nlmsg_validate(NLH, HDRLEN, MAX, POL, EXT)
    +nlmsg_validate_deprecated(NLH, HDRLEN, MAX, POL, EXT)

    For this patch, don't actually add the strict, non-renamed versions
    yet so that it breaks compile if I get it wrong.

    Also, while at it, make nla_validate and nla_parse go down to a
    common __nla_validate_parse() function to avoid code duplication.

    Ultimately, this allows us to have very strict validation for every
    new caller of nla_parse()/nlmsg_parse() etc as re-introduced in the
    next patch, while existing things will continue to work as is.

    In effect then, this adds fully strict validation for any new command.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

20 Apr, 2019

1 commit

  • The SIOCGSTAMP/SIOCGSTAMPNS ioctl commands are implemented by many
    socket protocol handlers, and all of those end up calling the same
    sock_get_timestamp()/sock_get_timestampns() helper functions, which
    results in a lot of duplicate code.

    With the introduction of 64-bit time_t on 32-bit architectures, this
    gets worse, as we then need four different ioctl commands in each
    socket protocol implementation.

    To simplify that, let's add a new .gettstamp() operation in
    struct proto_ops, and move ioctl implementation into the common
    sock_ioctl()/compat_sock_ioctl_trans() functions that these all go
    through.

    We can reuse the sock_get_timestamp() implementation, but generalize
    it so it can deal with both native and compat mode, as well as
    timeval and timespec structures.

    Acked-by: Stefan Schmidt
    Acked-by: Neil Horman
    Acked-by: Marc Kleine-Budde
    Link: https://lore.kernel.org/lkml/CAK8P3a038aDQQotzua_QtKGhq8O9n+rdiz2=WDCp82ys8eUT+A@mail.gmail.com/
    Signed-off-by: Arnd Bergmann
    Acked-by: Willem de Bruijn
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

06 Mar, 2019

1 commit

  • Patch series "Replace all open encodings for NUMA_NO_NODE", v3.

    All these places for replacement were found by running the following
    grep patterns on the entire kernel code. Please let me know if this
    might have missed some instances. This might also have replaced some
    false positives. I will appreciate suggestions, inputs and review.

    1. git grep "nid == -1"
    2. git grep "node == -1"
    3. git grep "nid = -1"
    4. git grep "node = -1"

    This patch (of 2):

    At present there are multiple places where invalid node number is
    encoded as -1. Even though implicitly understood it is always better to
    have macros in there. Replace these open encodings for an invalid node
    number with the global macro NUMA_NO_NODE. This helps remove NUMA
    related assumptions like 'invalid node' from various places redirecting
    them to a common definition.

    Link: http://lkml.kernel.org/r/1545127933-10711-2-git-send-email-anshuman.khandual@arm.com
    Signed-off-by: Anshuman Khandual
    Reviewed-by: David Hildenbrand
    Acked-by: Jeff Kirsher [ixgbe]
    Acked-by: Jens Axboe [mtip32xx]
    Acked-by: Vinod Koul [dmaengine.c]
    Acked-by: Michael Ellerman [powerpc]
    Acked-by: Doug Ledford [drivers/infiniband]
    Cc: Joseph Qi
    Cc: Hans Verkuil
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anshuman Khandual
     

05 Jul, 2018

2 commits


29 Jun, 2018

1 commit

  • The poll() changes were not well thought out, and completely
    unexplained. They also caused a huge performance regression, because
    "->poll()" was no longer a trivial file operation that just called down
    to the underlying file operations, but instead did at least two indirect
    calls.

    Indirect calls are sadly slow now with the Spectre mitigation, but the
    performance problem could at least be largely mitigated by changing the
    "->get_poll_head()" operation to just have a per-file-descriptor pointer
    to the poll head instead. That gets rid of one of the new indirections.

    But that doesn't fix the new complexity that is completely unwarranted
    for the regular case. The (undocumented) reason for the poll() changes
    was some alleged AIO poll race fixing, but we don't make the common case
    slower and more complex for some uncommon special case, so this all
    really needs way more explanations and most likely a fundamental
    redesign.

    [ This revert is a revert of about 30 different commits, not reverted
    individually because that would just be unnecessarily messy - Linus ]

    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

07 Jun, 2018

1 commit

  • Pull networking updates from David Miller:

    1) Add Maglev hashing scheduler to IPVS, from Inju Song.

    2) Lots of new TC subsystem tests from Roman Mashak.

    3) Add TCP zero copy receive and fix delayed acks and autotuning with
    SO_RCVLOWAT, from Eric Dumazet.

    4) Add XDP_REDIRECT support to mlx5 driver, from Jesper Dangaard
    Brouer.

    5) Add ttl inherit support to vxlan, from Hangbin Liu.

    6) Properly separate ipv6 routes into their logically independant
    components. fib6_info for the routing table, and fib6_nh for sets of
    nexthops, which thus can be shared. From David Ahern.

    7) Add bpf_xdp_adjust_tail helper, which can be used to generate ICMP
    messages from XDP programs. From Nikita V. Shirokov.

    8) Lots of long overdue cleanups to the r8169 driver, from Heiner
    Kallweit.

    9) Add BTF ("BPF Type Format"), from Martin KaFai Lau.

    10) Add traffic condition monitoring to iwlwifi, from Luca Coelho.

    11) Plumb extack down into fib_rules, from Roopa Prabhu.

    12) Add Flower classifier offload support to igb, from Vinicius Costa
    Gomes.

    13) Add UDP GSO support, from Willem de Bruijn.

    14) Add documentation for eBPF helpers, from Quentin Monnet.

    15) Add TLS tx offload to mlx5, from Ilya Lesokhin.

    16) Allow applications to be given the number of bytes available to read
    on a socket via a control message returned from recvmsg(), from
    Soheil Hassas Yeganeh.

    17) Add x86_32 eBPF JIT compiler, from Wang YanQing.

    18) Add AF_XDP sockets, with zerocopy support infrastructure as well.
    From Björn Töpel.

    19) Remove indirect load support from all of the BPF JITs and handle
    these operations in the verifier by translating them into native BPF
    instead. From Daniel Borkmann.

    20) Add GRO support to ipv6 gre tunnels, from Eran Ben Elisha.

    21) Allow XDP programs to do lookups in the main kernel routing tables
    for forwarding. From David Ahern.

    22) Allow drivers to store hardware state into an ELF section of kernel
    dump vmcore files, and use it in cxgb4. From Rahul Lakkireddy.

    23) Various RACK and loss detection improvements in TCP, from Yuchung
    Cheng.

    24) Add TCP SACK compression, from Eric Dumazet.

    25) Add User Mode Helper support and basic bpfilter infrastructure, from
    Alexei Starovoitov.

    26) Support ports and protocol values in RTM_GETROUTE, from Roopa
    Prabhu.

    27) Support bulking in ->ndo_xdp_xmit() API, from Jesper Dangaard
    Brouer.

    28) Add lots of forwarding selftests, from Petr Machata.

    29) Add generic network device failover driver, from Sridhar Samudrala.

    * ra.kernel.org:/pub/scm/linux/kernel/git/davem/net-next: (1959 commits)
    strparser: Add __strp_unpause and use it in ktls.
    rxrpc: Fix terminal retransmission connection ID to include the channel
    net: hns3: Optimize PF CMDQ interrupt switching process
    net: hns3: Fix for VF mailbox receiving unknown message
    net: hns3: Fix for VF mailbox cannot receiving PF response
    bnx2x: use the right constant
    Revert "net: sched: cls: Fix offloading when ingress dev is vxlan"
    net: dsa: b53: Fix for brcm tag issue in Cygnus SoC
    enic: fix UDP rss bits
    netdev-FAQ: clarify DaveM's position for stable backports
    rtnetlink: validate attributes in do_setlink()
    mlxsw: Add extack messages for port_{un, }split failures
    netdevsim: Add extack error message for devlink reload
    devlink: Add extack to reload and port_{un, }split operations
    net: metrics: add proper netlink validation
    ipmr: fix error path when ipmr_new_table fails
    ip6mr: only set ip6mr_table from setsockopt when ip6mr_new_table succeeds
    net: hns3: remove unused hclgevf_cfg_func_mta_filter
    netfilter: provide udp*_lib_lookup for nf_tproxy
    qed*: Utilize FW 8.37.2.0
    ...

    Linus Torvalds
     

26 May, 2018

1 commit


28 Apr, 2018

1 commit

  • This implements a misc character device named "qrtr-tun" for the purpose
    of allowing user space applications to implement endpoints in the qrtr
    network.

    This allows more advanced (and dynamic) testing of the qrtr code as well
    as opens up the ability of tunneling qrtr over a network or USB link.

    Signed-off-by: Bjorn Andersson
    Signed-off-by: David S. Miller

    Bjorn Andersson
     

17 Apr, 2018

1 commit


06 Mar, 2018

1 commit


27 Feb, 2018

1 commit


13 Feb, 2018

1 commit

  • Changes since v1:
    Added changes in these files:
    drivers/infiniband/hw/usnic/usnic_transport.c
    drivers/staging/lustre/lnet/lnet/lib-socket.c
    drivers/target/iscsi/iscsi_target_login.c
    drivers/vhost/net.c
    fs/dlm/lowcomms.c
    fs/ocfs2/cluster/tcp.c
    security/tomoyo/network.c

    Before:
    All these functions either return a negative error indicator,
    or store length of sockaddr into "int *socklen" parameter
    and return zero on success.

    "int *socklen" parameter is awkward. For example, if caller does not
    care, it still needs to provide on-stack storage for the value
    it does not need.

    None of the many FOO_getname() functions of various protocols
    ever used old value of *socklen. They always just overwrite it.

    This change drops this parameter, and makes all these functions, on success,
    return length of sockaddr. It's always >= 0 and can be differentiated
    from an error.

    Tests in callers are changed from "if (err)" to "if (err < 0)", where needed.

    rpc_sockname() lost "int buflen" parameter, since its only use was
    to be passed to kernel_getsockname() as &buflen and subsequently
    not used in any way.

    Userspace API is not changed.

    text data bss dec hex filename
    30108430 2633624 873672 33615726 200ef6e vmlinux.before.o
    30108109 2633612 873672 33615393 200ee21 vmlinux.o

    Signed-off-by: Denys Vlasenko
    CC: David S. Miller
    CC: linux-kernel@vger.kernel.org
    CC: netdev@vger.kernel.org
    CC: linux-bluetooth@vger.kernel.org
    CC: linux-decnet-user@lists.sourceforge.net
    CC: linux-wireless@vger.kernel.org
    CC: linux-rdma@vger.kernel.org
    CC: linux-sctp@vger.kernel.org
    CC: linux-nfs@vger.kernel.org
    CC: linux-x25@vger.kernel.org
    Signed-off-by: David S. Miller

    Denys Vlasenko
     

05 Dec, 2017

1 commit


10 Nov, 2017

1 commit


08 Nov, 2017

1 commit

  • Registering qrtr with module_init makes the ability of typical platform
    code to create AF_QIPCRTR socket during probe a matter of link order
    luck. Moving qrtr to postcore_initcall() avoids this.

    Signed-off-by: Bjorn Andersson
    Signed-off-by: David S. Miller

    Bjorn Andersson
     

04 Nov, 2017

1 commit


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
     

12 Oct, 2017

1 commit