Re: [PATCH] dissect: use struct symbol::visited/inspected instead of ::examined/evaluated

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

 



On Wed, Jul 29, 2020 at 05:34:13PM +0200, Oleg Nesterov wrote:
> On 07/29, Luc Van Oostenryck wrote:
> >
> > The dissect client uses struct symbol's fields 'examined' & 'evaluated'
> > to avoid reprocessing the same symbols. But these fields are used
> > internally by sparse for type examination & evaluation and despite
> > dissect not doing these operations explicitly, they can be done
> > implicitly
> 
> Yes. For example, test_dissect.c calls show_typename() and this can
> lead to examine/evaluate.
> 
> I didn't bother to fix this because test_dissect.c is the very basic
> debugging tool.
> 
> > So, add a new field to struct symbol: 'inspected' and use it, as
> > well as the existing 'visited', instead of 'evaluated' & 'examined'.
> 
> Thanks! Looks good to me.
> 
> > Note: when used on the kernel, this patch avoids a lot of warnings:
> > 	"warning: r_member bad sym type=7 kind=0"
> > 	"warning: r_member bad mem->kind = 0"
> >       and creates substantially more normal output.
> 
> So this is test-dissect, sindex should be fine even without this patch.

Yes, I only used test-dissect but sindex should be affected too.
The real problem is that, even without the show_typename() from
test-dissect, some symbols can already be examined by __sparse().
In this case dissect.c:examine_sym_node() will be a no-op because
node->examined will already be set. One of the symptoms is node->kind
having a value of 0.

I'll clarify the commit message.

-- Luc



[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