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: <be48adb2-c838-1a9b-37bc-da783f3d5dd3@nokia.com>
Date:   Mon, 12 Apr 2021 08:28:19 +0200
From:   Alexander Sverdlin <alexander.sverdlin@...ia.com>
To:     Qais Yousef <qais.yousef@....com>
Cc:     linux-arm-kernel@...ts.infradead.org,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>,
        Russell King <linux@...linux.org.uk>,
        Florian Fainelli <f.fainelli@...il.com>,
        linux-kernel@...r.kernel.org,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v8 0/3] ARM: Implement MODULE_PLT support in FTRACE

Hi!

On 09/04/2021 17:33, Qais Yousef wrote:
> I still think the ifdefery in patch 3 is ugly. Any reason my suggestion didn't
> work out for you? I struggle to see how this is better and why it was hard to
> incorporate my suggestion.
> 
> For example
> 
> 	-       old = ftrace_call_replace(ip, adjust_address(rec, addr));
> 	+#ifdef CONFIG_ARM_MODULE_PLTS
> 	+       /* mod is only supplied during module loading */
> 	+       if (!mod)
> 	+               mod = rec->arch.mod;
> 	+       else
> 	+               rec->arch.mod = mod;
> 	+#endif
> 	+
> 	+       old = ftrace_call_replace(ip, aaddr,
> 	+                                 !IS_ENABLED(CONFIG_ARM_MODULE_PLTS) || !mod);
> 	+#ifdef CONFIG_ARM_MODULE_PLTS
> 	+       if (!old && mod) {
> 	+               aaddr = get_module_plt(mod, ip, aaddr);
> 	+               old = ftrace_call_replace(ip, aaddr, true);
> 	+       }
> 	+#endif
> 	+
> 
> There's an ifdef, followed by a code that embeds
> !IS_ENABLED(CONFIG_ARM_MODULE_PLTS) followed by another ifdef :-/

No, it's actually two small ifdefed blocks added before and after an original call,
which parameters have been modified as well. The issue with arch.mod was explained
by Steven Rostedt, maybe you've missed his email.
 
> And there was no need to make the new warn arg visible all the way to
> ftrace_call_repalce() and all of its users.
> 
> FWIW
> 
> Tested-by: Qais Yousef <qais.yousef@....com>
-- 
Best regards,
Alexander Sverdlin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ