nated-strings
[1]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Justin Stitt
---
Changes in v5:
- fix indentation (thanks Kees)
- Link to v4:
https://lore.kernel.org/r/20230925-strncpy-drivers-hwmon-acpi_power_meter-c-v4-1-3bac7534f...@google.com
Ch
Hi Kees,
On Mon, Sep 25, 2023 at 10:20:41AM -0700, Kees Cook wrote:
> Since __counted_by annotations may also require that code be changed to
> get initialization ordering correct, let's get an extra group of eyes on
> code that is working on these annotations.
>
> Signed-off-by: Kees Cook
> ---
On Tue, Sep 26, 2023 at 2:00 AM Kees Cook wrote:
>
> On Mon, Sep 25, 2023 at 04:31:05AM +, Justin Stitt wrote:
> > This code is doing more work than it needs to.
> >
> > Before handing off `val_str` to `kstrtouint()` we are eagerly removing
> > any trailing newline which requires copying `buf`
On Fri, 22 Sep 2023 10:50:23 -0700, Kees Cook wrote:
> Prepare for the coming implementation by GCC and Clang of the __counted_by
> attribute. Flexible array members annotated with __counted_by can have
> their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
> (for array inde
On Fri, 22 Sep 2023 10:50:19 -0700, Kees Cook wrote:
> Prepare for the coming implementation by GCC and Clang of the __counted_by
> attribute. Flexible array members annotated with __counted_by can have
> their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
> (for array inde
On Fri, 22 Sep 2023 10:50:15 -0700, Kees Cook wrote:
> Prepare for the coming implementation by GCC and Clang of the __counted_by
> attribute. Flexible array members annotated with __counted_by can have
> their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
> (for array inde
On Fri, 22 Sep 2023 10:50:11 -0700, Kees Cook wrote:
> Prepare for the coming implementation by GCC and Clang of the __counted_by
> attribute. Flexible array members annotated with __counted_by can have
> their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
> (for array inde
On Thu, 21 Sep 2023 03:51:04 +, Justin Stitt wrote:
> `strncpy` is deprecated for use on NUL-terminated destination strings [1].
>
> We should prefer more robust and less ambiguous string interfaces.
>
> We expect adap->name to be NUL-terminated based on i2c_adapter name use:
> | dev_dbg(&a
On Mon, Sep 25, 2023 at 09:49:17AM +, Justin Stitt wrote:
> `strncpy` is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> There are three such strncpy uses that this patch addresses:
>
> The res
On Mon, Sep 25, 2023 at 03:43:23AM +, Justin Stitt wrote:
> `strncpy` is deprecated for use on NUL-terminated destination strings [1].
>
> Let's refactor this kcalloc() + strncpy() into a kmemdup_nul() which has
> more obvious behavior and is less error prone.
>
> Link:
> https://www.kernel.
On Mon, Sep 25, 2023 at 04:31:05AM +, Justin Stitt wrote:
> This code is doing more work than it needs to.
>
> Before handing off `val_str` to `kstrtouint()` we are eagerly removing
> any trailing newline which requires copying `buf`, validating it's
> length and checking/replacing any potenti
On 9/25/23 11:32, Kees Cook wrote:
It's an oversight to not have already listed Gustavo here. Add him as a
Reviewer.
Cc: Gustavo A. R. Silva
Signed-off-by: Kees Cook
Accepted-by: Gustavo A. R. Silva ;P
--
Gustavo
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/M
It's an oversight to not have already listed Gustavo here. Add him as a
Reviewer.
Cc: Gustavo A. R. Silva
Signed-off-by: Kees Cook
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 741285b8246e..5f18ed0fbd42 100644
--- a/MAINTAINERS
+++ b/MAINTA
Since __counted_by annotations may also require that code be changed to
get initialization ordering correct, let's get an extra group of eyes on
code that is working on these annotations.
Signed-off-by: Kees Cook
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/M
Seems like the address value of the reg property was mistyped.
Update reg to 0x9ca0 to match node's definition.
Fixes: f5a731f0787f ("arm64: dts: ti: Add k3-am625-beagleplay")
Signed-off-by: Wadim Egorov
Reviewed-by: Nishanth Menon
---
v2:
- Add Fixes: f5a731f0787f ("arm64: dts: ti: Add k3
On 16:07-20230925, Wadim Egorov wrote:
> Seems like the address value of the reg property was mistyped.
> Update reg to 0x9ca0 to match node's definition.
>
> Signed-off-by: Wadim Egorov
Missing:
Fixes: f5a731f0787f ("arm64: dts: ti: Add k3-am625-beagleplay"
Seems like the address value of the reg property was mistyped.
Update reg to 0x9ca0 to match node's definition.
Signed-off-by: Wadim Egorov
---
arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/ti/k3-am625-b
On Fri, 2023-09-22 at 10:51 -0700, Kees Cook wrote:
> Prepare for the coming implementation by GCC and Clang of the __counted_by
> attribute. Flexible array members annotated with __counted_by can have
> their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
> (for array indexin
Hello:
This patch was applied to chrome-platform/linux.git (for-next)
by Tzung-Bi Shih :
On Fri, 22 Sep 2023 10:51:47 -0700 you wrote:
> Prepare for the coming implementation by GCC and Clang of the __counted_by
> attribute. Flexible array members annotated with __counted_by can have
> their acce
0;
if (namelen && mddev->metadata_type[namelen-1] == '\n')
mddev->metadata_type[--namelen] = 0;
---
base-commit: 6465e260f48790807eef06b583b38ca9789b6072
change-id: 20230925-strncpy-drivers-md-md-c-e775504361ab
Best regards,
--
Justin Stitt
On Fri, Sep 22, 2023 at 7:52 PM Kees Cook wrote:
>
> Prepare for the coming implementation by GCC and Clang of the __counted_by
> attribute. Flexible array members annotated with __counted_by can have
> their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
> (for array indexin
On Fri, Sep 22, 2023 at 7:51 PM Kees Cook wrote:
>
> Prepare for the coming implementation by GCC and Clang of the __counted_by
> attribute. Flexible array members annotated with __counted_by can have
> their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
> (for array indexin
On 22. 09. 23, 19:52, Kees Cook wrote:
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTI
On Fri 22-09-23 10:53:28, Kees Cook wrote:
> Prepare for the coming implementation by GCC and Clang of the __counted_by
> attribute. Flexible array members annotated with __counted_by can have
> their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
> (for array indexing) and CO
On 2023/09/22 19:52, Kees Cook wrote:
> Prepare for the coming implementation by GCC and Clang of the __counted_by
> attribute. Flexible array members annotated with __counted_by can have
> their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
> (for array indexing) and CONFIG_
25 matches
Mail list logo