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:	Mon, 10 Jun 2013 22:36:57 +0900
From:	HATAYAMA Daisuke <d.hatayama@...il.com>
To:	Michael Holzheu <holzheu@...ux.vnet.ibm.com>
Cc:	Vivek Goyal <vgoyal@...hat.com>, Jan Willeke <willeke@...ibm.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	linux-kernel@...r.kernel.org, kexec@...ts.infradead.org
Subject: Re: [PATCH v5 2/5] s390/vmcore: Use ELF header in new memory feature

2013/6/8 Michael Holzheu <holzheu@...ux.vnet.ibm.com>:
<cut>
> @@ -417,27 +416,44 @@ static void s390_elf_corehdr_create(char **elfcorebuf, size_t *elfcorebuf_sz)
>         ptr = notes_init(phdr_notes, ptr, ((unsigned long) hdr) + hdr_off);
>         /* Init loads */
>         hdr_off = PTR_DIFF(ptr, hdr);
> -       loads_init(phdr_loads, ((unsigned long) hdr) + hdr_off);
> -       *elfcorebuf_sz = hdr_off;
> -       *elfcorebuf = (void *) relocate((unsigned long) hdr);
> -       BUG_ON(*elfcorebuf_sz > alloc_size);
> +       loads_init(phdr_loads, hdr_off);
> +       elfcorehdr_addr = (unsigned long long) hdr;
> +       elfcorehdr_size = (unsigned long long) hdr_off;
> +       elfcorehdr_newmem = hdr;
> +       BUG_ON(elfcorehdr_size > alloc_size);
> +       return 0;
>  }
>
>  /*
> - * Create kdump ELF core header in new kernel, if it has not been passed via
> - * the "elfcorehdr" kernel parameter
> + * Free ELF core header (new kernel)
>   */
> -static int setup_kdump_elfcorehdr(void)
> +void elfcorehdr_free(void)
>  {
> -       size_t elfcorebuf_sz;
> -       char *elfcorebuf;
> -
> -       if (!OLDMEM_BASE || is_kdump_kernel())
> -               return -EINVAL;
> -       s390_elf_corehdr_create(&elfcorebuf, &elfcorebuf_sz);
> -       elfcorehdr_addr = (unsigned long long) elfcorebuf;
> -       elfcorehdr_size = elfcorebuf_sz;
> -       return 0;
> +       if (!elfcorehdr_newmem)
> +               return;
> +       vfree(elfcorehdr_newmem);

kfree is correct here?

Thanks.
HATAYAMA, Daisuke
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ