[PATCH v3/resubmit 3/3] staging: gs_fpgaboot: return valid error codes

2017-07-28 Thread Jacob von Chorus
The return values on error are modified to be valid error codes. Theses error codes are propagated back to the init function's return. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.ca> --- drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 14 +++--- 1 file changed, 7 insertions

[PATCH v3/resubmit 1/3] staging: gs_fpgaboot: add buffer overflow checks

2017-07-28 Thread Jacob von Chorus
arbitrarily. This patch adds a check of the bitstream's length value to ensure it fits within the bounds of the allocated buffers. An error condition is returned from gs_read_bitstream if any of the reads fail. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.ca> --- v3: - use >= t

[PATCH v3/resubmit 2/3] staging: gs_fpgaboot: change char to u8

2017-07-28 Thread Jacob von Chorus
The bitstream storage variables were changed from char to u8 arrays to prevent issues such as negative lengths. This change makes the code compatible with the "data" field in "struct firmware" which is of type u8. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwpho

[PATCH v3/resubmit 3/3] staging: gs_fpgaboot: return valid error codes

2017-07-26 Thread Jacob von Chorus
The return values on error are modified to be valid error codes. Theses error codes are propagated back to the init function's return. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.ca> --- drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 14 +++--- 1 file changed, 7 insertions

[PATCH v3/resubmit 2/3] staging: gs_fpgaboot: change char to u8

2017-07-26 Thread Jacob von Chorus
The bitstream storage variables were changed from char to u8 arrays to prevent issues such as negative lengths. This change makes the code compatible with the "data" field in "struct firmware" which is of type u8. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.ca&g

[PATCH v3/resubmit 1/3] staging: gs_fpgaboot: add buffer overflow checks

2017-07-26 Thread Jacob von Chorus
arbitrarily. This patch adds a check of the bitstream's length value to ensure it fits within the bounds of the allocated buffers. An error condition is returned from gs_read_bitstream if any of the reads fail. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.ca> v3: - use >= t

[PATCH v3 3/3] staging: gs_fpgaboot: return valid error codes

2017-07-18 Thread Jacob von Chorus
The return values on error are modified to be valid error codes. Theses error codes are propagated back to the init function's return. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.ca> --- drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 14 +++--- 1 file changed, 7 insertions

[PATCH v3 2/3] staging: gs_fpgaboot: change char to u8

2017-07-18 Thread Jacob von Chorus
The bitstream storage variables were changed from char to u8 arrays to prevent issues such as negative lengths. This change makes the code compatible with the "data" field in "struct firmware" which is of type u8. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.ca&g

[PATCH v3 1/3] staging: gs_fpgaboot: add buffer overflow checks

2017-07-18 Thread Jacob von Chorus
arbitrarily. This patch adds a check of the bitstream's length value to ensure it fits within the bounds of the allocated buffers. An error condition is returned from gs_read_bitstream if any of the reads fail. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.ca> v3: - use >= t

Re: [PATCH v2 2/2] staging: gs_fpgaboot: change char to u8

2017-07-17 Thread Jacob von Chorus
> might be nicer than > > len = tbuf[0] << 8 | tbuf[1]; Agreed, though it should be "get_unaligned_be16". Thanks. Regards, Jacob von Chorus ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH v2 2/2] staging: gs_fpgaboot: change char to u8

2017-07-17 Thread Jacob von Chorus
The bitstream storage variables were changed from char to u8 arrays to prevent issues such as negative lengths. This change makes the code compatible with the "data" field in "struct firmware" which is of type u8. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.c

[PATCH v2 1/2] staging: gs_fpgaboot: add buffer overflow checks

2017-07-17 Thread Jacob von Chorus
arbitrarily. This patch adds a check of the bitstream's length value to ensure it fits within the bounds of the allocated buffers. An error condition is returned from gs_read_bitstream if any of the reads fail. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.ca> --- drivers/s

Re: [PATCH] staging: gs_fpgaboot: add buffer overflow checks

2017-07-17 Thread Jacob von Chorus
the string without null-termination. "buf" is required to store a null-terminator on top of len. Using "len + 1" shows this requirement more clearly; I will add brackets around "len + 1" for emphasis. Thanks for the feedback, I will send a v2. Regards, Jacob von Choru

[PATCH] staging: gs_fpgaboot: remove FSF address from GPL notice

2017-07-17 Thread Jacob von Chorus
This patch removes the FSF address from the GPL notice to fix a checkpatch.cl CHECK message. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.ca> --- drivers/staging/gs_fpgaboot/io.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/gs_fpgaboot/io.c b/drivers/s

[PATCH] staging: gs_fpgaboot: add buffer overflow checks

2017-07-17 Thread Jacob von Chorus
arbitrarily. This patch adds a check of the bitstream's length value to ensure it fits within the bounds of the allocated buffers. An error condition is returned from gs_read_bitstream if any of the reads fail. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.ca> --- drivers/s

[PATCH] staging: gs_fpgaboot: add buffer overflow checks

2017-07-16 Thread Jacob von Chorus
paragraph. Signed-off-by: Jacob von Chorus <jacobvoncho...@cwphoto.ca> --- drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 39 ++- drivers/staging/gs_fpgaboot/io.c | 4 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/drivers/staging/gs_fp