]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mm/gup.c: remove some BUG_ONs from get_gate_page()
authorAndy Lutomirski <luto@kernel.org>
Fri, 12 Jul 2019 03:57:43 +0000 (20:57 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit9eebca649dc71aced107471b658c4f138bd53344
tree7d59d1532b6340c9d2e6ce4c7965b65b7c9d836c
parent801c1c4aa44b8ce3eb6c0b4fdf1a300f40e0a27e
mm/gup.c: remove some BUG_ONs from get_gate_page()

BugLink: https://bugs.launchpad.net/bugs/1839036
[ Upstream commit b5d1c39f34d1c9bca0c4b9ae2e339fbbe264a9c7 ]

If we end up without a PGD or PUD entry backing the gate area, don't BUG
-- just fail gracefully.

It's not entirely implausible that this could happen some day on x86.  It
doesn't right now even with an execute-only emulated vsyscall page because
the fixmap shares the PUD, but the core mm code shouldn't rely on that
particular detail to avoid OOPSing.

Link: http://lkml.kernel.org/r/a1d9f4efb75b9d464e59fd6af00104b21c58f6f7.1561610798.git.luto@kernel.org
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Jann Horn <jannh@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
mm/gup.c