Re: [PATCH bpf-next v4 2/4] bpftool: btf: Validate root_type_ids early

From: Quentin Monnet
Date: Fri Dec 13 2024 - 10:16:11 EST


2024-12-12 18:24 UTC-0700 ~ Daniel Xu <dxu@xxxxxxxxx>
> Handle invalid root_type_ids early, as an invalid ID will cause dumpers
> to half-emit valid boilerplate and then bail with an unclean exit. This
> is ugly and possibly confusing for users, so preemptively handle the
> common error case before any dumping begins.
>
> Signed-off-by: Daniel Xu <dxu@xxxxxxxxx>


Reviewed-by: Quentin Monnet <qmo@xxxxxxxxxx>