Re: [PATCH bpf-next] bpf: emit source code file name and line number in verifier log

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

 



On Mon, Feb 12, 2024 at 12:05 PM Alexei Starovoitov
<alexei.starovoitov@xxxxxxxxx> wrote:
>
> On Mon, Feb 12, 2024 at 11:02 AM Andrii Nakryiko
> <andrii.nakryiko@xxxxxxxxx> wrote:
> >
> > >
> > > Can't say that either is super nice and clean. But when I tried e)
> > > proposal, I realized that semicolon separators are used also for
> > > register state (next to instruction dump) and they sort of overlap
> > > visually more and make it a bit harder to read log (subjective IMO, of
> > > course).
> > >
> > > But let me know if you still prefer e) and I'll send v2 with it.
> > >
> >
> > Goodness, gmail made everything even worse. See [0] for visual comparison
> >
> >   [0] https://gist.github.com/anakryiko/f5e9217f277b0f8cd156ceb6cb641268
>
>
> Two ; ; are indeed not pretty.
> Maybe let's use a single character that is not used in C ?
> Like @ ?

I like @, it's both distinctive and meaningful. Will send v2 with @
<file>:<line>.

>
> Then it will be:
> ; if (i >= map->cnt) @ strobemeta_probe.bpf.c:396
> ; descr->key_lens[i] = 0; @ strobemeta_probe.bpf.c:398
>
> Some asm languages use ! as a comment. It's ok-ish. a bit worse imo:
> ; if (i >= map->cnt) ! strobemeta_probe.bpf.c:396
> ; descr->key_lens[i] = 0; ! strobemeta_probe.bpf.c:398
>
> or single underscore ?
> ; if (i >= map->cnt) _ strobemeta_probe.bpf.c:396
> ; descr->key_lens[i] = 0; _ strobemeta_probe.bpf.c:398
>
> I think all of the above are better than () or []





[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