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: <1871487377.57679.1424456276724.open-xchange@webmail.nmp.proximus.be>
Date:	Fri, 20 Feb 2015 19:17:56 +0100 (CET)
From:	Fabian Frederick <fabf@...net.be>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC 1/1 linux-next] DRIVERS: replace current->state by
 set_current_state()



> On 20 February 2015 at 09:56 Peter Zijlstra <peterz@...radead.org> wrote:
>
>
> On Thu, Feb 19, 2015 at 09:21:51PM +0100, Fabian Frederick wrote:
> > replace remaining direct access to current->state by slower
> > helper function in drivers branch.
> > Some of them could be optimized later using __set_current_state().
>
> This changelog needs help. Going by this you just make the drivers worse
> (slower).
>
> The reason for using set_current_state() is not that its slower, its
> because its actually correct; as opposed to direct assignments which are
> prone to races and therefore buggy.
>
> Also, since all were direct assignments you can immediately use
> __set_current_state() for TASK_RUNNING; code will not be broken more by
> that and relying on the barrier for TASK_RUNNING is obscure and rare
> anyhow.
>
> So sure, the idea is good, but please, write a coherent changelog to go
> with it.

Thanks a lot for explanation Peter, I meant set_current_state was slower than
__set_current_state. I hope changelog is ok in the patchset.
 
Regards,
Fabian
--
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