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: <20170831140332.GD23750@n2100.armlinux.org.uk>
Date:   Thu, 31 Aug 2017 15:03:32 +0100
From:   Russell King - ARM Linux <linux@...linux.org.uk>
To:     Dave Gerlach <d-gerlach@...com>
Cc:     Rob Herring <robh+dt@...nel.org>, Tony Lindgren <tony@...mide.com>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, linux-omap@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        Keerthy J <j-keerthy@...com>, Johan Hovold <johan@...nel.org>
Subject: Re: [PATCH v3 2/2] memory: ti-emif-sram: introduce relocatable
 suspend/resume handlers

On Mon, Jul 24, 2017 at 04:24:54PM -0500, Dave Gerlach wrote:
> diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
> index 608008229c7d..46a7a6c41db7 100644
> --- a/arch/arm/kernel/asm-offsets.c
> +++ b/arch/arm/kernel/asm-offsets.c
> @@ -28,6 +28,7 @@
>  #include <asm/vdso_datapage.h>
>  #include <asm/hardware/cache-l2x0.h>
>  #include <linux/kbuild.h>
> +#include <linux/ti-emif-sram.h>
>  
>  /*
>   * Make sure that the compiler and target are compatible.
> @@ -183,5 +184,8 @@ int main(void)
>  #ifdef CONFIG_VDSO
>    DEFINE(VDSO_DATA_SIZE,	sizeof(union vdso_data_store));
>  #endif
> +  BLANK();
> +  ti_emif_offsets();
> +
>    return 0; 
>  }

This doesn't make me happy - I've been thinking about this for some time,
and I think it's completely wrong for drivers to hook into asm-offsets.

Looking at the top-level Kbuild file, it looks like it would be easy
for emif to auto-generate its own offsets.h header - it looks like it's
a matter of using linux/kbuild.h to get the definitions, compiling to
assembly (using $(call if_changed_dep,cc_s_c)) and then converting the
assembly to the header file format ( using
$(call filechk,offsets,__ASM_OFFSETS_H__), replacing __ASM_OFFSETS_H__
with a more appropriate symbol.)

Could you please check whether this is possible, so we don't end up
needing to hook lots of driver-specific assembly offsets stuff into
the arch files?

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ