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: <14dbd6be-05be-e98c-3a2d-922fb0b8cb72@linux.vnet.ibm.com>
Date:   Mon, 29 Aug 2022 20:09:08 +0530
From:   Sathvika Vasireddy <sv@...ux.vnet.ibm.com>
To:     Christophe Leroy <christophe.leroy@...roup.eu>,
        Sathvika Vasireddy <sv@...ux.ibm.com>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
Cc:     "jpoimboe@...hat.com" <jpoimboe@...hat.com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "aik@...abs.ru" <aik@...abs.ru>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "mbenes@...e.cz" <mbenes@...e.cz>,
        "npiggin@...il.com" <npiggin@...il.com>,
        "chenzhongjin@...wei.com" <chenzhongjin@...wei.com>,
        "naveen.n.rao@...ux.vnet.ibm.com" <naveen.n.rao@...ux.vnet.ibm.com>
Subject: Re: [PATCH v2 02/16] powerpc: override __ALIGN() and __ALIGN_STR()
 macros

Hi Christophe,

On 29/08/22 18:56, Christophe Leroy wrote:
>
> Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
>> Powerpc instructions must be word-aligned. Currently,
>> there is an alignment of 16 bytes (by default), and it is
>> much more than what is required for powerpc (4 bytes).
>>
>> The default expansion of __ALIGN() macro is:
>> #define __ALIGN       .align 4,0x90
>>
>> Since Powerpc Linux does not require a 16 byte alignment,
>> override __ALIGN() and __ALIGN_STR() macros to use required
>> 4 byte alignment.
>>
>> Signed-off-by: Sathvika Vasireddy <sv@...ux.ibm.com>
>> ---
>>    arch/powerpc/include/asm/linkage.h | 4 ++++
>>    1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/powerpc/include/asm/linkage.h b/arch/powerpc/include/asm/linkage.h
>> index b71b9582e754..8df88fe61438 100644
>> --- a/arch/powerpc/include/asm/linkage.h
>> +++ b/arch/powerpc/include/asm/linkage.h
>> @@ -2,8 +2,12 @@
>>    #ifndef _ASM_POWERPC_LINKAGE_H
>>    #define _ASM_POWERPC_LINKAGE_H
>>    
>> +#include <linux/stringify.h>
>>    #include <asm/types.h>
>>    
>> +#define __ALIGN			.align 2
>> +#define __ALIGN_STR		__stringify(__ALIGN)
>> +
> I still can't see the added value of using __stringify() macro here. In
> order to use that macro you have to include linux/stringify.h . Usually
> we try to minimise the amount of headers required by other headers.
Oh ok, makes sense to me. I'll wait for a day to see if there are any
other comments, and make this change as part of v3.

Thanks for reviewing!

- Sathvika

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ