On 9/25/20 1:50 PM, Catalin Marinas wrote: >>>> + */ >>>> +SYM_FUNC_START(mte_assign_mem_tag_range) >>>> + /* if (src == NULL) return; */ >>>> + cbz x0, 2f >>>> + /* if (size == 0) return; */ >>>> + cbz x1, 2f >>> I find these checks unnecessary, as I said a couple of times before, >>> just document the function pre-conditions. They are also incomplete >>> (i.e. you check for NULL but not alignment). >>> >> I thought we agreed to harden the code further, based on [1]. Maybe I >> misunderstood. I am going to remove them and extend the comment in the next >> version. >> >> [1] >> https://lore.kernel.org/linux-arm-kernel/921c4ed0-b5b5-bc01-5418-c52d80f1a...@arm.com/ > Well, you concluded that but I haven't confirmed ;). Since it's called > from a single place which does the checks already, I don't see the point > in duplicating them. Documenting should be sufficient. Have you ever heard about "tacit consent"? ;) Anw, fine by me, I will add a comment here. -- Regards, Vincenzo
- [PATCH v3 13/39] kasan: decode stack frame only with KAS... Andrey Konovalov
- [PATCH v3 14/39] kasan, arm64: only init shadow for soft... Andrey Konovalov
- [PATCH v3 16/39] kasan: rename addr_has_shadow to addr_h... Andrey Konovalov
- [PATCH v3 08/39] kasan: split out shadow.c from common.c Andrey Konovalov
- [PATCH v3 11/39] kasan: don't duplicate config dependenc... Andrey Konovalov
- [PATCH v3 22/39] kasan: introduce CONFIG_KASAN_HW_TAGS Andrey Konovalov
- [PATCH v3 24/39] arm64: mte: Add in-kernel MTE helpers Andrey Konovalov
- Re: [PATCH v3 24/39] arm64: mte: Add in-kernel MTE ... Catalin Marinas
- Re: [PATCH v3 24/39] arm64: mte: Add in-kernel ... Vincenzo Frascino
- Re: [PATCH v3 24/39] arm64: mte: Add in-ker... Catalin Marinas
- Re: [PATCH v3 24/39] arm64: mte: Add in... Vincenzo Frascino
- [PATCH v3 21/39] kasan: don't allow SW_TAGS with ARM64_M... Andrey Konovalov
- [PATCH v3 23/39] arm64: Enable armv8.5-a asm-arch option Andrey Konovalov
- Re: [PATCH v3 23/39] arm64: Enable armv8.5-a asm-ar... Catalin Marinas
- [PATCH v3 09/39] kasan: define KASAN_GRANULE_PAGE Andrey Konovalov
- [PATCH v3 02/39] kasan: KASAN_VMALLOC depends on KASAN_G... Andrey Konovalov
- [PATCH v3 10/39] kasan: rename report and tags files Andrey Konovalov
- [PATCH v3 17/39] kasan: rename print_shadow_for_address ... Andrey Konovalov
- [PATCH v3 04/39] kasan: shadow declarations only for sof... Andrey Konovalov
- [PATCH v3 35/39] kasan, arm64: implement HW_TAGS runtime Andrey Konovalov
- [PATCH v3 32/39] kasan: define KASAN_GRANULE_SIZE for HW... Andrey Konovalov