• Daniel Borkmann's avatar
    bpf: Remove superfluous aux sanitation on subprog rejection · 59089a18
    Daniel Borkmann authored
    Follow-up to fe9a5ca7 ("bpf: Do not mark insn as seen under speculative
    path verification"). The sanitize_insn_aux_data() helper does not serve a
    particular purpose in today's code. The original intention for the helper
    was that if function-by-function verification fails, a given program would
    be cleared from temporary insn_aux_data[], and then its verification would
    be re-attempted in the context of the main program a second time.
    
    However, a failure in do_check_subprogs() will skip do_check_main() and
    propagate the error to the user instead, thus such situation can never occur.
    Given its interaction is not compatible to the Spectre v1 mitigation (due to
    comparing aux->seen with env->pass_cnt), just remove sanitize_insn_aux_data()
    to avoid future bugs in this area.
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
    59089a18
verifier.c 385 KB