RE: [PATCH net] ravb: Fix bit fields checking in ravb_hwtstamp_get()

2020-10-26 Thread Andrew Gabbasov
.kernel.org; David S. Miller > ; geert+rene...@glider.be; Julia Lawall > ; Behme, Dirk - Bosch > ; Eugeniu Rosca > Subject: Re: [PATCH net] ravb: Fix bit fields checking in ravb_hwtstamp_get() > > Hello! > > On 10/19/20 10:32 AM, Andrew Gabbasov wrote: > >So

[PATCH net v2] ravb: Fix bit fields checking in ravb_hwtstamp_get()

2020-10-26 Thread Andrew Gabbasov
Ethernet AVB driver proper") Reported-by: Julia Lawall Signed-off-by: Andrew Gabbasov Reviewed-by: Sergei Shtylyov --- drivers/net/ethernet/renesas/ravb_main.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/driv

RE: [PATCH net] ravb: Fix bit fields checking in ravb_hwtstamp_get()

2020-10-19 Thread Andrew Gabbasov
. Miller > ; geert+rene...@glider.be; Julia Lawall > ; Behme, Dirk - Bosch > ; Eugeniu Rosca > Subject: Re: [PATCH net] ravb: Fix bit fields checking in ravb_hwtstamp_get() > > Hello! > > On 10/1/20 10:13 AM, Andrew Gabbasov wrote: > >The patch was set to the "

RE: [PATCH net] ravb: Fix bit fields checking in ravb_hwtstamp_get()

2020-10-01 Thread Andrew Gabbasov
and just fix the get ioctl code, where the issue is actually located. Thanks! Best regards, Andrew > > Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") > Reported-by: Julia Lawall > Signed-off-by: Andrew Gabbasov > --- > drivers/net/ethernet/renesas/ravb_m

[PATCH net] ravb: Fix bit fields checking in ravb_hwtstamp_get()

2020-09-30 Thread Andrew Gabbasov
Ethernet AVB driver proper") Reported-by: Julia Lawall Signed-off-by: Andrew Gabbasov --- drivers/net/ethernet/renesas/ravb_main.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_m

[PATCH] usb: gadget: f_fs: Fix use-after-free in ffs_free_inst

2017-11-08 Thread Andrew Gabbasov
rence") Cc: sta...@vger.kernel.org Signed-off-by: Andrew Gabbasov <andrew_gabba...@mentor.com> --- drivers/usb/gadget/function/f_fs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 8b34258..ef8f7d6 100644 --- a/drivers/

[PATCH] usb: gadget: f_fs: Fix use-after-free in ffs_free_inst

2017-11-08 Thread Andrew Gabbasov
rence") Cc: sta...@vger.kernel.org Signed-off-by: Andrew Gabbasov --- drivers/usb/gadget/function/f_fs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 8b34258..ef8f7d6 100644 --- a/drivers/usb/gadget/function/f_fs.c +++

[PATCH] usb: gadget: composite: Fix use-after-free in usb_composite_overwrite_options

2017-09-30 Thread Andrew Gabbasov
a...@vger.kernel.org Signed-off-by: Andrew Gabbasov <andrew_gabba...@mentor.com> --- drivers/usb/gadget/composite.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index dd74c99..5d061b3 100644 --- a/drivers/usb/gadget/com

[PATCH] usb: gadget: composite: Fix use-after-free in usb_composite_overwrite_options

2017-09-30 Thread Andrew Gabbasov
a...@vger.kernel.org Signed-off-by: Andrew Gabbasov --- drivers/usb/gadget/composite.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index dd74c99..5d061b3 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/co

[PATCH] usb: gadget: configfs: Fix memory leak of interface directory data

2017-09-30 Thread Andrew Gabbasov
appropriate. Fixes: 1ae1602de028 ("configfs: switch ->default groups to a linked list") Cc: sta...@vger.kernel.org Signed-off-by: Andrew Gabbasov <andrew_gabba...@mentor.com> --- drivers/usb/gadget/configfs.c | 15 --- drivers/usb/gadget/configfs.h | 11 +

[PATCH] usb: gadget: configfs: Fix memory leak of interface directory data

2017-09-30 Thread Andrew Gabbasov
appropriate. Fixes: 1ae1602de028 ("configfs: switch ->default groups to a linked list") Cc: sta...@vger.kernel.org Signed-off-by: Andrew Gabbasov --- drivers/usb/gadget/configfs.c | 15 --- drivers/usb/gadget/configfs.h | 11 ++- drivers/u

[PATCH] udf: Fix conversion of 'dstring' fields to UTF8

2016-04-25 Thread Andrew Gabbasov
and only cases when 'dstring' fields are converted. Currently these cases are processing of Volume Identifier and Volume Set Identifier fields. The function is also renamed to udf_dstrCS0toUTF8 to distinctly indicate that it handles 'dstring' input. Signed-off-by: Andrew Gabbasov <andrew_gabba

[PATCH] udf: Fix conversion of 'dstring' fields to UTF8

2016-04-25 Thread Andrew Gabbasov
and only cases when 'dstring' fields are converted. Currently these cases are processing of Volume Identifier and Volume Set Identifier fields. The function is also renamed to udf_dstrCS0toUTF8 to distinctly indicate that it handles 'dstring' input. Signed-off-by: Andrew Gabbasov --- fs/udf/sup

[PATCH v2 2/7] udf: Check output buffer length when converting name to CS0

2015-12-24 Thread Andrew Gabbasov
than the length of input. And if the input name is long enough, the output length may exceed the allocated buffer length. All this means that conversion from UTF8 or NLS to CS0 requires checking of output length in order to stop when it exceeds the given output buffer size. Signed-off-by: Andrew

[PATCH v2 3/7] udf: Parameterize output length in udf_put_filename

2015-12-24 Thread Andrew Gabbasov
Make the desired output length a parameter rather than have it hard-coded to UDF_NAME_LEN. Although all call sites still have this length the same, this parameterization will make the function more universal and also consistent with udf_get_filename. Signed-off-by: Andrew Gabbasov --- fs/udf

[PATCH v2 5/7] udf: Adjust UDF_NAME_LEN to better reflect actual restrictions

2015-12-24 Thread Andrew Gabbasov
to have a separate constant for the maximum length of file name field in CS0 encoding in UDF File Ident structures. Also, remove the unused UDF_PATH_LEN constant. Signed-off-by: Andrew Gabbasov --- fs/udf/namei.c | 10 +- fs/udf/super.c | 2 +- fs/udf/udfdecl.h | 6 +++--- fs/udf

[PATCH v2 6/7] udf: Remove struct ustr as non-needed intermediate storage

2015-12-24 Thread Andrew Gabbasov
. Signed-off-by: Andrew Gabbasov --- fs/udf/super.c | 36 +- fs/udf/udfdecl.h | 13 ++--- fs/udf/unicode.c | 143 +-- 3 files changed, 59 insertions(+), 133 deletions(-) diff --git a/fs/udf/super.c b/fs/udf/super.c index a801721

[PATCH v2 7/7] udf: Merge linux specific translation into CS0 conversion function

2015-12-24 Thread Andrew Gabbasov
. The most efficient way to properly support multi-bytes characters is merging of translation operations directly into conversion function. This can help to avoid extra passes along the string or parsing the multi-bytes character back into unicode to find out it's length. Signed-off-by: Andrew

[PATCH v2 0/7] udf: rework name conversions to fix multi-bytes characters support

2015-12-24 Thread Andrew Gabbasov
ually just makes an unneeded extra copying of the buffer and does not have any other significant advantage; - it unifies UTF8 and NLS conversions support, since there is no much sense to separate these cases; - UDF_NAME_LEN constant adjusted to better reflect actual restrictions. Andrew Gabbasov

[PATCH v2 1/7] udf: Prevent buffer overrun with multi-byte characters

2015-12-24 Thread Andrew Gabbasov
structures, causing kernel crash. Adjust the output length checks in both functions to prevent buffer overruns in case of multi-bytes UTF8 or NLS characters. Signed-off-by: Andrew Gabbasov --- fs/udf/unicode.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/udf/unicode.c b

[PATCH v2 4/7] udf: Join functions for UTF8 and NLS conversions

2015-12-24 Thread Andrew Gabbasov
) locally in UDF code, so that they could be used even if NLS support is not enabled in the kernel configuration. Signed-off-by: Andrew Gabbasov --- fs/udf/unicode.c | 272 ++- 1 file changed, 88 insertions(+), 184 deletions(-) diff --git a/fs

[PATCH v2 7/7] udf: Merge linux specific translation into CS0 conversion function

2015-12-24 Thread Andrew Gabbasov
. The most efficient way to properly support multi-bytes characters is merging of translation operations directly into conversion function. This can help to avoid extra passes along the string or parsing the multi-bytes character back into unicode to find out it's length. Signed-off-by: Andrew

[PATCH v2 0/7] udf: rework name conversions to fix multi-bytes characters support

2015-12-24 Thread Andrew Gabbasov
ually just makes an unneeded extra copying of the buffer and does not have any other significant advantage; - it unifies UTF8 and NLS conversions support, since there is no much sense to separate these cases; - UDF_NAME_LEN constant adjusted to better reflect actual restrictions. Andrew Gabbasov

[PATCH v2 4/7] udf: Join functions for UTF8 and NLS conversions

2015-12-24 Thread Andrew Gabbasov
) locally in UDF code, so that they could be used even if NLS support is not enabled in the kernel configuration. Signed-off-by: Andrew Gabbasov <andrew_gabba...@mentor.com> --- fs/udf/unicode.c | 272 ++- 1 file changed, 88 insertions(+

[PATCH v2 1/7] udf: Prevent buffer overrun with multi-byte characters

2015-12-24 Thread Andrew Gabbasov
structures, causing kernel crash. Adjust the output length checks in both functions to prevent buffer overruns in case of multi-bytes UTF8 or NLS characters. Signed-off-by: Andrew Gabbasov <andrew_gabba...@mentor.com> --- fs/udf/unicode.c | 6 +- 1 file changed, 5 insertions(+), 1 de

[PATCH v2 6/7] udf: Remove struct ustr as non-needed intermediate storage

2015-12-24 Thread Andrew Gabbasov
. Signed-off-by: Andrew Gabbasov <andrew_gabba...@mentor.com> --- fs/udf/super.c | 36 +- fs/udf/udfdecl.h | 13 ++--- fs/udf/unicode.c | 143 +-- 3 files changed, 59 insertions(+), 133 deletions(-) diff --git a/fs/udf/super.c b/

[PATCH v2 5/7] udf: Adjust UDF_NAME_LEN to better reflect actual restrictions

2015-12-24 Thread Andrew Gabbasov
to have a separate constant for the maximum length of file name field in CS0 encoding in UDF File Ident structures. Also, remove the unused UDF_PATH_LEN constant. Signed-off-by: Andrew Gabbasov <andrew_gabba...@mentor.com> --- fs/udf/namei.c | 10 +- fs/udf/super.c | 2 +-

[PATCH v2 2/7] udf: Check output buffer length when converting name to CS0

2015-12-24 Thread Andrew Gabbasov
than the length of input. And if the input name is long enough, the output length may exceed the allocated buffer length. All this means that conversion from UTF8 or NLS to CS0 requires checking of output length in order to stop when it exceeds the given output buffer size. Signed-off-by: Andrew

[PATCH v2 3/7] udf: Parameterize output length in udf_put_filename

2015-12-24 Thread Andrew Gabbasov
Make the desired output length a parameter rather than have it hard-coded to UDF_NAME_LEN. Although all call sites still have this length the same, this parameterization will make the function more universal and also consistent with udf_get_filename. Signed-off-by: Andrew Gabbasov <andrew_ga

RE: [PATCH] udf: rework name conversions to fix multi-bytes characters support

2015-12-18 Thread Andrew Gabbasov
port > > On Fri 11-12-15 05:44:32, Andrew Gabbasov wrote: > > Current implementation has several issues in unicode.c, mostly related > > to handling multi-bytes characters in file names: > > Thanks for looking into these problems! Did you find them by code > inspectio

RE: [PATCH] udf: rework name conversions to fix multi-bytes characters support

2015-12-18 Thread Andrew Gabbasov
port > > On Fri 11-12-15 05:44:32, Andrew Gabbasov wrote: > > Current implementation has several issues in unicode.c, mostly related > > to handling multi-bytes characters in file names: > > Thanks for looking into these problems! Did you find them by code > inspectio

[PATCH] udf: rework name conversions to fix multi-bytes characters support

2015-12-11 Thread Andrew Gabbasov
ort, since there is no much sense to separate these cases; - UDF_NAME_LEN constant adjusted to better reflect actual restrictions. Signed-off-by: Andrew Gabbasov --- fs/udf/namei.c | 16 +- fs/udf/super.c | 38 ++-- fs/udf/udfdecl.h | 21 +- fs/udf/unico

[PATCH] udf: rework name conversions to fix multi-bytes characters support

2015-12-11 Thread Andrew Gabbasov
ort, since there is no much sense to separate these cases; - UDF_NAME_LEN constant adjusted to better reflect actual restrictions. Signed-off-by: Andrew Gabbasov <andrew_gabba...@mentor.com> --- fs/udf/namei.c | 16 +- fs/udf/super.c | 38 ++-- fs/udf/udfdecl.h | 21 +- fs/udf

[PATCH] spi: Fix per-page mapping of unaligned vmalloc-ed buffer

2015-06-25 Thread Andrew Gabbasov
-by: Andrew Gabbasov --- drivers/spi/spi.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 50910d8..14016dc 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -477,7 +477,9 @@ static int spi_map_buf(struct spi_master

[PATCH] spi: Fix per-page mapping of unaligned vmalloc-ed buffer

2015-06-25 Thread Andrew Gabbasov
-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/spi/spi.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 50910d8..14016dc 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -477,7 +477,9 @@ static int