lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 30 Aug 2018 13:48:15 +0200
From:   Andrey Konovalov <>
To:     Catalin Marinas <>
Cc:     Dmitry Vyukov <>,
        Kostya Serebryany <>,
        Evgeniy Stepanov <>,
        Lee Smith <>,
        Ramana Radhakrishnan <>,
        Jacob Bramley <>,
        Ruben Ayrapetyan <>,
        Chintan Pandya <>,
        Will Deacon <>,
        Mark Rutland <>,
        Robin Murphy <>,
        Al Viro <>,
        Andrey Konovalov <>,
        Kees Cook <>,
        Kate Stewart <>,
        Greg Kroah-Hartman <>,
        Andrew Morton <>,
        Ingo Molnar <>,
        "Kirill A . Shutemov" <>,
        Shuah Khan <>,
        Linux ARM <>,,
        Linux Memory Management List <>,,,
        LKML <>
Subject: Re: [PATCH v6 00/11] arm64: untag user pointers passed to the kernel

On Thu, Aug 30, 2018 at 1:41 PM, Andrey Konovalov <> wrote:
> arm64 has a feature called Top Byte Ignore, which allows to embed pointer
> tags into the top byte of each pointer. Userspace programs (such as
> HWASan, a memory debugging tool [1]) might use this feature and pass
> tagged user pointers to the kernel through syscalls or other interfaces.
> This patch makes a few of the kernel interfaces accept tagged user
> pointers. The kernel is already able to handle user faults with tagged
> pointers and has the untagged_addr macro, which this patchset reuses.
> Thanks!
> [1]
> Changes in v6:
> - Added annotations for user pointer casts found by sparse.

Hi Catalin,

I've added annotations for the user pointer casts pointed by the new
sparse flag -Wcast-from-as as you asked. I've used __force casts
instead of adding specialized macros.

There are also non annotated casts for other pointer types (iomem,
rcu) which are detected with the new flag, should I annotate those as

I'm not sure though what value would that bring though, as there are
~3000 various sparse warnings produced with the default flags anyway.




Powered by blists - more mailing lists