Subject: Re: [PATCH] net/xen-netback: Break build if netback slots > max_skbs + 1

From: Jakub Kicinski <[email-masked]>
Date: Wed, 4 Oct 2023 11:47:58 -0700

On Wed, 27 Sep 2023 11:29:18 +0300 David Kahurani wrote:
> If XEN_NETBK_LEGACY_SLOTS_MAX and MAX_SKB_FRAGS have a difference of
> more than 1, with MAX_SKB_FRAGS being the lesser value, it opens up a
> path for null-dereference. It was also noted that some distributions
> were modifying upstream behaviour in that direction which necessitates
> this patch.

MAX_SKB_FRAGS can now be set via Kconfig, this allows us to create
larger super-packets. Can XEN_NETBK_LEGACY_SLOTS_MAX be made relative
to MAX_SKB_FRAGS, or does the number have to match between guest and
host? Option #2 would be to add a Kconfig dependency for the driver
to make sure high MAX_SKB_FRAGS is incompatible with it.

Breaking the build will make build bots very sad.

We'll also need a Fixes tag, I presume this is a fix?
-- 
pw-bot: cr