From: David Miller <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
Date: Fri, 17 Feb 2017 15:27:51 -0500 (EST) [thread overview]
Message-ID: <20170217.152751.774490769271193769.davem@davemloft.net> (raw)
In-Reply-To: <20170217150847.2505538-1-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
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 <arnd@arndb.de>
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.
prev parent reply other threads:[~2017-02-17 20:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 15:08 Arnd Bergmann
2017-02-17 20:27 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170217.152751.774490769271193769.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pv-drivers@vmware.com \
--cc=skhare@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®