From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp2130.oracle.com ([141.146.126.79]:59022 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727517AbeHFMkG (ORCPT ); Mon, 6 Aug 2018 08:40:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=/9aXWs6bdO5vl4WGejvJ2l+OO+sI4WERFG+dw66UgHk=; b=x0yNTZHvD3Kw6+8N1qDylNTDmUQJWtY5kP3WJtnDI0ABhbsAE/1ANkbFCJ84MJv0UZHe LUI1J3oajeG+k24lWIMKVLx3nXrnc0Gf9Bz505+Wfr6EgFUuMYnDTu4wj6SJ7d79se6i wGDbydXd2aRjI61WWjTcMtSjjQolpShxlTLKZxdN+A890uvG/+OOVuhYOhXNTgOSYuWS +6XNi+F+lxgXJum/d6qN9EKgJbdQEoZ6k9Vn43iAu3wdZsNLe9Wyu4xICCDOmCKyHKuV Gd3PO0SNAJ/J4VBdbLYnv+swMpu+6gholU35xuUQYvr5kJ0pSuUJcG4MpVXcqZbvbyo8 OA== Date: Mon, 6 Aug 2018 13:31:32 +0300 From: Dan Carpenter Subject: Re: Smatch for Xen Message-ID: <20180806103132.vzqmp2ns4ytj2aol@mwanda> References: <32158e28-2ee8-f2b9-2d66-77c8eb43b5b5@amazon.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32158e28-2ee8-f2b9-2d66-77c8eb43b5b5@amazon.de> Sender: smatch-owner@vger.kernel.org List-ID: To: Norbert Manthey Cc: smatch@vger.kernel.org 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