netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (unknown), 
@ 2015-10-23 12:10 LABBE Corentin
  2015-10-23 12:10 ` [PATCH 02/11] net: llc: fix a setting of error value to size_t LABBE Corentin
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: LABBE Corentin @ 2015-10-23 12:10 UTC (permalink / raw)
  To: acme, al.drozdov, alexander.h.duyck, daniel, davem,
	dmitry.tarnyagin, dwmw2, edumazet, eyal.birger, fw, gustavo,
	hannes, herbert, jiri, jmorris, johan.hedberg, kaber, kuznet,
	marcel, mst, pablo, samuel, tom, viro, willemb, yoshfuji
  Cc: linux-bluetooth, linux-crypto, linux-kernel, netdev


Hello

This patch series was begun by my finding that memcpy_[to|from]_msg have
a parameter len which is an int but used as size_t in whole functions.
Without blindly changing the parameter to size_t, I have tried to see if
anywhere in linux source code, someone give a negative argument with
the following (unfinished) coccinnelle patch.
virtual report
@@
type T;
signed T i;
@@
(
memcpy_from_msg
|
memcpy_to_msg
)
 (...,
- i)
+ (size_t)i)

With that I found many place where int variable is used to store unsigned values
and which could be set as size_t since there are used againt size_t
and/or given to functions that wait for size_t.
It permit also to found a bug in net/llc/af_llc.c where a size_t variable
stored error codes.

Regards

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-10-25 19:54 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-23 12:10 (unknown), LABBE Corentin
2015-10-23 12:10 ` [PATCH 02/11] net: llc: fix a setting of error value to size_t LABBE Corentin
2015-10-23 12:10 ` [PATCH 03/11] net: llc: change copied to size_t in llc_ui_sendmsg LABBE Corentin
2015-10-23 12:10 ` [PATCH 04/11] net: packet: change vnet_hdr_len from int to size_t LABBE Corentin
2015-10-23 13:35   ` Michael S. Tsirkin
2015-10-23 12:10 ` [PATCH 05/11] net: irda: change chunk " LABBE Corentin
2015-10-23 12:10 ` [PATCH 06/11] net: ipv6: set the length parameter of rawv6_send_hdrinc() " LABBE Corentin
2015-10-23 12:10 ` [PATCH 07/11] net: caif: change chunk from int " LABBE Corentin
2015-10-23 12:10 ` [PATCH 08/11] net: bluetooth: change the len parameter of sco_send_frame() " LABBE Corentin
2015-10-23 12:30   ` kbuild test robot
2015-10-23 12:36   ` kbuild test robot
2015-10-23 12:40   ` kbuild test robot
2015-10-25 19:54   ` Marcel Holtmann
2015-10-23 12:10 ` [PATCH 09/11] net: ipv6: hlen could be set as size_t LABBE Corentin
2015-10-23 12:33   ` kbuild test robot
2015-10-23 12:46   ` kbuild test robot
2015-10-23 12:10 ` [PATCH 10/11] net: ipv4: " LABBE Corentin
2015-10-23 12:43   ` kbuild test robot
2015-10-23 13:08   ` David Miller
2015-10-23 13:21     ` LABBE Corentin
2015-10-23 13:51       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).