[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdU8p+4v56OV=09VCjpvm5eE97DgoDd7aA7HoZB2Fa-Fvg@mail.gmail.com>
Date: Tue, 6 May 2014 14:03:12 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Richard Weinberger <richard@....at>
Cc: uml-devel <user-mode-linux-devel@...ts.sourceforge.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [uml-devel] [PATCH 2/2] um: Ensure that nobody remaps the stub vma
Hi Richard,
On Sat, May 3, 2014 at 9:12 PM, Richard Weinberger <richard@....at> wrote:
> @@ -90,6 +91,9 @@ static int add_mmap(unsigned long virt, unsigned long phys, unsigned long len,
> struct host_vm_op *last;
> int fd, ret = 0;
>
> + if ((virt >= STUB_START) && (virt < STUB_END))
> + return -EINVAL;
> +
As you have this exact same check in three different places, I think it's worth
splitting it off in a helper function.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists