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]
Message-ID: <87a5q3bmr9.fsf@BL-laptop>
Date: Thu, 21 Dec 2023 16:26:02 +0100
From: Gregory CLEMENT <gregory.clement@...tlin.com>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: Paul Burton <paulburton@...nel.org>, linux-mips@...r.kernel.org, Jiaxun
 Yang <jiaxun.yang@...goat.com>, Rob Herring <robh+dt@...nel.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, Vladimir
 Kondratiev <vladimir.kondratiev@...ileye.com>, Tawfik Bayouk
 <tawfik.bayouk@...ileye.com>, Alexandre Belloni
 <alexandre.belloni@...tlin.com>, Théo Lebrun
 <theo.lebrun@...tlin.com>,
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v5 00/22] Add support for the Mobileye EyeQ5 SoC

Thomas Bogendoerfer <tsbogend@...ha.franken.de> writes:

> On Thu, Dec 21, 2023 at 08:57:55AM +0100, Gregory CLEMENT wrote:
>> I do not oppose the addition of a new platform, even though, like
>> Jiaxun, I would prefer to avoid duplicating code. The only thing
>> preventing the use of the same kernel for EyeQ5 and other platforms is
>> the starting address.
>
> there shouldn't be code duplication.
>
> My rough idea would be something like

Thanks for the feedback, I am going to test it.

>
> diff --git a/arch/mips/Kbuild b/arch/mips/Kbuild
> index af2967bffb73..d683993ed331 100644
> --- a/arch/mips/Kbuild
> +++ b/arch/mips/Kbuild
> @@ -17,6 +17,7 @@ obj- := $(platform-y)
>  # mips object files
>  # The object files are linked as core-y files would be linked
>  
> +obj-y += generic/
>  obj-y += kernel/
>  obj-y += mm/
>  obj-y += net/
> diff --git a/arch/mips/generic/Makefile b/arch/mips/generic/Makefile
> index e37a59bae0a6..56011d738441 100644
> --- a/arch/mips/generic/Makefile
> +++ b/arch/mips/generic/Makefile
> @@ -4,9 +4,9 @@
>  # Author: Paul Burton <paul.burton@...s.com>
>  #
>  
> -obj-y += init.o
> -obj-y += irq.o
> -obj-y += proc.o
> +obj-$(CONFIG_MACH_GENERIC_CORE) += init.o
> +obj-$(CONFIG_MACH_GENERIC_CORE) += irq.o
> +obj-$(CONFIG_MACH_GENERIC_CORE) += proc.o
>  
>  obj-$(CONFIG_YAMON_DT_SHIM)            += yamon-dt.o
>  obj-$(CONFIG_LEGACY_BOARD_SEAD3)       += board-sead3.o
>
> so everyboady needing these parts of a generic kernel is able
> to take it.
>
>> Therefore, if it were possible to have a relocatable kernel, this
>> issue would disappear.
>
> yes. There is support for relocatable kernel, so what are we missing
> there ?

But in arch/mips/generic/Platform we have:

load-$(CONFIG_MIPS_GENERIC)    += 0xffffffff80100000

So, the load address is defined during compilation; for example, I don't
think there is such a mechanism currently for ARM. hat's what I mean by
'relocatable,' but perhaps it's not exactly what you have in mind.

Gregory

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ