[PATCH v2 0/2] xen/common: llc-coloring parser fixes

Mykola Kvach posted 2 patches 2 days, 1 hour ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.1779388510.git.mykola._5Fkvach@epam.com
xen/common/llc-coloring.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
[PATCH v2 0/2] xen/common: llc-coloring parser fixes
Posted by Mykola Kvach 2 days, 1 hour ago
From: Mykola Kvach <mykola_kvach@epam.com>

Hi all,

This small series fixes two issues in parse_color_config().

The first patch makes parse failures leave the caller-visible color count
at zero. This prevents a rejected command-line value from leaving a
partially parsed configuration behind for later init paths to consume.

The second patch rejects empty color tokens. Previously, delimiters in
places where a color value was expected could be interpreted as color 0,
because simple_strtoul() returns zero without advancing the input pointer.
The patch checks that each parsed color value consumed input. It also
fixes the DT color parsing error message by adding the missing newline
and including the domain ID.

Changes in v2:
- Clarify the first commit message.
- Include the domain ID in the DT color parsing error message.
- Add Reviewed-by tags.

Mykola Kvach (2):
  xen/common: llc-coloring: clear color count on parse failure
  xen/common: llc-coloring: reject empty color tokens

 xen/common/llc-coloring.c | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

-- 
2.43.0