Re: [PATCH] ACPI: NFIT: limit string attribute write

2023-07-11 Thread Ben Dooks
On 11/07/2023 10:22, Ben Dooks wrote: If we're writing what could be an arbitrary sized string into an attribute we should probably use sysfs_emit() just to be safe. Most of the other attriubtes are some sort of integer so unlikely to be an issue so not altered at this time. Signed-off-by: Ben

[PATCH] ACPI: NFIT: limit string attribute write

2023-07-11 Thread Ben Dooks
If we're writing what could be an arbitrary sized string into an attribute we should probably use sysfs_emit() just to be safe. Most of the other attriubtes are some sort of integer so unlikely to be an issue so not altered at this time. Signed-off-by: Ben Dooks --- v2: - use sysfs_emit()

Re: [PATCH] ACPI: NFIT: limit string attribute write

2023-07-11 Thread Ben Dooks
On 05/07/2023 19:34, Dave Jiang wrote: On 7/4/23 01:17, Ben Dooks wrote: If we're writing what could be an arbitrary sized string into an attribute we should probably use snprintf() just to be safe. Most of the other attriubtes are some sort of integer so unlikely to be an issue so not

Re: [PATCH] ACPI: NFIT: limit string attribute write

2023-07-05 Thread Dave Jiang
On 7/4/23 01:17, Ben Dooks wrote: If we're writing what could be an arbitrary sized string into an attribute we should probably use snprintf() just to be safe. Most of the other attriubtes are some sort of integer so unlikely to be an issue so not altered at this time. Signed-off-by: Ben

[PATCH] ACPI: NFIT: limit string attribute write

2023-07-04 Thread Ben Dooks
If we're writing what could be an arbitrary sized string into an attribute we should probably use snprintf() just to be safe. Most of the other attriubtes are some sort of integer so unlikely to be an issue so not altered at this time. Signed-off-by: Ben Dooks --- drivers/acpi/nfit/core.c | 2