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: <Y7v2j92Ol6dL3FLE@zn.tnic>
Date:   Mon, 9 Jan 2023 12:12:15 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Jan Dąbroś <jsd@...ihalf.com>,
        "Limonciello, Mario" <mario.limonciello@....com>
Cc:     Borislav Petkov <bp@...e.de>, Hans de Goede <hdegoede@...hat.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
        jarkko.nikula@...ux.intel.com, wsa@...nel.org,
        rrangel@...omium.org, upstream@...ihalf.com,
        Muralidhara M K <muralimk@....com>,
        Naveen Krishna Chatradhi <nchatrad@....com>,
        Yazen Ghannam <yazen.ghannam@....com>
Subject: Re: [PATCH -next 1/2] i2c: designware: Switch from using MMIO access
 to SMN access

Another forgotten thread... ;-\

+ Yazen.

On Fri, Oct 28, 2022 at 10:32:20AM +0200, Jan Dąbroś wrote:
> So to summarize everything, I would like below order:
> 
> acpi_init() -> init_amd_nbs() -> dw_i2c_init_driver()
> ^--subsys_initcall   ^--fs_initicall            ^--subsys_initcall
> 
> but I don't have a clear idea how to achieve this in a clean way.
> 
> The only option seems to be to register init_amd_nbs() as
> subsys_initcall and force it to execute after acpi_init() and before
> dw_i2c_init_drvier(). However the only option (if I'm not mistaken)
> for forcing order on initcalls placed on the same level is to modify
> their order within Makefile, so that linker puts them in the "init"
> section with addresses in desired order. This doesn't seem to be an
> option for upstream.
> 
> Do you have any clue how to solve this problem?

Make init_amd_nbs() arch_initcall_sync() so that it executes after PCI init.

By the time subsys_initcalls come, they'll have all the facilities they need,
prepared for them...

Along with big fat comment why.

Btw, note to myself as I keep wondering about it each time: the sync calls come
after the regular ones, in link order if you look at preprocessed linker script
arch/x86/kernel/vmlinux.lds:

__initcall_start = .;
 KEEP(*(.initcallearly.init)) __initcall0_start = .;
 KEEP(*(.initcall0.init)) KEEP(*(.initcall0s.init)) __initcall1_start = .;
 KEEP(*(.initcall1.init)) KEEP(*(.initcall1s.init)) __initcall2_start = .;
 KEEP(*(.initcall2.init)) KEEP(*(.initcall2s.init)) __initcall3_start = .;
 KEEP(*(.initcall3.init)) KEEP(*(.initcall3s.init)) __initcall4_start = .;
 KEEP(*(.initcall4.init)) KEEP(*(.initcall4s.init)) __initcall5_start = .;
 KEEP(*(.initcall5.init)) KEEP(*(.initcall5s.init)) __initcallrootfs_start = .;
 KEEP(*(.initcallrootfs.init)) KEEP(*(.initcallrootfss.init)) __initcall6_start = .;
 KEEP(*(.initcall6.init)) KEEP(*(.initcall6s.init)) __initcall7_start = .;
 KEEP(*(.initcall7.init)) KEEP(*(.initcall7s.init)) __initcall_end = .;

Mario, is that something that would work for what you wanna do too?

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ