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:   Wed, 04 Mar 2020 02:10:29 -0800
From:   hpa@...or.com
To:     Peter Zijlstra <peterz@...radead.org>
CC:     Alexey Dobriyan <adobriyan@...il.com>, rjw@...ysocki.net,
        lenb@...nel.org, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, luto@...nel.org, x86@...nel.org,
        linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org
Subject: Re: [PATCH] x86/acpi: make "asmlinkage" part first thing in the function definition

On March 4, 2020 2:04:38 AM PST, Peter Zijlstra <peterz@...radead.org> wrote:
>On Wed, Mar 04, 2020 at 12:54:09AM -0800, hpa@...or.com wrote:
>> On March 3, 2020 12:41:44 PM PST, Alexey Dobriyan
><adobriyan@...il.com> wrote:
>> >g++ insists that function declaration must start with extern "C"
>> >(which asmlinkage expands to).
>> >
>> >gcc doesn't care.
>> >
>> >Signed-off-by: _Z6Alexeyv <adobriyan@...il.com>
>> >---
>> >
>> > arch/x86/kernel/acpi/sleep.c |    2 +-
>> > arch/x86/kernel/acpi/sleep.h |    2 +-
>> > 2 files changed, 2 insertions(+), 2 deletions(-)
>> >
>> >--- a/arch/x86/kernel/acpi/sleep.c
>> >+++ b/arch/x86/kernel/acpi/sleep.c
>> >@@ -43,7 +43,7 @@ unsigned long acpi_get_wakeup_address(void)
>> >  *
>> >  * Wrapper around acpi_enter_sleep_state() to be called by
>assmebly.
>> >  */
>> >-acpi_status asmlinkage __visible x86_acpi_enter_sleep_state(u8
>state)
>> >+asmlinkage acpi_status __visible x86_acpi_enter_sleep_state(u8
>state)
>> > {
>> > 	return acpi_enter_sleep_state(state);
>> > }
>> >--- a/arch/x86/kernel/acpi/sleep.h
>> >+++ b/arch/x86/kernel/acpi/sleep.h
>> >@@ -19,4 +19,4 @@ extern void do_suspend_lowlevel(void);
>> > 
>> > extern int x86_acpi_suspend_lowlevel(void);
>> > 
>> >-acpi_status asmlinkage x86_acpi_enter_sleep_state(u8 state);
>> >+asmlinkage acpi_status x86_acpi_enter_sleep_state(u8 state);
>> 
>> Are you building the kernel with C++?!
>
>He is :-) IIRC he's got a whole bunch of patches that removes all the
>C++ keywords from the kernel.

I'm genuinely curious: I have heard it says that gcc is something like 10x slower in C++ mode even for what is otherwise basically C code (i.e. no templates etc.)

Does that match observations?
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ