[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180307.151332.565301474495395127.davem@davemloft.net>
Date: Wed, 07 Mar 2018 15:13:32 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: paul@...l-moore.com
Cc: pmoore@...hat.com, netdev@...r.kernel.org, viro@...iv.linux.org.uk,
dac.override@...il.com, selinux@...ho.nsa.gov,
linux-security-module@...r.kernel.org
Subject: Re: [PATCH] net: don't unnecessarily load kernel modules in
dev_ioctl()
From: Paul Moore <paul@...l-moore.com>
Date: Tue, 6 Mar 2018 17:32:47 -0500
> On Tue, Mar 6, 2018 at 5:27 PM, Paul Moore <pmoore@...hat.com> wrote:
>> From: Paul Moore <paul@...l-moore.com>
>>
>> Starting with v4.16-rc1 we've been seeing a higher than usual number
>> of requests for the kernel to load networking modules, even on events
>> which shouldn't trigger a module load (e.g. ioctl(TCGETS)). Stephen
>> Smalley suggested the problem may lie in commit 44c02a2c3dc5
>> ("dev_ioctl(): move copyin/copyout to callers") which moves changes
>> the network dev_ioctl() function to always call dev_load(),
>> regardless of the requested ioctl.
>>
>> This patch moves the dev_load() calls back into the individual ioctls
>> while preserving the rest of the original patch.
>>
>> Reported-by: Dominick Grift <dac.override@...il.com>
>> Suggested-by: Stephen Smalley <sds@...ho.nsa.gov>
>> Signed-off-by: Paul Moore <paul@...l-moore.com>
>> ---
>> net/core/dev_ioctl.c | 7 +++++--
>> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> In the interest of full disclosure, I've compiled this code but I
> haven't booted it yet (test kernel building now). I just wanted to
> post this sooner rather than later in case the networking folks, or
> Al, had a different solution they would prefer.
This is definitely the right fix, so patch applied.
Taking the dev_load() out of that switch statement definitely has
side effects.
Powered by blists - more mailing lists