From: Dan Li <ashimida.1990@gmail.com>
To: Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Nick Desaulniers <ndesaulniers@google.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>,
Kees Cook <keescook@chromium.org>,
Nathan Chancellor <nathan@kernel.org>, Tom Rix <trix@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Marco Elver <elver@google.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Song Liu <song@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Uros Bizjak <ubizjak@gmail.com>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Juergen Gross <jgross@suse.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Borislav Petkov <bp@suse.de>,
Masami Hiramatsu <mhiramat@kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Aaron Tomlin <atomlin@redhat.com>,
Kalesh Singh <kaleshsingh@google.com>,
Yuntao Wang <ytcoode@gmail.com>,
Changbin Du <changbin.du@intel.com>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev,
linux-hardening@vger.kernel.org
Subject: Re: [RFC/RFT] CFI: Add support for gcc CFI in aarch64
Date: Sun, 18 Dec 2022 22:38:09 -0800 [thread overview]
Message-ID: <20221219063809.xgd6jjio4f7j5ysw@ubuntu> (raw)
In-Reply-To: <20221219061758.23321-1-ashimida.1990@gmail.com>
+ Cc: linux-hardening@vger.kernel.org
On 12/18, Dan Li wrote:
> Based on Sami's patch[1], this patch makes the corresponding kernel
> configuration of CFI available when compiling the kernel with the gcc[2].
>
> The code after enabling cfi is as follows:
>
> int (*p)(void);
> int func (int)
> {
> p();
> }
>
> __cfi_func:
> .4byte 0x439d3502
> func:
> ......
> adrp x0, p
> add x0, x0, :lo12:p
> mov w1, 23592
> movk w1, 0x4601, lsl 16
> cmp w0, w1
> beq .L2
> ......
> bl cfi_check_failed
> .L2:
> blr x19
> ret
>
> In the compiler part[4], there are some differences from Sami's
> implementation[3], mainly including:
next prev parent reply other threads:[~2022-12-19 6:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 6:17 [RFC/RFT] CFI: Add support for gcc CFI in aarch64 Dan Li
2022-12-19 6:38 ` Dan Li [this message]
2022-12-19 10:40 ` Peter Zijlstra
2022-12-19 13:32 ` Dan Li
2022-12-19 15:04 ` Peter Zijlstra
2022-12-19 23:38 ` Dan Li
2023-01-03 8:55 ` Mark Rutland
2023-01-07 3:36 ` Kees Cook
2023-01-07 15:42 ` Dan Li
2023-02-08 19:35 ` Kees Cook
2023-02-10 16:14 ` Dan Li
2023-01-03 8:53 ` Mark Rutland
2023-01-07 15:37 ` Dan Li
2023-03-25 8:54 ` [RFC/RFT,V2] " Dan Li
2023-03-27 9:30 ` Peter Zijlstra
2023-03-27 22:17 ` Sami Tolvanen
2023-04-05 11:49 ` Dan Li
2023-12-13 8:48 ` Dan Li
[not found] ` <4a84af95-6270-6764-6a40-875ec20fc3e1@lixiang.com>
2023-12-13 14:45 ` Mark Rutland
2023-12-13 19:35 ` Kees Cook
2023-04-05 11:48 ` Dan Li
2023-12-13 8:28 ` [RFC/RFT] " Dan Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221219063809.xgd6jjio4f7j5ysw@ubuntu \
--to=ashimida.1990@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=atomlin@redhat.com \
--cc=bp@suse.de \
--cc=catalin.marinas@arm.com \
--cc=changbin.du@intel.com \
--cc=christophe.leroy@csgroup.eu \
--cc=dmitry.torokhov@gmail.com \
--cc=ebiederm@xmission.com \
--cc=elver@google.com \
--cc=frederic@kernel.org \
--cc=jgross@suse.com \
--cc=jpoimboe@kernel.org \
--cc=kaleshsingh@google.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mark.rutland@arm.com \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.org \
--cc=memxor@gmail.com \
--cc=mhiramat@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=samitolvanen@google.com \
--cc=song@kernel.org \
--cc=trix@redhat.com \
--cc=ubizjak@gmail.com \
--cc=will@kernel.org \
--cc=ytcoode@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).