All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Norbert Manthey <nmanthey@amazon.de>
Cc: smatch@vger.kernel.org
Subject: Re: Smatch for Xen
Date: Mon, 6 Aug 2018 13:31:32 +0300	[thread overview]
Message-ID: <20180806103132.vzqmp2ns4ytj2aol@mwanda> (raw)
In-Reply-To: <32158e28-2ee8-f2b9-2d66-77c8eb43b5b5@amazon.de>

On Mon, Jul 30, 2018 at 02:40:08PM +0200, Norbert Manthey wrote:
> Dear Dan,
> 
> I use my one-line-scan tool [1] to run smatch against non-kernel
> projects. However, for Xen I still use -p=kernel, to have all the
> analysis enabled. I did not write an evaluation routine to present the
> defects or statistics for smatch in a nice way, but smatch can be
> invoked. For the latest Xen, smatch (actually sparse) seems to struggle
> with the attribute __pointer__ token, as that's not defined.
> 
> A typical invocation for smatch would look like the following:
> 
> export SMATCH_EXTRA_ARG="-p=kernel --file-output"
> one-line-scan -o SMATCH --smatch --no-gotocc --no-analysis \
>   -- make xen -j $(nproc) -B
> 
> I will look into using the debug info next, and see how taint
> information is propagated.
> 

I tried use one-line-scan but I didn't want to install it in my $PATH so
I couldn't figure out how to make it work...

Then I tried to export CC=~/path/to/smatch/cgcc and
HOSTCC=~/path/to/smatch/cgcc but it only builds:

boot/mkelf32.c
config/zconf.tab.c
efi/mkreloc.c
symbols.c
tools/kconfig/conf.c
tools/kconfig/zconf.tab.c

Which is useles...

regards,
dan carpenter


  parent reply	other threads:[~2018-08-06 12:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-30 12:40 Smatch for Xen Norbert Manthey
2018-07-30 16:34 ` [PATCH 0/3] add support for mode __pointer__ & __byte__ Luc Van Oostenryck
2018-07-30 16:34   ` [PATCH 1/3] mode keywords don't need MOD_{CHAR,LONG,...} Luc Van Oostenryck
2018-07-30 16:34   ` [PATCH 2/3] add support for mode __pointer__ Luc Van Oostenryck
2018-07-30 16:34   ` [PATCH 3/3] add support for mode __byte__ Luc Van Oostenryck
2018-08-06 10:31 ` Dan Carpenter [this message]
2018-08-06 11:20   ` Smatch for Xen Dan Carpenter
2018-08-06 13:16     ` Dan Carpenter
     [not found]       ` <CAByO1we3OABkX8XCwh7Vq8iHyXAuFtJ3t+Ta3DVCLe9pP6K8ew@mail.gmail.com>
2018-08-06 13:54         ` Dan Carpenter
2018-08-13 14:25           ` Norbert Manthey
2018-08-13 17:58             ` Dan Carpenter
2018-08-13 18:31               ` Dan Carpenter
2018-08-14 13:27                 ` Norbert Manthey
2018-08-14 14:21                   ` Dan Carpenter
2018-08-14 14:33                     ` Norbert Manthey
2018-08-14 14:52                       ` Dan Carpenter
2018-08-14 15:05                         ` Norbert Manthey
2018-08-15  9:03                       ` Dan Carpenter
2018-08-15 13:44                         ` Norbert Manthey

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=20180806103132.vzqmp2ns4ytj2aol@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=nmanthey@amazon.de \
    --cc=smatch@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.