.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
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
. 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 "
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
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
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/
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
+++
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
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
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 +
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
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
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
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
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
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
.
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
.
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
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
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
) 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
.
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
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
) 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(+
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
.
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/
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 +-
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
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
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
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
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
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
-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
-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
35 matches
Mail list logo