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: <fd0cb783-b07f-f636-04a8-d8a115de1a17@suse.cz>
Date:   Wed, 22 Mar 2017 13:06:54 +0100
From:   Jiri Slaby <jslaby@...e.cz>
To:     Pavel Machek <pavel@....cz>
Cc:     mingo@...hat.com, tglx@...utronix.de, hpa@...or.com,
        x86@...nel.org, jpoimboe@...hat.com, linux-kernel@...r.kernel.org,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>,
        xen-devel@...ts.xenproject.org,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <len.brown@...el.com>, linux-pm@...r.kernel.org
Subject: Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START for
 data

Hi,

On 03/21/2017, 03:08 PM, Pavel Machek wrote:
>> -ENTRY(saved_rbp)	.quad	0
>> -ENTRY(saved_rsi)	.quad	0
>> -ENTRY(saved_rdi)	.quad	0
>> -ENTRY(saved_rbx)	.quad	0
>> +SYM_DATA_START(saved_rbp)		.quad	0
>> +SYM_DATA_START(saved_rsi)		.quad	0
>> +SYM_DATA_START(saved_rdi)		.quad	0
>> +SYM_DATA_START(saved_rbx)		.quad	0
> 
> Does it make sense to call it SYM_DATA_*START* when there's no
> corresponding end?
> 
> Plus... it looks like saved_rsi (and friends) are only used inside
> wakeup_64.S. Could we just delete the "ENTRY" annotations?


So, now I have:

=== linkage.h ===

/* SYM_DATA_SIMPLE -- start+end wrapper around simple global data */
#ifndef SYM_DATA_SIMPLE
#define SYM_DATA_SIMPLE(name, data)                             \
        SYM_DATA_START(name) ASM_NL                             \
        data ASM_NL                                             \
        SYM_DATA_END(name)
#endif

/* SYM_DATA_SIMPLE_LOCAL -- start+end wrapper around simple local data */
#ifndef SYM_DATA_SIMPLE_LOCAL
#define SYM_DATA_SIMPLE_LOCAL(name, data)                       \
        SYM_DATA_START_LOCAL(name) ASM_NL                       \
        data ASM_NL                                             \
        SYM_DATA_END(name)
#endif

=== wakeup_64.S ===

SYM_DATA_SIMPLE_LOCAL(saved_rbp, .quad 0)
SYM_DATA_SIMPLE_LOCAL(saved_rsi, .quad 0)
SYM_DATA_SIMPLE_LOCAL(saved_rdi, .quad 0)
SYM_DATA_SIMPLE_LOCAL(saved_rbx, .quad 0)

SYM_DATA_SIMPLE_LOCAL(saved_rip, .quad 0)
SYM_DATA_SIMPLE_LOCAL(saved_rsp, .quad 0)

SYM_DATA_SIMPLE_LOCAL(saved_magic, .quad 0)

=== original ===

    10: 0000000000000060     0 NOTYPE  GLOBAL DEFAULT    3 saved_magic
    11: 0000000000000050     0 NOTYPE  GLOBAL DEFAULT    3 saved_rsp
    12: 0000000000000030     0 NOTYPE  GLOBAL DEFAULT    3 saved_rbx
    13: 0000000000000020     0 NOTYPE  GLOBAL DEFAULT    3 saved_rdi
    14: 0000000000000010     0 NOTYPE  GLOBAL DEFAULT    3 saved_rsi
    15: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    3 saved_rbp
    16: 0000000000000040     0 NOTYPE  GLOBAL DEFAULT    3 saved_rip

=== new ===

     4: 0000000000000030     8 OBJECT  LOCAL  DEFAULT    3 saved_magic
     6: 0000000000000028     8 OBJECT  LOCAL  DEFAULT    3 saved_rsp
     7: 0000000000000018     8 OBJECT  LOCAL  DEFAULT    3 saved_rbx
     8: 0000000000000010     8 OBJECT  LOCAL  DEFAULT    3 saved_rdi
     9: 0000000000000008     8 OBJECT  LOCAL  DEFAULT    3 saved_rsi
    10: 0000000000000000     8 OBJECT  LOCAL  DEFAULT    3 saved_rbp
    11: 0000000000000020     8 OBJECT  LOCAL  DEFAULT    3 saved_rip

=== EOF ===

BTW, ENTRY() aligned the data to 2^4 = 16 as we can see in the original.
But I see no point aligning data like this.

thanks,
-- 
js
suse labs



Download attachment "signature.asc" of type "application/pgp-signature" (855 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ