Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp9396571rwb; Thu, 24 Nov 2022 12:11:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf4tW3FEBReXTW2fR7KHi35QmztiaNqSjmo8gxn94PH6ZulAsutyQ2sfhIcoaPTPsj9Kcscv X-Received: by 2002:a05:6402:48e:b0:463:ab06:f338 with SMTP id k14-20020a056402048e00b00463ab06f338mr31556242edv.371.1669320661728; Thu, 24 Nov 2022 12:11:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669320661; cv=none; d=google.com; s=arc-20160816; b=mb7iUdJTf2aiFgLS1EIaIpLaIWFRIHNGWVwfY0EuU0acslAVjKcf3DKnSzEQUw8fzr shI1IAONCMEW8qm+HeoqIacJ8d+nVQhBOd8JetWWS5Gd8lvVRwbpfqfvmg6XQZ3jLmpW FiUkFclZ+9/8Gd+5yfvEjSXeuyzMEaWPdDYNAtK+MlChz19y0+Y6njvi6P2bFkb87DHg 8pglP/x6Gl7AagrmAmUdXQ/vVeeDimjT9DWdN7gOz21rPxZY6AgOP2SvC+wP9z2JE/Iq C+s08QNiF4ONU0KD+dnCDxRn0r9oJo6DQahlWCkara5cWZ/SA6TcaleZCHehCv5WY4zq 1wow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Tv/mRhisdKhM/x+XYbfuqPutmVBdCSxk7FST0Joc5x4=; b=Vjrnaxd82ljvqPLUNSSS6FZeofrOBy6DQs/nwRgFxcXPDEekVcrIjP7luXdd60Mv4i VHNHqM8S+jr4DOuYsZy74BzKBwvtj9y3ig2esUwCIxKwBYD7+nOjF2Gh9RcGNKbDXZA/ 1ZHAiy4uJ+2au3gsbmU1d6NaPfUirqMDG3+6iKLQFQPLDw0CAxi5oYRgDKn47Q5rzyoO 5lDyxVDeW7jrGLCika3HRWJz3d5pL74+lnMHv0gwHIgrFus2MUcPxqIGIQQcOL/RRDJf HHFCJ5ACRyMnRPHml6SQ8Y8J3AUVh5lS+WWjtci83QCd2lzkQXx9De/J1eHdss/35Kxg dHmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QgclNOMn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz42-20020a1709077daa00b0078ca7bbf616si1649017ejc.746.2022.11.24.12.10.36; Thu, 24 Nov 2022 12:11:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QgclNOMn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229632AbiKXTgR (ORCPT + 86 others); Thu, 24 Nov 2022 14:36:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbiKXTgP (ORCPT ); Thu, 24 Nov 2022 14:36:15 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E2CA82235 for ; Thu, 24 Nov 2022 11:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669318574; x=1700854574; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=C8l6VkDUAjQEQdg9zyM7mPOQgK66sCV8qL/BSSTOXpQ=; b=QgclNOMnbzqCzXTqAVEUWzZIgp5WVgD6FK25nNleq3INaJWCuPHo5Fq7 T2/QMbULybAGUA4OxvnXJSAhymKC4swwurT8fxQ0bx0W/cBOxR/9w24Wz 2wEgRP5tqHJBNUbtjRUbLjKCZbhOlJP7Wm4f8O4mq63swQ0StQryolnYd z60MzDVlF/d2IvMWzgpn91d4maIyxbQSY/0kPPLaDE/7pMbKAJU3zJ/Dt vN+lULeY4gcoxWjvPmxjUlmLVSOjgJVh2Buc/JoQtvPIboMh7Vxgd3o6o bZ/m99uLC6YgGJympDL9ryVgkGi3nwPFa3RjicBaZdbnWGSY5pNtKtfhx g==; X-IronPort-AV: E=McAfee;i="6500,9779,10541"; a="301920621" X-IronPort-AV: E=Sophos;i="5.96,191,1665471600"; d="scan'208";a="301920621" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2022 11:36:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10541"; a="673330855" X-IronPort-AV: E=Sophos;i="5.96,191,1665471600"; d="scan'208";a="673330855" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP; 24 Nov 2022 11:36:11 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oyI13-00GvS6-2B; Thu, 24 Nov 2022 21:36:09 +0200 Date: Thu, 24 Nov 2022 21:36:09 +0200 From: Andy Shevchenko To: "Kirill A. Shutemov" Cc: kirill@shutemov.name, dave.hansen@intel.com, dave.hansen@linux.intel.com, jejb@linux.ibm.com, linux-kernel@vger.kernel.org, lkp@intel.com, martin.petersen@oracle.com, oe-kbuild-all@lists.linux.dev, x86@kernel.org Subject: Re: [PATCH 2/2] x86/mm: Fix sparse warnings in untagged_ptr() Message-ID: References: <20221115155802.p3vjnk7eqqcyskt3@box.shutemov.name> <20221116004353.15052-1-kirill.shutemov@linux.intel.com> <20221116004353.15052-3-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221116004353.15052-3-kirill.shutemov@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 16, 2022 at 03:43:53AM +0300, Kirill A. Shutemov wrote: > Linear Address Masking patchset triggered a lot of sparse warnings. > > The root cause is that casting pointer to '__typeof__(*(ptr)) *' will > strip all sparse tags. The type has to be defined based on the pointer > type, not based on what the pointer points to. > > Fix cast in untagged_ptr() and avoid __typeof__() usage in > get/put_user(). Without this patch we have drivers/auxdisplay/charlcd.c:482:21: warning: incorrect type in assignment (different address spaces) drivers/auxdisplay/charlcd.c:482:21: expected char const [noderef] __user *__ptr_clean drivers/auxdisplay/charlcd.c:482:21: got char const * So, Tested-by: Andy Shevchenko Can we have this series applied, please? -- With Best Regards, Andy Shevchenko