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>] [day] [month] [year] [list]
Message-ID: <54A686E6.1040105@imgtec.com>
Date:	Fri, 2 Jan 2015 11:54:14 +0000
From:	James Hogan <james.hogan@...tec.com>
To:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
CC:	Ralf Baechle <ralf@...ux-mips.org>,
	Markos Chandras <markos.chandras@...tec.com>,
	Paul Burton <paul.burton@...tec.com>,
	"Leonid Yegoshin" <Leonid.Yegoshin@...tec.com>,
	John Crispin <blogic@...nwrt.org>, <linux-mips@...ux-mips.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arch: mips: kernel: traps: Remove some unused functions

On 02/01/15 11:20, Rickard Strandqvist wrote:
> 2015-01-02 11:38 GMT+01:00 James Hogan <james.hogan@...tec.com
> <mailto:james.hogan@...tec.com>>:
> 
>     On 01/01/15 17:48, Rickard Strandqvist wrote:
>     > Removes some functions that are not used anywhere:
>     > do_bp() do_ftlb() do_dsp() do_mcheck() do_mdmx() do_msa() do_msa_fpe()
>     >
>     > This was partially found by using a static code analysis program called cppcheck.
> 
>     To elaborate on Leonid's comment, These functions are used from
>     arch/mips/kernel/genex.S. See BUILD_HANDLER assembly macro. Each one
>     builds a handle_* assembly function which saves appropriate exception
>     state and calls do_*() with return address pointing to
>     ret_from_exception. The handle_* functions are set as handlers for
>     various exceptions by set_except_vector() in arch/mips/kernel/traps.c.
> 
> Hi
> 
> Nope no New Years joke, did not even know they were something that
> occurred:)
> 
> My tests before submitting a patch is to search through the entire
> kernel after function name, see if it seems reasonable, Delete and test
> build three times as allyesconfig allmodconfig allnoconfig.
> 
> Is not mips a port of these build?

If you built on a PC then you probably would have built x86_64 kernel
images which wouldn't have used any code in arch/ except arch/x86/. To
build for another architecture you need a cross compiler, and use e.g.
ARCH=mips CROSS_COMPILE=/path/to/your/mips-linux- on your make command
line, both for the *config target and for the build itself.

In any case your best bet to know whether a source file is actually
built by the configuration (e.g. for the platform specific code you're
touching in other patches) is to check whether a corresponding .o file
is created by the build or use something like #error. Kernels are
generally built for a single platform on MIPS at the moment rather than
all of them.

You may find the following link useful to quickly get cross compilers
for different architectures:

https://www.kernel.org/pub/tools/crosstool/

Cheers
James

> 
> Kind regards
> Rickard Strandqvist


Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ