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] [thread-next>] [day] [month] [year] [list]
Message-ID: <87v99n5dtk.fsf@nanos.tec.linutronix.de>
Date:   Fri, 19 Mar 2021 17:05:27 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Andy Lutomirski <luto@...nel.org>, x86@...nel.org
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Mark Rutland <mark.rutland@....com>,
        Brian Gerst <brgerst@...il.com>,
        Andy Lutomirski <luto@...nel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH v4 3/9] x86/entry: Convert ret_from_fork to C

On Wed, Mar 17 2021 at 11:12, Andy Lutomirski wrote:

> ret_from_fork is written in asm, slightly differently, for x86_32 and
> x86_64.  Convert it to C.
> +__visible void noinstr ret_from_fork(struct task_struct *prev,
> +				     int (*kernel_thread_fn)(void *),
> +				     void *kernel_thread_arg,
> +				     struct pt_regs *user_regs)
> +{
> +	instrumentation_begin();
> +
> +	schedule_tail(prev);
> +
> +	if (kernel_thread_fn) {
> +		kernel_thread_fn(kernel_thread_arg);
> +		user_regs->ax = 0;

If you replace this with:

   syscall_set_return_value(current, user_regs, 0, 0);

then it's architecture agnostic and can move to kernel/entry, no?

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ