Re: [PATCH bpf-next v4 2/4] bpf: Improve error reporting for freplace attachment failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 24, 2025 at 7:34 AM Leon Hwang <leon.hwang@xxxxxxxxx> wrote:
>
> @@ -3539,7 +3540,7 @@ static int bpf_tracing_prog_attach(struct bpf_prog *prog,
>                  */
>                 struct bpf_attach_target_info tgt_info = {};
>
> -               err = bpf_check_attach_target(NULL, prog, tgt_prog, btf_id,
> +               err = bpf_check_attach_target(log, prog, tgt_prog, btf_id,
>                                               &tgt_info);

I still don't like this uapi addition.

It only helps a rare corner case of freplace usage:
                /* If there is no saved target, or the specified target is
                 * different from the destination specified at load time, we
                 * need a new trampoline and a check for compatibility
                 */

If it was useful in more than one case we could consider it,
but uapi addition for a single rare use, is imo wrong trade off.

pw-bot: cr





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux