linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: ak@suse.de, linux-kernel@vger.kernel.org, linux-sparse@vger.kernel.org
Subject: Re: sparse breakage (x86_64: Add vDSO for x86-64 with gettimeofday/clock_gettime/getcpu)
Date: Sun, 22 Jul 2007 18:28:56 +0100	[thread overview]
Message-ID: <20070722172856.GC21668@ftp.linux.org.uk> (raw)
In-Reply-To: <20070722170657.GB21668@ftp.linux.org.uk>

On Sun, Jul 22, 2007 at 06:06:57PM +0100, Al Viro wrote:
> On Sun, Jul 22, 2007 at 08:08:09PM +0400, Alexey Dobriyan wrote:
> > Andi, with new vDSO code sparse fails to check with usual invocation here:
> 
> Fucks with CF and not in a good way...
> 
> CF := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64
> 
> $(obj)/vclock_gettime.o: CFLAGS = $(CF)
> $(obj)/vgetcpu.o: CFLAGS = $(CF)
> 
> s/CF/CCF/ in there (arch/x86_64/vdso/Makefile) fixes gcc problems; sparse
> ones remain and I'll look into that when I get some sleep (26 hours uptime
> right now).  I think I have a good idea of what's going on there, but
> I'd rather not touch that code until tonight.
> 
> For now just rename the variable in makefile (obviously the right thing
> to do) and that will give you sparse runs not aborted at that point.

Actually,

ed evaluate.c <<EOF
/evaluate_member_dereference
/examine_symbol_type/m/ctype =
w
q
EOF

ought to take care of sparse, AFAICS.  IOW, in evaluate_member_dereference()
we need to do examine_symbol_type(ctype) before checking ctype->type, etc.
As it is, we end up with SYM_TYPEOF node there and it's not expanded until
we'd checked if we have SYM_STRUCT.  We would, after expansion, but we don't
do it until too late.

I haven't checked if that's causes any regressions, but it looks
straightforward enough to be a plausible fix.  I won't test it until
tonight, though (see above).  Minimal testcase is
struct foo {int x;} v;
typeof(v) *p;
void bar(void)
{
        p->x = 0;
}
and any serious regression testing should get both the sparse tests and
comparing kernel builds with and without that fix...

           reply	other threads:[~2007-07-22 17:28 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20070722170657.GB21668@ftp.linux.org.uk>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070722172856.GC21668@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=adobriyan@gmail.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).