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: <b339dc02-390d-b896-5b80-ebe5f08525e8@suse.cz>
Date:   Fri, 6 Sep 2019 09:43:17 +0200
From:   Jiri Slaby <jslaby@...e.cz>
To:     Borislav Petkov <bp@...en8.de>
Cc:     tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
        x86@...nel.org, linux-arch@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 04/28] x86/asm/entry: annotate THUNKs

On 15. 08. 19, 14:43, Borislav Petkov wrote:
> On Thu, Aug 08, 2019 at 12:38:30PM +0200, Jiri Slaby wrote:
>> Place SYM_*_START_NOALIGN and SYM_*_END around the THUNK macro body.
>> Preserve @function by FUNC (64bit) and CODE (32bit). Given it was not
>> marked as aligned, use NOALIGN.
>>
>> The common tail .L_restore is put inside SYM_CODE_START_LOCAL_NOALIGN
>> and SYM_CODE_END too.
> 
> What is that needed for? It is a local label...
> 
>> The result:
>>  Value  Size Type    Bind   Vis      Ndx Name
>>   0000    28 FUNC    GLOBAL DEFAULT    1 trace_hardirqs_on_thunk
>>   001c    28 FUNC    GLOBAL DEFAULT    1 trace_hardirqs_off_thunk
>>   0038    24 FUNC    GLOBAL DEFAULT    1 lockdep_sys_exit_thunk
>>   0050    24 FUNC    GLOBAL DEFAULT    1 ___preempt_schedule
>>   0068    24 FUNC    GLOBAL DEFAULT    1 ___preempt_schedule_notra
> 
> No difference except alignment:

Yeah, alignment is one and visual effect the other. One can immediately
see where it starts and where it ends -- readability. There is no other
functional meaning, so I don't mind not annotating it. It's your call. So?

before:

#if defined(CONFIG_TRACE_IRQFLAGS) \
 || defined(CONFIG_DEBUG_LOCK_ALLOC) \
 || defined(CONFIG_PREEMPTION)
.L_restore:
        popq %r11
        popq %r10
        popq %r9
        popq %r8
        popq %rax
        popq %rcx
        popq %rdx
        popq %rsi
        popq %rdi
        popq %rbp
        ret
        _ASM_NOKPROBE(.L_restore)
#endif

after:
#if defined(CONFIG_TRACE_IRQFLAGS) \
 || defined(CONFIG_DEBUG_LOCK_ALLOC) \
 || defined(CONFIG_PREEMPTION)
SYM_CODE_START_LOCAL_NOALIGN(.L_restore)
        popq %r11
        popq %r10
        popq %r9
        popq %r8
        popq %rax
        popq %rcx
        popq %rdx
        popq %rsi
        popq %rdi
        popq %rbp
        ret
        _ASM_NOKPROBE(.L_restore)
SYM_CODE_END(.L_restore)
#endif


thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ