Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2320066pxb; Fri, 8 Oct 2021 05:37:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQgE4tt8TXXZn5/zraAPvHG1ncm43wetWfa5HJTqd5CE6bhzNGrV2Ma2RZ6WZpcipfZ1tS X-Received: by 2002:a17:906:1bb1:: with SMTP id r17mr3914501ejg.533.1633696678147; Fri, 08 Oct 2021 05:37:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633696678; cv=none; d=google.com; s=arc-20160816; b=S6pl+JqdJcPOX1dgc/jj2uid6opo8maSIgymHnF6r6RJ+1r7yxJrzJl7odKj54nONe WH8AWwHSWWq616I7UaExR7G/tE34tVyZcDkkGQGYYUpe3MonyLip2S27m85g5fbn1F6R mXDblkvvbFGGLfVzKqu9YJ3fHS4HMB8hIGFNmDnAZAFNEfBzud7PFf27KyiEwiqn2Q0O LXVFNp+tpnw4mlSI0FbruMU9iyuYYozL6SO6QaVNRFDrrrVpFXVLS0rtIu+mCf4hB/Lz 2dLvJS+Sj/fH6UOtH7oEypCVgRWXFh/Na9cPS/wApqiyQ6yGNd/AEiFzzDtMd2Np3vcu TCvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=4f6OPaQNUld3iX7UyOBvg+SAumqKW6RB3FzD97GdP8U=; b=bXf72NgiovfO5PqUlCCHwp8jRYlIwORPdNmPlFgQqc3xizC712D6J1D0j8Qr0mpfto mHYmnRMrYa5IWEwLiAqCNIyjemNx2bmLqnlpGESHg4E5VcpPU8Zqixs7PnUoMcKBtmVl S9+Cq7zBDOprFYO8l6IB2llH6m2SSenuQl7uKbS4/N613D90NaMTmGGU+dzxXjWqBVk6 f1FIqYCk2XRs0ydqiFoQ/rUEuo63zGkJKKDZa0o5b2G7p5ysv+bXM7txGNqiMnpOV4FY LtipFxb7ufufGAsv6m9DLvX0Im56ai72//uqono//Q3MYU4MJ1TR+V7ld7GUKoJy6MrU bR9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=VeokEPy8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jw25si2780125ejc.571.2021.10.08.05.37.31; Fri, 08 Oct 2021 05:37:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=VeokEPy8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241419AbhJHMhA (ORCPT + 99 others); Fri, 8 Oct 2021 08:37:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241336AbhJHMhA (ORCPT ); Fri, 8 Oct 2021 08:37:00 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B11F9C061570 for ; Fri, 8 Oct 2021 05:35:04 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id i189so2805712ioa.1 for ; Fri, 08 Oct 2021 05:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=4f6OPaQNUld3iX7UyOBvg+SAumqKW6RB3FzD97GdP8U=; b=VeokEPy8MWtJwleIvL/ptjG29znO0KfRtROFAxmEOfHisk13hrmcvWSaHWyozXHyYf mNnClGVDc875PffpSKF9vWNaBdrno667JwklIWIhViHcz+fN1SNsO2y/S0Yg0BYrBjN5 9a/cXAyOyCsYYX0ag+LvbAF0Bu8zJSxlViN7rzPI4tYmwHD804ND8Za0YvZcGoBg76oj ODLwbHne2IvkdkpSyQiXW0hT7MzpBGuZjtgN7K4KpHjvTUNT595in2sCHbSpgBJNB9uf RLZckL95F5Lvq2GLHQa1zCt8eQg/eWXSeucWLw67qHJJf3lA4IBn5DWh7Xwq2ySl5rDy GlLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4f6OPaQNUld3iX7UyOBvg+SAumqKW6RB3FzD97GdP8U=; b=mJTznDYOEPfGAWY/MnUcNA1JlWFMiBkftYtHXBASevY9hSsAiGxY99SlmASAEagI4U lxkCzHk96TnYNZbQQGWSvmOI/eNBHwexdvQV/VyS/k2Sek2bbHhDKpmyGJEWx9+R4I+k UesN8JVw5Vr03RqTfp/Y4/E8Ft3ae5Jgwy+EyjDMBXuxKoQ7QgRVcyquaq0zhiTGQYdQ KyD0lUxNY/WdADkqLC5OLtJUR3vGZMKSlxy3hTJgmLL4Bw/b0MkCr+a17Gf4UN1C3ASo Mzr8+u1xPRVANfw5lhVCtMOmSIoGKaM3Mrb3DXscVZ0/U5xCEokLZz7x8lXP6OFz23Xp bWYA== X-Gm-Message-State: AOAM531lLbS8exnFdX6cQrJcJ3GhgEXlLCmAGQ8blEs0tsx8hlVzRHuP WVy+MH5W6hPctffdOZWMJzZMww== X-Received: by 2002:a05:6602:240d:: with SMTP id s13mr7256250ioa.94.1633696503995; Fri, 08 Oct 2021 05:35:03 -0700 (PDT) Received: from [192.168.1.116] ([66.219.217.159]) by smtp.gmail.com with ESMTPSA id n4sm1035273ili.63.2021.10.08.05.35.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Oct 2021 05:35:03 -0700 (PDT) Subject: Re: [axboe-block:nvme-passthru-wip 10/19] drivers/nvme/host/ioctl.c:47:19: error: cast to pointer from integer of different size To: Geert Uytterhoeven , kernel test robot Cc: Kanchan Joshi , kbuild-all@lists.01.org, Linux Kernel Mailing List , Anuj Gupta References: <202110080434.YH6r4WZv-lkp@intel.com> From: Jens Axboe Message-ID: Date: Fri, 8 Oct 2021 06:35:02 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/8/21 2:19 AM, Geert Uytterhoeven wrote: > On Fri, Oct 8, 2021 at 12:12 AM kernel test robot wrote: >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git nvme-passthru-wip >> head: 9c18980ac90053bcdb21594eae48935d89bf389c >> commit: 5cc445dd8df6e06f3482711aa590170450364393 [10/19] nvme: wire-up support for async-passthru on char-device. >> config: m68k-allmodconfig (attached as .config) >> compiler: m68k-linux-gcc (GCC) 11.2.0 >> reproduce (this is a W=1 build): >> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross >> chmod +x ~/bin/make.cross >> # https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=5cc445dd8df6e06f3482711aa590170450364393 >> git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git >> git fetch --no-tags axboe-block nvme-passthru-wip >> git checkout 5cc445dd8df6e06f3482711aa590170450364393 >> # save the attached .config to linux build tree >> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k >> >> If you fix the issue, kindly add following tag as appropriate >> Reported-by: kernel test robot >> >> All errors (new ones prefixed by >>): >> >> drivers/nvme/host/ioctl.c: In function 'nvme_pt_task_cb': >>>> drivers/nvme/host/ioctl.c:47:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] >> 47 | ptcmd64 = (void __user *) bcmd->unused2[0]; >> | ^ >> drivers/nvme/host/ioctl.c:62:58: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] >> 62 | struct nvme_passthru_cmd __user *ptcmd = (void *)bcmd->unused2[0]; >> | ^ >> drivers/nvme/host/ioctl.c: In function 'nvme_ns_async_ioctl': >> drivers/nvme/host/ioctl.c:472:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] >> 472 | void __user *argp = (void __user *) bcmd->unused2[0]; >> | ^ >> cc1: all warnings being treated as errors >> >> >> vim +47 drivers/nvme/host/ioctl.c >> >> 39 >> 40 static void nvme_pt_task_cb(struct io_uring_cmd *ioucmd) >> 41 { >> 42 struct uring_cmd_data *ucd; >> 43 struct nvme_passthru_cmd64 __user *ptcmd64 = NULL; >> 44 struct block_uring_cmd *bcmd; >> 45 >> 46 bcmd = (struct block_uring_cmd *) &ioucmd->pdu; >> > 47 ptcmd64 = (void __user *) bcmd->unused2[0]; > > Casts from u64 to a pointer on 32-bit need an intermediate cast to uintptr_t: > > ptcmd64 = (void __user *)(uintptr_t)bcmd->unused2[0]; > > Note that you can improve on the naming, as people may be surprised > discovering "unused2" is actually used ;-) There's a reason the branch is called -wip, it's just a hodge podge of stuff. Not sure why the kernel test robot bothers reporting failures publicly for that... -- Jens Axboe