Re: [PATCH] print address space number for cast-from-AS warnings

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

 



On Thu, Sep 6, 2018 at 3:52 PM Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> wrote:
>
> I suppose that hard-coding these names wouldn't be too bad.
> Otherwise, I only see something like:

I was thinking that we could do something like actually change sparse
to track a token instead of a number for the address space, and then
we'd just make the kernel eventually switch to

  #define __user  __attribute__((noderef, address_space(user)))

and the address space would just magically change from '1' to 'user'.

The sparse validation tests would then just use a token name, and you
coulkd just have a warning like

   warning: cast removes 'user' address space of expression

and yeah, the kernel warnings would look odd for a while ("cast
removes '1' address space of expression"), but we'd know that they
eventually would become more legible as we start relying on a newer
version of sparse.

Maybe it's not a big deal, and maybe it's too painful to change the
asn from an integer to a token pointer. I didn't even look at that.

                     Linus



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux