Skip to content

RFC: tipc int vs size_t fixes

Paul Gortmaker netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4tipc: Fix bugs in tipc_msg_calc_data_size()net/tipc/msg.c net/tipc/msg.h+13 -61 reply
2/4tipc: Fix bugs in tipc_msg_build()net/tipc/msg.c net/tipc/msg.h+19 -101 reply
3/4tipc: Update arguments to use size_t for iovec array sizesinclude/net/tipc/tipc.h net/tipc/link.c net/tipc/link.h +2 more+17 -170 replies
4/4tipc: Fix bugs in sending of large amounts of byte-stream datanet/tipc/socket.c+12 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] RFC: tipc int vs size_t fixes

[apologies if you get this 2x ; a bogus Status: header caused them
to fail vger's sanity check for netdev, so resending.]

This is a starting point for fixing up the mix of int vs. size_t usage that Dan spotted in TIPC as being open to possible exploits.

Open questions I had remaining with these patches were whether we could trim out some of the unrequired casts, and whether we wanted to use a size_t for everything that at any time was based on or compared to an iov_len, including all instances of num_sect, when things like iov_length() in <linux/uio.h> use unsigned long for looping over segments. Also, whether we should give up at INT_MAX or LONG_MAX...

Please suggest changes as required, and I'll integrate them into this pass1 of draft of patches from Al and resend as required until we've got a final acceptable solution.

Thanks,
Paul.