Thread (15 messages) flat view 15 messages, 3 authors, 2017-11-10

Re: [net 3/6] net/mlx5: FPGA, return -EINVAL if size is zero

From: Or Gerlitz <hidden>
Date: 2017-11-09 09:13:52

On Thu, Nov 9, 2017 at 4:43 PM, Kamal Heib [off-list ref] wrote:
On Wed, 2017-11-08 at 23:13 +0900, Or Gerlitz wrote:
quoted
On Wed, Nov 8, 2017 at 4:21 PM, Saeed Mahameed [off-list ref]
wrote:
quoted
From: Kamal Heib <redacted>

In the current code, if a size of zero is passed to
mlx5_fpga_mem_{read|write}_i2c() functions the "err"
Don't we need to fix the call site where zero size is provided and
not
in called function?
Isn't sending down a zero size a sign for a bug which we are not
fixing?
quoted
Both functions are called from an exported symbols. so I think the size
validation should be within this two functions just like the case of
checking that mdev isn't set.
Note that the kernel trust model doesn't enforce you to check
everything as you go.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help