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] [day] [month] [year] [list]
Date:	Wed, 16 Dec 2009 13:07:44 +0900 (JST)
From:	Daisuke HATAYAMA <d.hatayama@...fujitsu.com>
To:	mhiramat@...hat.com
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	jdike@...toit.com, tony.luck@...el.com
Subject: Re: [RFC, PATCH 1/4] cleanup elf_core_dump(): remove
 ELF_CORE_EXTRA_* macro

From: Masami Hiramatsu <mhiramat@...hat.com>
Subject: Re: [RFC, PATCH 1/4] cleanup elf_core_dump(): remove ELF_CORE_EXTRA_* macro
Date: Tue, 15 Dec 2009 10:14:21 -0500

> Daisuke HATAYAMA wrote:
> > elf_core_dump() uses #ifdef and the corresponding macro for hiding
> > _multiline_ logics in functions. This patch removes #ifdef and
> > replaces ELF_CORE_EXTRA_* by corresponding functions. For
> > architectures not implemeonting ELF_CORE_EXTRA_*, we use weak
> > functions in order to reduce a range of modification.
> > 
> > This cleanup is for my next patches, but I think this cleanup itself
> > is worth doing regardless of my firnal purpose.
> > 
> > Signed-off-by: Daisuke HATAYAMA <d.hatayama@...fujitsu.com>
> > ---
> >  arch/ia64/kernel/Makefile  |    2 +
> >  arch/ia64/kernel/elfcore.c |   75 ++++++++++++++++++++++++++++++++++++++++++
> >  arch/um/sys-i386/Makefile  |    2 +
> >  arch/um/sys-i386/elfcore.c |   78 ++++++++++++++++++++++++++++++++++++++++++++
> >  fs/binfmt_elf.c            |   36 +++++++++++++++-----
> >  include/linux/elf.h        |    2 +
> 

> Hmm, why don't you remove ELF_CORE_EXTRA_* macros too??
> And also, you have to update fs/binfmt_elf_fdpic.c too.
> 
> Thank you,

The reason relates to the fact that elf_core_extra_* functions for
architectures with no extra data are defined as the weak ones. As I've
written in the patch description, they are useful to reduce a range of
modification.

If I modify fs/binfmt_elf.c, I need to prepare another file in order
for binfmt_elf{,_fdpic}.c to share the weak functions. (Now the week
functions are defined in fs/binfmt_elf.c.)

The problem is that I don't know where to put new file elfcore.c for
weak functions. I am not familiar with such convension.

For example, is it right to put fs/elfcore.c or kernel/elfcore.c?

Thanks.
--
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