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: <eff03efa-0637-c63a-a7ee-320c490cff9d@linux.vnet.ibm.com>
Date:   Wed, 17 Jan 2018 07:45:29 +0100
From:   Frederic Barrat <fbarrat@...ux.vnet.ibm.com>
To:     Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
        Michael Ellerman <mpe@...erman.id.au>
Cc:     linuxppc-dev@...abs.org,
        Christophe Lombard <clombard@...ux.vnet.ibm.com>,
        linux-kernel@...r.kernel.org,
        Philippe Bergheaud <philippe.bergheaud@...ibm.com>
Subject: Re: [PATCH 1/2] powerpc: export thread-tidr interfaces

Hi,


> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index 2010e4c..f20c1ad 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -1560,6 +1560,7 @@ void clear_thread_tidr(struct task_struct *t)
>   	free_thread_tidr(t->thread.tidr);
>   	t->thread.tidr = 0;
>   }
> +EXPORT_SYMBOL_GPL(clear_thread_tidr);

Isn't it dangerous to export clear_thread_tidr()? Other modules may also 
have assigned the TIDR by calling set_thread_tidr(), so clearing it 
could potentially break those other modules. My understanding is that 
once the TIDR is assigned, there's no safe way to reclaim it other than 
the thread exiting. Or we would need some kind of reference counter.


>   void arch_release_task_struct(struct task_struct *t)
>   {
> @@ -1592,6 +1593,7 @@ int set_thread_tidr(struct task_struct *t)
> 
>   	return 0;
>   }
> +EXPORT_SYMBOL_GPL(set_thread_tidr);


FYI, there's a capi patch we hope to merge soon which is also doing this:
http://patchwork.ozlabs.org/patch/858935/

   Fred

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ