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]
Date:   Thu, 30 Aug 2018 07:41:55 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Palmer Dabbelt <palmer@...ive.com>
Cc:     linux-riscv@...ts.infradead.org, daniel.lezcano@...aro.org,
        jason@...edaemon.net, ard.biesheuvel@...aro.org,
        marc.zyngier@....com, catalin.marinas@....com,
        dmitriy@...-tech.org, jeremy.linton@....com,
        linux-kernel@...r.kernel.org, atish.patra@....com,
        aou@...s.berkeley.edu, Greg KH <gregkh@...uxfoundation.org>,
        tglx@...utronix.de
Subject: Re: [PATCH 6/8] RISC-V: Use mmgrab()

> +#include <linux/sched/mm.h>
>  #include <asm/irq.h>
>  #include <asm/mmu_context.h>
>  #include <asm/tlbflush.h>
> @@ -79,8 +80,8 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
>  	 * the spinning harts that they can continue the boot process.
>  	 */
>  	smp_mb();
> -	__cpu_up_stack_pointer[cpu] = task_stack_page(tidle) + THREAD_SIZE;
> -	__cpu_up_task_pointer[cpu] = tidle;
> +	WRITE_ONCE(__cpu_up_stack_pointer[cpu], task_stack_page(tidle) + THREAD_SIZE);
> +	WRITE_ONCE(__cpu_up_task_pointer[cpu], tidle);

This looks unrelated.

> @@ -100,7 +101,7 @@ asmlinkage void __init smp_callin(void)
>  	struct mm_struct *mm = &init_mm;
>  
>  	/* All kernel threads share the same mm context.  */
> -	atomic_inc(&mm->mm_count);
> +	mmgrab(mm);
>  	current->active_mm = mm;

This part looks fine to me:

Reviewed-by: Christoph Hellwig <hch@....de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ