On Mon, Oct 09, 2023 at 12:24:27PM -0600, Gustavo A. R. Silva wrote:
> drivers/iommu/virtio-iommu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
> -Original Message-
> From: Intel-wired-lan On Behalf Of
> Justin Stitt
> Sent: Wednesday, October 11, 2023 3:57 AM
> To: Brandeburg, Jesse ; Nguyen, Anthony L
> ; David S. Miller ; Eric
> Dumazet ; Jakub Kicinski ; Paolo Abeni
>
> Cc: net...@vger.kernel.org; Justin Stitt ;
> intel-
> -Original Message-
> From: Intel-wired-lan On Behalf Of
> Justin Stitt
> Sent: Wednesday, October 11, 2023 3:57 AM
> To: Brandeburg, Jesse ; Nguyen, Anthony L
> ; David S. Miller ; Eric
> Dumazet ; Jakub Kicinski ; Paolo Abeni
>
> Cc: net...@vger.kernel.org; Justin Stitt ;
> intel-
> -Original Message-
> From: Intel-wired-lan On Behalf Of
> Justin Stitt
> Sent: Wednesday, October 11, 2023 3:57 AM
> To: Brandeburg, Jesse ; Nguyen, Anthony L
> ; David S. Miller ; Eric
> Dumazet ; Jakub Kicinski ; Paolo Abeni
>
> Cc: net...@vger.kernel.org; Justin Stitt ;
> intel-
> -Original Message-
> From: Intel-wired-lan On Behalf Of
> Justin Stitt
> Sent: Wednesday, October 11, 2023 3:57 AM
> To: Brandeburg, Jesse ; Nguyen, Anthony L
> ; David S. Miller ; Eric
> Dumazet ; Jakub Kicinski ; Paolo Abeni
>
> Cc: net...@vger.kernel.org; Justin Stitt ;
> intel-
On Fri, 2023-10-06 at 20:17:34 UTC, 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 Fri, 2023-10-06 at 20:17:28 UTC, 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 Sun, 2023-10-01 at 07:44:04 UTC, Christophe JAILLET wrote:
> Use struct_size() instead of hand writing it.
> This is less verbose and more robust.
>
> While at it, prepare for the coming implementation by GCC and Clang of the
> __counted_by attribute. Flexible array members annotated with __cou
On Mon, Oct 16, 2023 at 12:01:31PM +0800, Kai-Heng Feng wrote:
> When inserting an SD7.0 card to Realtek card reader, it can trigger PCI
> slot Link down and causes the following error:
Why does *inserting* a card cause a Link Down?
> [ 63.898861] pcieport :00:1c.0: pciehp: Slot(8): Link D
Introduce kmemdup_array() API to duplicate `n` number of elements
from a given array. This internally uses kmemdup to allocate and duplicate
the `src` array.
Signed-off-by: Kartik
---
v4 -> v5:
* Simplify the implementation by just returning kmemdup(size_mul).
---
include/linux/string.h
This series of patches add ACPI support for Tegra194 and Tegra234 in
Tegra fuse and apbmisc drivers. It also adds support for Tegra241
which uses ACPI boot.
Kartik (8):
mm/util: Introduce kmemdup_array()
soc/tegra: fuse: Use dev_err_probe for probe failures
soc/tegra: fuse: Refactor resource
Currently, in tegra_fuse_probe() if clock/reset get fails, then the
driver prints an error if the error is not caused by -EPROBE_DEFER.
This can be improved by using dev_err_probe() instead.
So, return dev_err_probe() if clock/reset get fails.
Signed-off-by: Kartik
---
drivers/soc/tegra/fuse/fu
To prepare for adding ACPI support to the tegra-apbmisc driver,
relocate the code responsible for mapping memory resources from
the function ‘tegra_init_apbmisc’ to the function
‘tegra_init_apbmisc_resources.’ This adjustment will allow the
code to be shared between ‘tegra_init_apbmisc’ and the upc
In preparation to ACPI support in Tegra fuse driver add function
tegra_acpi_init_apbmisc() to initialize tegra-apbmisc driver.
Also, document the reason of calling tegra_init_apbmisc() at early init.
Note that function tegra_acpi_init_apbmisc() is not placed in the __init
section, because it will
Add helper function tegra_fuse_add_lookups() to register Tegra fuse
nvmem lookups. So, this can be shared between tegra_fuse_init() and
ACPI probe, which is to be introduced later.
Use kmemdup_array to duplicate fuse->soc->lookups.
Signed-off-by: Kartik
---
v3 -> v4:
* Use kmemdup_array
Add helper function tegra_fuse_print_sku_info() to print Tegra SKU
information. So, it can be shared between tegra_fuse_init() and
ACPI probe which is to be introduced later.
Signed-off-by: Kartik
---
v1 -> v2:
* Renamed tegra_fuse_pr_sku_info() as
tegra_fuse_print_sku_info().
-
Add support for Tegra241 which use ACPI boot.
Signed-off-by: Kartik
---
v1 -> v2:
* Removed few entries from tegra241_fuse_soc which were
initilized as NULL or 0.
---
drivers/soc/tegra/Kconfig | 5 +
drivers/soc/tegra/fuse/fuse-tegra.c| 5 +
drivers/s
Add ACPI support for Tegra194 & Tegra243 SoC's. This requires
following modifications to the probe when ACPI boot is used:
- Initialize soc data.
- Add nvmem lookups.
- Register soc device.
- use devm_clk_get_optional() instead of devm_clk_get() to get
fuse->clk, as fuse clocks are not requi
On Mon, 2023-10-16 at 07:41 +0200, Christophe JAILLET wrote:
> > + /*
> > +* Get required memory resources.
> > +*
> > +* resources[0]: apbmisc.
> > +* resources[1]: straps.
> > +*/
> > + resource_list_for_each_entry_safe(rentry, tmp, &resource_list) {
>
> Nit: Is the 'safe
On Mon, Oct 16, 2023 at 03:44:35PM +0530, Kartik wrote:
> Add ACPI support for Tegra194 & Tegra243 SoC's. This requires
> following modifications to the probe when ACPI boot is used:
> - Initialize soc data.
> - Add nvmem lookups.
> - Register soc device.
> - use devm_clk_get_optional() instead
On Mon, 09 Oct 2023 15:24:23 -0600, Gustavo A. R. Silva 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 index
On Sat, Oct 14, 2023 at 7:47 PM Kees Cook wrote:
>
> On Thu, Oct 12, 2023 at 07:44:29PM +, 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
On Mon, Oct 09, 2023 at 03:30:17PM -0600, Gustavo A. R. Silva 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
On Thu, Oct 12, 2023 at 09:43:02PM +, 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 new_bus->id to be NUL-terminated but not NUL-padded based on
>
On Mon, Oct 16, 2023 at 11:04:04AM +0530, Kartik wrote:
> Introduce kmemdup_array() API to duplicate `n` number of elements
> from a given array. This internally uses kmemdup to allocate and duplicate
> the `src` array.
>
> Signed-off-by: Kartik
Acked-by: Kees Cook
--
Kees Cook
;,
+ sizeof(priv->firmware_id));
}
err = request_firmware(&fw_entry,
priv->firmware_id, priv->sys_dev);
if (err != 0) {
---
base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2
change-id: 20231016-strncpy-drivers-net-wireless-atmel-atmel-c-7ca951cf7cfa
Best regards,
--
Justin Stitt
- strncpy(ifp->ndev->name, name, sizeof(ifp->ndev->name) - 1);
+ strscpy(ifp->ndev->name, name, sizeof(ifp->ndev->name));
err = brcmf_net_attach(ifp, true);
if (err) {
bphy_err(drvr, "Registering netdevice failed\n");
---
b
goto fail;
> }
>
> - strncpy(ifp->ndev->name, name, sizeof(ifp->ndev->name) - 1);
> + strscpy(ifp->ndev->name, name, sizeof(ifp->ndev->name));
> err = brcmf_net_attach(ifp, true);
> if (err) {
> bphy_err(d
This small series aims to fix an undefined behavior bug in
`struct visconti_pll_provider` and add bounds-checking
coverage at run-time for flexible-array member `hws`
in `struct clk_hw_onecell_data` when accessed throught
`struct visconti_pll_provider`.
Changes in v2:
- Mention -Wflex-array-membe
`struct clk_hw_onecell_data` is a flexible structure, which means that
it contains flexible-array member at the bottom, in this case array
`hws`:
include/linux/clk-provider.h:
1380 struct clk_hw_onecell_data {
1381 unsigned int num;
1382 struct clk_hw *hws[] __counted_by(num);
1383
In order to gain the bounds-checking coverage that __counted_by provides
to flexible-array members at run-time via CONFIG_UBSAN_BOUNDS (for array
indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions),
we must make sure that the counter member, in this particular case `num`,
is up
This series aims to fix an undefined behavior bug in
`struct stratix10_clock_data` and add bounds-checking
coverage at run-time for flexible-array member `hws`
in `struct clk_hw_onecell_data` when accessed throught
`struct stratix10_clock_data`.
Changes in v2:
- Mention -Wflex-array-member-not-at
`struct clk_hw_onecell_data` is a flexible structure, which means that
it contains flexible-array member at the bottom, in this case array
`hws`:
include/linux/clk-provider.h:
1380 struct clk_hw_onecell_data {
1381 unsigned int num;
1382 struct clk_hw *hws[] __counted_by(num);
1383
In order to gain the bounds-checking coverage that __counted_by provides
to flexible-array members at run-time via CONFIG_UBSAN_BOUNDS (for array
indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions),
we must make sure that the counter member, in this case `num`, is updated
befor
rg/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Justin Stitt
---
Changes in v2:
- add other strncpy replacements
- Link to v1:
https://lore.kernel.org/r/20231016-strncpy-drivers-net-wireless-broadcom-brcm80
On Thu, 12 Oct 2023 20:53:30 + 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.
This driver no longer exists. Praise be.
--
pw-bot: reject
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski :
On Thu, 12 Oct 2023 21:05:40 + you 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.
>
> Conside
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski :
On Thu, 12 Oct 2023 22:27:52 + you 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.
>
> ethtool
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski :
On Thu, 12 Oct 2023 22:33:34 + you 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.
>
> Other i
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski :
On Thu, 12 Oct 2023 22:30:54 + you 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.
>
> Other i
On Mon, Oct 16, 2023 at 5:32 PM Lukas Wunner wrote:
>
> On Mon, Oct 16, 2023 at 12:01:31PM +0800, Kai-Heng Feng wrote:
> > When inserting an SD7.0 card to Realtek card reader, it can trigger PCI
> > slot Link down and causes the following error:
>
> Why does *inserting* a card cause a Link Down?
This series of patches add ACPI support for Tegra194 and Tegra234 in
Tegra fuse and apbmisc drivers. It also adds support for Tegra241
which uses ACPI boot.
Kartik (8):
mm/util: Introduce kmemdup_array()
soc/tegra: fuse: Use dev_err_probe for probe failures
soc/tegra: fuse: Refactor resource
Introduce kmemdup_array() API to duplicate `n` number of elements
from a given array. This internally uses kmemdup to allocate and duplicate
the `src` array.
Signed-off-by: Kartik
Acked-by: Kees Cook
---
v4 -> v5:
* Simplify the implementation by just returning kmemdup(size_mul).
---
in
Currently, in tegra_fuse_probe() if clock/reset get fails, then the
driver prints an error if the error is not caused by -EPROBE_DEFER.
This can be improved by using dev_err_probe() instead.
So, return dev_err_probe() if clock/reset get fails.
Signed-off-by: Kartik
---
drivers/soc/tegra/fuse/fu
To prepare for adding ACPI support to the tegra-apbmisc driver,
relocate the code responsible for mapping memory resources from
the function ‘tegra_init_apbmisc’ to the function
‘tegra_init_apbmisc_resources.’ This adjustment will allow the
code to be shared between ‘tegra_init_apbmisc’ and the upc
In preparation to ACPI support in Tegra fuse driver add function
tegra_acpi_init_apbmisc() to initialize tegra-apbmisc driver.
Also, document the reason of calling tegra_init_apbmisc() at early init.
Note that function tegra_acpi_init_apbmisc() is not placed in the __init
section, because it will
Add helper function tegra_fuse_add_lookups() to register Tegra fuse
nvmem lookups. So, this can be shared between tegra_fuse_init() and
ACPI probe, which is to be introduced later.
Use kmemdup_array to duplicate fuse->soc->lookups.
Signed-off-by: Kartik
---
v3 -> v4:
* Use kmemdup_array
Add helper function tegra_fuse_print_sku_info() to print Tegra SKU
information. So, it can be shared between tegra_fuse_init() and
ACPI probe which is to be introduced later.
Signed-off-by: Kartik
---
v1 -> v2:
* Renamed tegra_fuse_pr_sku_info() as
tegra_fuse_print_sku_info().
-
Add ACPI support for Tegra194 & Tegra243 SoC's. This requires
following modifications to the probe when ACPI boot is used:
- Initialize soc data.
- Add nvmem lookups.
- Register soc device.
- use devm_clk_get_optional() instead of devm_clk_get() to get
fuse->clk, as fuse clocks are not requi
Add support for Tegra241 which use ACPI boot.
Signed-off-by: Kartik
---
v1 -> v2:
* Removed few entries from tegra241_fuse_soc which were
initilized as NULL or 0.
---
drivers/soc/tegra/Kconfig | 5 +
drivers/soc/tegra/fuse/fuse-tegra.c| 5 +
drivers/s
> -Original Message-
> From: Kai-Heng Feng
>
> On Mon, Oct 16, 2023 at 5:32 PM Lukas Wunner wrote:
> >
> > On Mon, Oct 16, 2023 at 12:01:31PM +0800, Kai-Heng Feng wrote:
> > > When inserting an SD7.0 card to Realtek card reader, it can trigger
> > > PCI slot Link down and causes the fo
51 matches
Mail list logo