Re: WARNING in dev_vprintk_emit

From: Johannes Berg
Date: Mon May 14 2018 - 08:13:54 EST

On Sun, 2018-05-13 at 11:47 -0700, Eric Biggers wrote:

> The bug is that mac80211_hwsim allows creating device names that are too long,
> via HWSIM_CMD_NEW_RADIO. Commit a7cfebcb7594a2 ("cfg80211: limit wiphy names to
> 128 bytes") limited them to 128 bytes, but it's not enough because
> dev_vprintk_emit() needs the device name plus some other stuff to not exceed 128
> bytes. Here's a reproducer that works on Linus' tree (commit ccda3c4b777),
> provided that CONFIG_MAC80211_HWSIM=y. Note that you'll probably need to change
> the hardcoded MAC80211_HWSIM generic netlink family ID for it to work.
> Johannes, what would you say about limiting the name length to 64 bytes instead?

Don't really have any objections - care to send a patch?