|
Message-ID: <ee1a5921-c151-33a9-bdac-c5d039a94bdc@linux.com> Date: Fri, 12 Jun 2020 02:45:00 +0300 From: Alexander Popov <alex.popov@...ux.com> To: Kees Cook <keescook@...omium.org> Cc: Emese Revfy <re.emese@...il.com>, Miguel Ojeda <miguel.ojeda.sandonis@...il.com>, Masahiro Yamada <masahiroy@...nel.org>, Michal Marek <michal.lkml@...kovi.net>, Andrew Morton <akpm@...ux-foundation.org>, Masahiro Yamada <yamada.masahiro@...ionext.com>, Thiago Jung Bauermann <bauerman@...ux.ibm.com>, Luis Chamberlain <mcgrof@...nel.org>, Jessica Yu <jeyu@...nel.org>, Sven Schnelle <svens@...ckframe.org>, Iurii Zaikin <yzaikin@...gle.com>, Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>, Vincenzo Frascino <vincenzo.frascino@....com>, Thomas Gleixner <tglx@...utronix.de>, Peter Collingbourne <pcc@...gle.com>, Naohiro Aota <naohiro.aota@....com>, Alexander Monakov <amonakov@...ras.ru>, Mathias Krause <minipli@...glemail.com>, PaX Team <pageexec@...email.hu>, Brad Spengler <spender@...ecurity.net>, Laura Abbott <labbott@...hat.com>, Florian Weimer <fweimer@...hat.com>, kernel-hardening@...ts.openwall.com, linux-kbuild@...r.kernel.org, x86@...nel.org, linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, gcc@....gnu.org, notify@...nel.org Subject: Re: [PATCH 2/5] gcc-plugins/stackleak: Use asm instrumentation to avoid useless register saving On 10.06.2020 23:03, Kees Cook wrote: > On Wed, Jun 10, 2020 at 06:47:14PM +0300, Alexander Popov wrote: >> On 09.06.2020 21:46, Kees Cook wrote: >> The inline asm statement that is used for instrumentation is arch-specific. >> Trying to add >> asm volatile("call stackleak_track_stack") >> in gcc plugin on aarch64 makes gcc break spectacularly. > > Ah! Thank you, that eluded my eyes. :) > >> I pass the target arch name to the plugin and check it explicitly to avoid that. >> >> Moreover, I'm going to create a gcc enhancement request for supporting >> no_caller_saved_registers attribute on aarch64. > > For arm64 right now it looks like the plugin will just remain > "inefficient" in these cleanup, as before, yes? Yes, for arm64 the instrumentation didn't change in this patch series. I checked the disasm and see the similar issue with useless register saving. I'm going to add asm instrumentation for arm64 when (I hope) the no_caller_saved_registers attribute becomes available for that platform. Best regards, Alexander
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.