On Thu, Dec 05, 2019 at 05:35:54PM +0300, Dan Carpenter wrote: > On Thu, Dec 05, 2019 at 05:28:42PM +0300, Dan Carpenter wrote: > > On Thu, Dec 05, 2019 at 04:27:03PM +0300, Dan Carpenter wrote: > > > > We hardcode symbols of interest that we consider to be untagged addresses. This > > > > provides good coverage but isn't very flexible. A better approach would be to > > > > annotate the kernel with address space tags, such as is the case for __user, > > > > __percpu, etc. Thus variables, struct members and function parameters could be > > > > annotated to indicate that they contain untagged addresses. Unfortunately: > > > > > > > > - At present it's not possible to determine a struct member's address space > > > > from Smatch > > > > > > I'm not sure how to get the address space for anything not just struct > > > members. :( I will investigate. > > > > I was using the wrong attribute in my testing. In the kernel __user is > > > > #define __user __attribute__((noderef, address_space(1))) > > > > My guess is that __untagged isn't something that Sparse knows about? Indeed. -- Luc