09 Jul, 2014

1 commit

  • Since commit 37e22164a8a3c39bdad45aa463b1e69a1fdf4110 ("tipc: rename and
    move message reassembly function") reassembly of long broadcast messages
    has been broken. This is because we test for a non-NULL return value
    of the *buf parameter as criteria for succesful reassembly. However, this
    parameter is left defined even after reception of the first fragment,
    when reassebly is still incomplete. This leads to a kernel crash as soon
    as a the first fragment of a long broadcast message is received.

    We fix this with this commit, by implementing a stricter behavior of the
    function and its return values.

    This commit should be applied to both net and net-next.

    Signed-off-by: Jon Maloy
    Acked-by: Ying Xue
    Signed-off-by: David S. Miller

    Jon Paul Maloy
     

15 May, 2014

1 commit

  • The function tipc_link_frag_rcv() is in reality a re-entrant generic
    message reassemby function that has nothing in particular to do with
    the link, where it is defined now. This becomes obvious when we see
    the need to call the function from other places in the code.

    In this commit rename it to tipc_buf_append() and move it to the file
    msg.c. We also simplify its signature by moving the tail pointer to
    the control block of the head buffer, hence making the head buffer
    self-contained.

    Signed-off-by: Jon Maloy
    Reviewed-by: Ying Xue
    Signed-off-by: David S. Miller

    Jon Paul Maloy
     

19 Oct, 2013

2 commits

  • tipc_msg_build() now copies message data from iovec to skb_buff
    using memcpy_fromiovecend(), which doesn't need to be passed the
    iovec length to perform the copying.

    So we remove the parameter indicating iovec length in all
    functions where TIPC messages are built and sent.

    Signed-off-by: Ying Xue
    Reviewed-by: Paul Gortmaker
    Signed-off-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     
  • tipc_msg_build() calls skb_copy_to_linear_data_offset() to copy data
    from user space to kernel space. However, the latter function does
    in its turn call memcpy() to perform the actual copying. This poses
    an obvious security and robustness risk, since memcpy() never makes
    any validity check on the pointer it is copying from.

    To correct this, we the replace the offending function call with
    a call to memcpy_fromiovecend(), which uses copy_from_user() to
    perform the copying.

    Signed-off-by: Ying Xue
    Reviewed-by: Paul Gortmaker
    Signed-off-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     

18 Jun, 2013

2 commits


14 Jul, 2012

1 commit

  • The link queue traces and packet level debug functions served
    a purpose during early development, but are now redundant
    since there are other, more capable tools available for
    debugging at the packet level.

    The TIPC_DEBUG Kconfig option is removed since it does not
    provide any extra debugging features anymore.

    This gets rid of a lot of tipc_printf usages, which will
    make the pending cleanup work of that function easier.

    Signed-off-by: Erik Hugne
    Signed-off-by: Jon Maloy
    Signed-off-by: Paul Gortmaker

    Erik Hugne
     

01 May, 2012

1 commit

  • Some of the comment blocks are floating in limbo between two
    functions, or between blocks of code. Delete the extra line
    feeds between any comment and its associated following block
    of code, to be consistent with the majority of the rest of
    the kernel. Also delete trailing newlines at EOF and fix
    a couple trivial typos in existing comments.

    This is a 100% cosmetic change with no runtime impact. We get
    rid of over 500 lines of non-code, and being blank line deletes,
    they won't even show up as noise in git blame.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

25 Feb, 2012

1 commit

  • Gets rid of two inlined routines that simply call existing sk_buff
    manipulation routines, since there is no longer any extra processing
    done by the helper routines.

    Note that these changes are essentially cosmetic in nature, and have
    no impact on the actual operation of TIPC.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     

28 Dec, 2011

1 commit

  • Reworks TIPC's media address data structure and associated processing
    routines to transfer all media-specific details of address conversion
    to the associated TIPC media adaptation code. TIPC's generic bearer code
    now only needs to know which media type an address is associated with
    and whether or not it is a broadcast address, and totally ignores the
    "value" field that contains the actual media-specific addressing info.

    These changes eliminate the need for a number of endianness conversion
    operations and will make it easier for TIPC to support new media types
    in the future.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     

25 Jun, 2011

1 commit


11 May, 2011

1 commit

  • Rework TIPC's message sending routines to take advantage of the total
    amount of data value passed to it by the kernel socket infrastructure.
    This change eliminates the need for TIPC to compute the size of outgoing
    messages itself, as well as the check for an oversize message in
    tipc_msg_build(). In addition, this change warrants an explanation:

    - res = send_packet(NULL, sock, &my_msg, 0);
    + res = send_packet(NULL, sock, &my_msg, bytes_to_send);

    Previously, the final argument to send_packet() was ignored (since the
    amount of data being sent was recalculated by a lower-level routine)
    and we could just pass in a dummy value (0). Now that the
    recalculation is being eliminated, the argument value being passed to
    send_packet() is significant and we have to supply the actual amount
    of data we want to send.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     

14 Mar, 2011

3 commits

  • Eliminates a routine that is used in handling messages arriving from
    another cluster or zone. Such messages can no longer be received by TIPC
    now that multi-cluster and multi-zone network support has been eliminated.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Gets rid of all remaining code relating to ROUTE_DISTRIBUTOR messages.
    These messages were only used in multi-cluster and multi-zone networks,
    which TIPC no longer supports. (For safety, TIPC now treats such messages
    the same way that it handles other unrecognized messages.)

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Removes support for the timestamp field of TIPC's link protocol messages.

    This field was previously used to hold an OS-dependent timestamp value
    that was used to assist in debugging early versions of TIPC. The field
    has now been deemed unnecessary and has been removed from the latest TIPC
    specification. This change has no impact on the operation of TIPC since
    the field was set by TIPC, but never referenced.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     

24 Feb, 2011

2 commits


02 Jan, 2011

4 commits

  • Cleans up TIPC's source code to eliminate the presence of unnecessary
    use of {} around single statements.

    These changes are purely cosmetic and do not alter the operation of TIPC
    in any way.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • Cleans up TIPC's source code to eliminate deviations from generally
    accepted coding conventions relating to leading/trailing white space
    and white space around commas, braces, cases, and sizeof.

    These changes are purely cosmetic and do not alter the operation of TIPC
    in any way.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • Eliminates a number of #include statements that no longer serve any
    useful purpose.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • Completes the simplification of TIPC's debugging capabilities. By default
    TIPC includes no debugging code, and any debugging code added by developers
    that calls the dbg() and dbg_macros() is compiled out. If debugging support
    is enabled, TIPC prints out some additional data about its internal state
    when certain abnormal conditions occur, and any developer-added calls to the
    TIPC debug macros are compiled in.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     

03 Dec, 2010

1 commit


17 Oct, 2010

1 commit

  • Do some cleanups of TIPC based on make namespacecheck
    1. Don't export unused symbols
    2. Eliminate dead code
    3. Make functions and variables local
    4. Rename buf_acquire to tipc_buf_acquire since it is used in several files

    Compile tested only.
    This make break out of tree kernel modules that depend on TIPC routines.

    Signed-off-by: Stephen Hemminger
    Acked-by: Jon Maloy
    Acked-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    stephen hemminger
     

13 May, 2010

1 commit


05 Jun, 2008

1 commit

  • This patch corrects two problems in the display of error code
    information in TIPC messages when debugging:
    - no longer tries to display error code in NAME_DISTRIBUTOR
    messages, which don't have the error field
    - now displays error code in 24 byte data messages, which do
    have the error field

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     

05 May, 2008

1 commit


07 Mar, 2008

1 commit


11 Feb, 2007

1 commit


18 Jan, 2006

1 commit


13 Jan, 2006

4 commits