linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Elliot Berman <quic_eberman@quicinc.com>
Cc: Sami Tolvanen <samitolvanen@google.com>,
	linux-kernel@vger.kernel.org,
	Jinlong Mao <jinlmao@codeaurora.org>,
	Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Subject: Re: [PATCH 1/1] cfi: Use rcu_read_{un}lock_sched_notrace
Date: Wed, 11 Aug 2021 13:10:36 -0700	[thread overview]
Message-ID: <202108111306.527943F39@keescook> (raw)
In-Reply-To: <20210811155914.19550-1-quic_eberman@quicinc.com>

On Wed, Aug 11, 2021 at 08:59:14AM -0700, Elliot Berman wrote:
> If rcu_read_lock_sched tracing is enabled, the tracing subsystem can
> perform a jump which needs to be checked by CFI. For example, stm_ftrace
> source is enabled as a module and hooks into enabled ftrace events. This
> can cause an recursive loop where find_shadow_check_fn ->
> rcu_read_lock_sched -> (call to stm_ftrace generates cfi slowpath) ->
> find_shadow_check_fn -> rcu_read_lock_sched -> ...
> 
> To avoid the recursion, either the ftrace codes needs to be marked with
> __no_cfi or CFI should not trace. Use the "_notrace" in CFI to avoid
> tracing so that CFI can guard ftrace.
> 
> Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>

Thanks for this patch! While applying it I noticed that the DKIM
signature failed. This is actually even visible in the lore archive:
https://lore.kernel.org/lkml/20210811155914.19550-1-quic_eberman@quicinc.com/raw
(DKIM_INVALID)

$ b4 am -tls https://lore.kernel.org/lkml/20210811155914.19550-1-quic_eberman@quicinc.com/
Grabbing thread from lore.kernel.org/lkml/20210811155914.19550-1-quic_eberman%40quicinc.com/t.mbox.gz
Analyzing 2 messages in the thread
Checking attestation on all messages, may take a moment...
---
  ✗ [PATCH 1/1] cfi: Use rcu_read_{un}lock_sched_notrace
    + Reviewed-by: Sami Tolvanen <samitolvanen@google.com> (✓ DKIM/google.com)
    + Signed-off-by: Kees Cook <keescook@chromium.org>
    + Link: https://lore.kernel.org/r/20210811155914.19550-1-quic_eberman@quicinc.com
  ---
  ✗ BADSIG: DKIM/quicinc.com



Do you know if qualcomm is mangling outbound emails? (i.e. was the
trailing body suffix added after calculating the DKIM signature?)

Thanks!

-Kees

-- 
Kees Cook

  parent reply	other threads:[~2021-08-11 20:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 15:59 [PATCH 1/1] cfi: Use rcu_read_{un}lock_sched_notrace Elliot Berman
2021-08-11 16:12 ` Sami Tolvanen
2021-08-11 20:10 ` Kees Cook [this message]
2021-08-11 20:28   ` Konstantin Ryabitsev
2021-08-13  3:33   ` Elliot Berman

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=202108111306.527943F39@keescook \
    --to=keescook@chromium.org \
    --cc=jinlmao@codeaurora.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_eberman@quicinc.com \
    --cc=samitolvanen@google.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).