From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935034AbdBQU14 (ORCPT ); Fri, 17 Feb 2017 15:27:56 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:48464 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932655AbdBQU1x (ORCPT ); Fri, 17 Feb 2017 15:27:53 -0500 Date: Fri, 17 Feb 2017 15:27:51 -0500 (EST) Message-Id: <20170217.152751.774490769271193769.davem@davemloft.net> To: arnd@arndb.de Cc: skhare@vmware.com, pv-drivers@vmware.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] vmxnet3: prevent building with 64K pages From: David Miller In-Reply-To: <20170217150847.2505538-1-arnd@arndb.de> References: <20170217150847.2505538-1-arnd@arndb.de> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 17 Feb 2017 11:28:57 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Date: Fri, 17 Feb 2017 16:08:30 +0100 > I got a warning about broken code on ARM64 with 64K pages: > > drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_rq_init': > drivers/net/vmxnet3/vmxnet3_drv.c:1679:29: error: large integer implicitly truncated to unsigned type [-Werror=overflow] > rq->buf_info[0][i].len = PAGE_SIZE; > > 'len' here is a 16-bit integer, so this clearly won't work. I don't think > this driver is used much on anything other than x86, so there is no need > to fix this properly and we can work around it with a Kconfig dependency > to forbid known-broken configurations. qemu in theory supports it on > other architectures too, but presumably only for compatibility with x86 > guests that also run on vmware. > > CONFIG_PAGE_SIZE_64KB is used on hexagon, mips, sh and tile, the other > symbols are architecture-specific names for the same thing. > > Signed-off-by: Arnd Bergmann I've applied this to net-next, but... That is a real messy plethora of Kconfig symbol variants, it would be nice to consolidate those somehow. The driver could also chop 64K pages into 32K or smaller pieces and maintain an appropriate refcnt. Yes, I realize this is probably not very valuable work for a situation that might never ever occur.