On Wed, Oct 04, 2023 at 08:07:55PM -0700, Kees Cook wrote:
> On Thu, Oct 05, 2023 at 12:30:18AM +, 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
> > interfaces.
> >
> > Let's opt
On Thu, Oct 05, 2023 at 01:29:45AM +, 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.
>
> We expect netdev->name to be NUL-terminated based on its use with format
On Thu, Oct 05, 2023 at 01:06:26AM +, 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.
>
> A suitable replacement is `strscpy` [2] due to the fact that it
> guarant
On Thu, Oct 05, 2023 at 12:56:08AM +, 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.
>
> NUL-padding is not necessary as host_info is initialized to
> `ena_dev->h
On Thu, Oct 05, 2023 at 12:30:18AM +, 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
> interfaces.
>
> Let's opt for memcpy as we are copying strings into slices of length
> `ETH_GSTR
On Thu, Oct 05, 2023 at 12:05:35AM +, 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.
>
> NUL-padding is not required since card is already zero-initialized:
> |
Add missing sof header files for ASoC.
Suggested-by: Mark Brown
Link:
https://lore.kernel.org/lkml/f258a7e6-0728-4f55-a71a-6e99113ce...@sirena.org.uk
Signed-off-by: Kees Cook
---
MAINTAINERS | 2 ++
1 file changed, 2 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 585a13b9b52a..811
`strncpy` is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.
We expect netdev->name to be NUL-terminated based on its use with format
strings and dev_info():
| dev_info(&adapter->pdev->dev,
|
`strncpy` is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.
A suitable replacement is `strscpy` [2] due to the fact that it
guarantees NUL-termination on the destination buffer without
unnecessarily NUL-pa
`strncpy` is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.
NUL-padding is not necessary as host_info is initialized to
`ena_dev->host_attr.host_info` which is ultimately zero-initialized via
alloc_etherde
`strncpy` is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous
interfaces.
Let's opt for memcpy as we are copying strings into slices of length
`ETH_GSTRING_LEN` within the `data` buffer. Other similar get_strings()
implementat
sizeof(card->led_chip.name));
card->i2c_bit = peak_pciec_i2c_bit_ops;
---
base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2
change-id: 20231004-strncpy-drivers-net-can-sja1000-peak_pci-c-9c2e5e32be83
Best regards,
--
Justin Stitt
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski :
On Fri, 29 Sep 2023 11:11:44 -0700 you wrote:
> Hi,
>
> This annotates several chelsio structures with the coming __counted_by
> attribute for bounds checking of flexible arrays at run-time. For more
> details,
> s
On Wed, Oct 04, 2023 at 12:41:14PM -0700, Kees Cook wrote:
> >The SOF header is also missing from the entry for SOF.
> Ah, right! Can you take this and tweak it with the missing entries, or should
> I send a v2?
Could you send an incremental patch please? It's already in my CI as
is.
signatu
On 10/4/23 21:34, Kees Cook wrote:
Make sure a few other paths are correctly sent to the ASoC maintainers.
Link: https://lore.kernel.org/lkml/63dd3676.170a0220.1f1b2.3...@mx.google.com/
Cc: Mark Brown
Signed-off-by: Kees Cook
Acked-by: Gustavo A. R. Silva
Thanks!
--
Gustavo
---
MAIN
On October 4, 2023 12:40:00 PM PDT, Mark Brown wrote:
>On Wed, Oct 04, 2023 at 12:34:45PM -0700, Kees Cook wrote:
>
>> +++ b/MAINTAINERS
>> @@ -20116,6 +20116,8 @@ F: Documentation/devicetree/bindings/sound/
>> F: Documentation/sound/soc/
>> F: include/dt-bindings/sound/
>> F: include/soun
On Wed, Oct 04, 2023 at 12:34:45PM -0700, Kees Cook wrote:
> +++ b/MAINTAINERS
> @@ -20116,6 +20116,8 @@ F:Documentation/devicetree/bindings/sound/
> F: Documentation/sound/soc/
> F: include/dt-bindings/sound/
> F: include/sound/soc*
> +F: include/sound/sof/
> +F: include/uapi/sou
Make sure a few other paths are correctly sent to the ASoC maintainers.
Link: https://lore.kernel.org/lkml/63dd3676.170a0220.1f1b2.3...@mx.google.com/
Cc: Mark Brown
Signed-off-by: Kees Cook
---
MAINTAINERS | 2 ++
1 file changed, 2 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 5f
On Wed, Oct 04, 2023 at 02:52:47PM -0400, Jeff Layton wrote:
> Convert to using the new inode timestamp accessor functions.
>
> Signed-off-by: Jeff Layton
Acked-by: Kees Cook
--
Kees Cook
Convert to using the new inode timestamp accessor functions.
Signed-off-by: Jeff Layton
---
fs/pstore/inode.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index 585360706b33..d41c20d1b5e8 100644
--- a/fs/pstore/inode.c
+++ b/fs/ps
On Tue, Oct 03, 2023 at 04:17:30PM -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 via CONFIG_UBSAN_BOUNDS (for
> array indexing)
On Tue, Oct 03, 2023 at 04:21:05PM -0700, Justin Stitt wrote:
> On Tue, Oct 3, 2023 at 4:17 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-ch
tree/branch:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
branch HEAD: 33b64befb1a28bca3f5a9ed9807d2f87e976c63a Add linux-next specific
files for 20231004
Error/Warning reports:
https://lore.kernel.org/oe-kbuild-all/202309122047.cri9yjrq-...@intel.com
https
On Tue, 03 Oct 2023 16:28:53 -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 via CONFIG_UBSAN_BOUNDS (for
> array indexing) and C
On Wed, Oct 4, 2023 at 9:19 AM Gustavo A. R. Silva
wrote:
>
> commit d61491a51f7e ("net/sched: cls_u32: Replace one-element array
> with flexible-array member") incorrecly replaced an instance of
> `sizeof(*tp_c)` with `struct_size(tp_c, hlist->ht, 1)`. This results
> in a an over-allocation of 8
On Thu, 28 Sep 2023 16:43:42 -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 via CONFIG_UBSAN_BOUNDS (for
> array indexing) and
On Tue, 03 Oct 2023 16:27:56 -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 via CONFIG_UBSAN_BOUNDS (for
> array indexing) and
commit d61491a51f7e ("net/sched: cls_u32: Replace one-element array
with flexible-array member") incorrecly replaced an instance of
`sizeof(*tp_c)` with `struct_size(tp_c, hlist->ht, 1)`. This results
in a an over-allocation of 8 bytes.
This change is wrong because `hlist` in `struct tc_u_common`
On Wed, Oct 4, 2023 at 2:39 AM Kees Cook wrote:
>
> On Tue, Oct 03, 2023 at 04:01:42PM +0300, Andy Shevchenko wrote:
> > The lib/cmdline.c is basically a set of some small string parsers
> > which are wide used in the kernel. Their prototypes belong to the
> > string.h rather then kernel.h.
> >
>
* Justin Stitt wrote:
> strncpy works perfectly here in all cases, however, it is deprecated and
> as such we should prefer more robust and less ambiguous string apis.
>
> Let's use `strtomem_pad` as this matches the functionality of `strncpy`
> and is _not_ deprecated.
>
> Link:
> https://w
30 matches
Mail list logo