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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 08 Sep 2014 14:22:57 +0100
From:	Daniel Thompson <daniel.thompson@...aro.org>
To:	Nicolas Pitre <nicolas.pitre@...aro.org>
CC:	Russell King <linux@....linux.org.uk>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	patches@...aro.org, linaro-kernel@...ts.linaro.org,
	John Stultz <john.stultz@...aro.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Sumit Semwal <sumit.semwal@...aro.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Tobias Klauser <tklauser@...tanz.ch>
Subject: Re: [PATCH v1 1/6] arm: fiq: Replace default FIQ handler

On 05/09/14 19:04, Nicolas Pitre wrote:
> On Fri, 5 Sep 2014, Daniel Thompson wrote:
> 
>> On 04/09/14 19:57, Nicolas Pitre wrote:
>>> On Thu, 4 Sep 2014, Daniel Thompson wrote:
>>>
>>>> +@ svc_exit_via_fiq - similar to svc_exit but switches to FIQ mode before exit
>>>> +@
>>>> +@ This macro acts in a similar manner to svc_exit but switches to FIQ
>>>> +@ mode to restore the final part of the register state.
>>>> +@
>>>> +@ We cannot use the normal svc_exit procedure because that would
>>>> +@ clobber spsr_svc (FIQ could be delivered during the first few instructions
>>>> +@ of vector_swi meaning its contents have not been saved anywhere).
>>>> +@
>>>
>>> Wouldn't it be better for this macro to live in entry-header.S alongside 
>>> the others?
>>
>> I'm not sure either way.
>>
>> svc_exit_from_fiq isn't needed by entry-common.S and cannot be used by
>> entry-v7m.S because v7m has no FIQ. For that reason I decided to place
>> it alongside svc_entry in entry-armv.S rather than alongside svc_exit in
>> entry-header.S .
> 
> Here's a list of macros from entry-headers.S that I don't see being used 
> in entry-v7m.S: zero_fp, alignment_trap, store_user_sp_lr, 
> load_user_sp_lr, svc_exit, ct_user_exit, ct_user_enter.

All except one of of these are consumed either by entry-common.S or by
entry-header.S itself.

svc_exit is the only exception, it is exclusively consumed by entry-armv.S.


> Yet, entry-header.S contains macros such as v7m_exception_entry and 
> v7m_exception_slow_exit which are unlikely to ever be used in 
> entry-armv.S.

Although these macros are v7m specific they are used in
conditionally compiled code within entry-common.S in order to implement
system call handlers.


>> I am happy to move it if you have a strong preference here. Please let
>> me know.
> 
> I don't have a strong preference, but a preference nevertheless.
> 
> It just looks odd that a file is already dedicated to gather all those 
> macros for similar purposes and this one is not there.  That makes 
> future code review/maintenance a bit annoying if similar things are not 
> kept in one place.

I will move the macro to entry-common.S in order to keep it alongside
its workalike function svc_exit.

That said, I do retain a (pretty weakly held) view that both these
macros might be better off moved to entry-armv.S .


--
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