From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp2130.oracle.com ([141.146.126.79]:46354 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727469AbfFFKPW (ORCPT ); Thu, 6 Jun 2019 06:15:22 -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=PJ0gkH2JrUGbCsJk+EzqJ47QzSu+v1Y0R8uCllylvlI=; b=A1kjcD3OLwtOf78BT08XW3LLnaWXxRoCipuyqDSiiQ8nB+FK7IyWCTDbyXWfSR+fqAjX 3SdFLYLSotnGqiC6sb3Z8Vcz/enkdcSqok2PMNgn693t29qevy6fo9f1UhHqJ6mW2QNw s83PXLbCcozRVKUSLLoe2LBCEabUgYreZK0xs2u2JJr5w7HxIYJukoy75ljfKjNOaP26 OxWm4Xy60PIVE/eaa0RCPDJ0ZWCjm8USXICgfgbfAok7yY9vWtF62bcGu/KbbEWP1bs7 Vj7gPxH+2DRPxqfXs372ED7oNoT9LY7QlNeQRzetp3n61OEebQ6f7/Wigpdxvo8tVeZb yg== Date: Thu, 6 Jun 2019 13:15:09 +0300 From: Dan Carpenter Subject: Re: Detecting user data on base types Message-ID: <20190606101509.GY24680@kadam> References: <20190529184722.GG709@e119886-lin.cambridge.arm.com> <20190529194933.GN24680@kadam> <20190530090329.GH709@e119886-lin.cambridge.arm.com> <20190530174642.GB31203@kadam> <20190605082926.GB23647@e119886-lin.cambridge.arm.com> <20190605114737.GC23647@e119886-lin.cambridge.arm.com> <20190605122841.GD23647@e119886-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190605122841.GD23647@e119886-lin.cambridge.arm.com> Sender: smatch-owner@vger.kernel.org List-ID: To: Andrew Murray Cc: smatch@vger.kernel.org On Wed, Jun 05, 2019 at 01:28:41PM +0100, Andrew Murray wrote: > Actually it looks there is logic associated to get_user in handle_get_user within > smatch_kernel_user_data.c - however this doesn't seem to trigger in the following (it looks > like it does something with the return value of the macro, but this is just an error flag): > > do_pages_move -calls-> add_page_for_migration - the second argument of > add_page_for_migration 'addr' comes from get_user - but it isn't marked as USER_DATA in > the database. I don't understand why this is. > That's weird. It's working for me. mm/migrate.c | do_pages_move | add_page_for_migration | USER_DATA | 1 | addr | 0-u64max Btw, I pushed the fix for untagged_addr() and my DB was built with that fix. You could try see if that makes a difference, I guess? kchecker --info mm/migrate.c > info.txt ~/path/to/smatch/smatch_data/db/reload_partial.sh info.txt regards, dan carpenter