Re: [PATCH] SGI UV: TLB shootdown using broadcast assist unit

From: Ingo Molnar
Date: Wed Jun 18 2008 - 08:54:24 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> * Cliff Wickman <cpw@xxxxxxx> wrote:
>
> > From: Cliff Wickman <cpw@xxxxxxx>
> >
> > TLB shootdown for SGI UV.
> >
> > This patch brings v1 up to v5.
>
> applied to tip/x86/uv, thanks Cliff.
>
> Note that i've done a few minor cleanups as well in that branch (see the
> patch below). The code could still be improved.
>
> Found a potential security hole while doing that:
>
> static ssize_t uv_ptc_proc_write(struct file *file, const char __user *user,
> size_t count, loff_t *data)
> {
> long newmode;
> char optstr[64];
>
> if (copy_from_user(optstr, user, count))
> return -EFAULT;
>
> is count guaranteed to never be larger than 64?

another problem was that it wasnt build-tested, see the fix below.

Ingo

-------------->
commit fa3ee1e0c85be26f6e1ba62cd66d62b305d45efd
Author: Ingo Molnar <mingo@xxxxxxx>
Date: Wed Jun 18 14:51:57 2008 +0200

SGI UV: TLB shootdown using broadcast assist unit, fix

fix:

arch/x86/kernel/tlb_uv.c: In function âuv_table_bases_init':
arch/x86/kernel/tlb_uv.c:612: error: âbau_tabsp' undeclared (first use in this function)
arch/x86/kernel/tlb_uv.c:612: error: (Each undeclared identifier is reported only once
arch/x86/kernel/tlb_uv.c:612: error: for each function it appears in.)

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>

diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index 7bdbf67..b362913 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -609,7 +609,7 @@ static struct bau_control * __init uv_table_bases_init(int blade, int node)

uv_bau_table_bases[blade] = bau_tabp;

- return bau_tabsp;
+ return bau_tabp;
}

/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/