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:   Fri, 2 Dec 2016 16:56:48 +0530
From:   Hari Bathini <hbathini@...ux.vnet.ibm.com>
To:     Dave Young <dyoung@...hat.com>
Cc:     linux-kernel@...r.kernel.org, fenghua.yu@...el.com,
        tony.luck@...el.com, linux-ia64@...r.kernel.org,
        kexec@...ts.infradead.org, linuxppc-dev@...ts.ozlabs.org,
        ebiederm@...ssion.com, Michael Ellerman <mpe@...erman.id.au>,
        vgoyal@...hat.com
Subject: Re: [PATCH v2 2/5] ia64: reuse append_elf_note() and final_note()
 functions

Hi Dave,


Thanks for the review.


On Thursday 01 December 2016 10:26 AM, Dave Young wrote:
> Hi Hari
>
> Personally I like V1 more, but split the patch 2 is easier for ia64
> people to reivew.  I did basic x86 testing, it runs ok.
>
> On 11/25/16 at 05:24pm, Hari Bathini wrote:
>> Get rid of multiple definitions of append_elf_note() & final_note()
>> functions. Reuse these functions compiled under CONFIG_CRASH_CORE.
>>
>> Signed-off-by: Hari Bathini <hbathini@...ux.vnet.ibm.com>
>> ---
>>   arch/ia64/kernel/crash.c   |   22 ----------------------
>>   include/linux/crash_core.h |    4 ++++
>>   kernel/crash_core.c        |    6 +++---
>>   kernel/kexec_core.c        |   28 ----------------------------
>>   4 files changed, 7 insertions(+), 53 deletions(-)
>>
>> diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
>> index 2955f35..75859a0 100644
>> --- a/arch/ia64/kernel/crash.c
>> +++ b/arch/ia64/kernel/crash.c
>> @@ -27,28 +27,6 @@ static int kdump_freeze_monarch;
>>   static int kdump_on_init = 1;
>>   static int kdump_on_fatal_mca = 1;
>>   
>> -static inline Elf64_Word
>> -*append_elf_note(Elf64_Word *buf, char *name, unsigned type, void *data,
>> -		size_t data_len)
>> -{
>> -	struct elf_note *note = (struct elf_note *)buf;
>> -	note->n_namesz = strlen(name) + 1;
>> -	note->n_descsz = data_len;
>> -	note->n_type   = type;
>> -	buf += (sizeof(*note) + 3)/4;
>> -	memcpy(buf, name, note->n_namesz);
>> -	buf += (note->n_namesz + 3)/4;
>> -	memcpy(buf, data, data_len);
>> -	buf += (data_len + 3)/4;
>> -	return buf;
>> -}
>> -
>> -static void
>> -final_note(void *buf)
>> -{
>> -	memset(buf, 0, sizeof(struct elf_note));
>> -}
>> -
> The above IA64 version looks better than the functions in kexec_core.c
> about the Elf64_Word type usage and the simpler final_note function.

Hmmm.. Is void* better over Elf64_Word* to be agnostic of Elf32 or Elf64 
type?


> Care to update crash_core.c to use this instead?

Sure. Will resend.

Thanks
Hari

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ