lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a36005b50706291855j4069e4d0j73c006e9bf180b42@mail.gmail.com>
Date:	Fri, 29 Jun 2007 18:55:18 -0700
From:	"Ulrich Drepper" <drepper@...il.com>
To:	"Davide Libenzi" <davidel@...ilserver.org>
Cc:	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Linus Torvalds" <torvalds@...ux-foundation.org>,
	"Ingo Molnar" <mingo@...e.hu>
Subject: Re: [patch 3/6] sys_indirect RFC - sys_indirect core

On 6/29/07, Davide Libenzi <davidel@...ilserver.org> wrote:
> +int indirect_set_context(struct fsa_context *ator,
> +                        const struct indirect_ctx __user * __user *ctxs,
> +                        unsigned int nctxs, struct indirect_op **first)
> +{
> +       unsigned int i;
> +       int error;
> +       u32 ctx;
> +       const struct indirect_ctx __user *pctx;
> +       struct indirect_op *new;
> +
> +       *first = NULL;
> +       for (i = 0; i < nctxs; i++) {
> +               if (get_user(pctx, &ctxs[i]) || get_user(ctx, &pctx->ctx))
> +                       return -EFAULT;
> +               if (unlikely(ctx >= ARRAY_SIZE(inprocs) || !inprocs[ctx].set))
> +                       return -EINVAL;
> +               error = (*inprocs[ctx].set)(ator, pctx, &new);
> +               if (unlikely(error))
> +                       return error;
> +               new->next = *first;
> +               *first = new;
> +       }

If you use one single struct as explained in my last mail all this
shouldn't be necessary.  The sys_indirect syscall would simply points
current->ind_ctx to a kernel-copy of the struct.  Then call the
syscall and on return clear current->ind_ctx.

In the affected syscalls we can then test whether current->ind_ctx is
NULL and if not, enable the extra functionality.

These callbacks etc seem to be far too expensive and complicated.
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ