lkml.org 
[lkml]   [2016]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v4 2/2] mips: Differentiate between 32 and 64 bit ELF header
    On Thu, 11 Feb 2016, Maciej W. Rozycki wrote:

    > > > Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
    > > > Suggested-by: Maciej W. Rozycki <macro@imgtec.com>
    > > > Reviewed-by: Maciej W. Rozycki <macro@imgtec.com>
    > > > Reported-by: Fengguang Wu <fengguang.wu@intel.com>
    > >
    > > Thanks, applied.
    > >
    > > I'm getting a less spectacular warning from gcc 5.2:
    > >
    > > CC fs/proc/vmcore.o
    > > fs/proc/vmcore.c: In function ‘parse_crash_elf64_headers’:
    > > fs/proc/vmcore.c:939:47: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
    >
    > Yes, the temporaries still need to have their pointed types changed, to
    > `Elf32_Ehdr' and `Elf64_Ehdr' respectively, as in the original change.
    >
    > I had it mentioned in a WIP version of my review (stating that it would
    > verify that the correct type is used by the caller), but then deleted that
    > part inadvertently, sigh.

    Hold on, I was right in dropping it actually.

    With your v4 change in place all `parse_crash_elf64_headers' is supposed
    to call is `mips_elf_check_machine' and that doesn't make any
    intialisations, it just dereferences the pointer passed once. This error
    does not make any sense to me and line 939 isn't even in
    `parse_crash_elf64_headers', which starts at line 999, it's in
    `process_ptload_program_headers_elf32'.

    So Ralf, what tree are you using that is off from LMO/Linus by 60 lines?

    BTW line 939 at LMO and in Linus's tree looks like:

    Elf32_Phdr *phdr_ptr;

    and the pointer is assigned to at line 944 like this:

    phdr_ptr = (Elf32_Phdr*)(elfptr + sizeof(Elf32_Ehdr)); /* PT_NOTE hdr */

    so this does not explain the error. I get a clean build with this version
    of Daniel's patches, both 32-bit and 64-bit, and FAOD with
    CONFIG_PROC_VMCORE=y.

    Daniel, please hold on with further updates, before this is cleared.
    Your v4 looks fine to me AFAICT, no need to change types. Sorry about
    this all confusion, something's clearly broken somewhere -- maybe due to
    someone else's unpublished patch.

    Maciej

    \
     
     \ /
      Last update: 2016-02-11 16:21    [W:3.275 / U:1.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site