2020-09-18 09:45:35

by Alexander Potapenko

[permalink] [raw]
Subject: Re: [PATCH v2 20/37] kasan: rename tags.c to tags_sw.c

On Tue, Sep 15, 2020 at 11:17 PM Andrey Konovalov <[email protected]> wrote:
>
> This is a preparatory commit for the upcoming addition of a new hardware
> tag-based (MTE-based) KASAN mode.
>
> Hardware tag-based KASAN will also be using tag-based approach, so rename
> tags.c to tags_sw.c and report_tags.c to report_tags_sw.c to avoid
> confusion once the new mode is added

I find it a bit excessive renaming the same file twice in the same
patch series (tags_report.c -> report_tags.c -> report_tags_sw.c)


2020-09-18 09:46:31

by Alexander Potapenko

[permalink] [raw]
Subject: Re: [PATCH v2 20/37] kasan: rename tags.c to tags_sw.c

On Fri, Sep 18, 2020 at 11:41 AM Alexander Potapenko <[email protected]> wrote:
>
> On Tue, Sep 15, 2020 at 11:17 PM Andrey Konovalov <[email protected]> wrote:
> >
> > This is a preparatory commit for the upcoming addition of a new hardware
> > tag-based (MTE-based) KASAN mode.
> >
> > Hardware tag-based KASAN will also be using tag-based approach, so rename
> > tags.c to tags_sw.c and report_tags.c to report_tags_sw.c to avoid
> > confusion once the new mode is added
>
> I find it a bit excessive renaming the same file twice in the same
> patch series (tags_report.c -> report_tags.c -> report_tags_sw.c)

Also, as we are going to have CONFIG_KASAN_{SW,HW}_TAGS, won't it be
better to call the files {report_,}tags_{sw,hw}.c ?

--
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

2020-09-18 09:50:08

by Alexander Potapenko

[permalink] [raw]
Subject: Re: [PATCH v2 20/37] kasan: rename tags.c to tags_sw.c

> Also, as we are going to have CONFIG_KASAN_{SW,HW}_TAGS, won't it be
> better to call the files {report_,}tags_{sw,hw}.c ?

Sorry for the typo, I meant "{report_,}{sw,hw}_tags.c, mirroring the
config names.

2020-09-18 10:45:50

by Andrey Konovalov

[permalink] [raw]
Subject: Re: [PATCH v2 20/37] kasan: rename tags.c to tags_sw.c

On Fri, Sep 18, 2020 at 11:46 AM Alexander Potapenko <[email protected]> wrote:
>
> > Also, as we are going to have CONFIG_KASAN_{SW,HW}_TAGS, won't it be
> > better to call the files {report_,}tags_{sw,hw}.c ?
>
> Sorry for the typo, I meant "{report_,}{sw,hw}_tags.c, mirroring the
> config names.

The idea here was to have common prefixes for similar parts, therefore
I put "tags" first, so "tags_sw.c" comes next to "tags_hw.c" when one
is running "ls". But I can rename them if you think it makes sense.