public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Catalin Marinas <catalin.marinas@arm•com>, Will Deacon <will@kernel•org>
Cc: Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>,
	Mark Rutland <mark.rutland@arm•com>,
	Masami Hiramatsu <mhiramat@kernel•org>,
	"Steven Rostedt (VMware)" <rostedt@goodmis•org>
Subject: linux-next: manual merge of the arm64 tree with Linus' tree
Date: Thu, 4 Nov 2021 09:32:08 +1100	[thread overview]
Message-ID: <20211104093208.0380c1f2@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2611 bytes --]

Hi all,

Today's linux-next merge of the arm64 tree got conflicts in:

  arch/arm64/include/asm/stacktrace.h
  arch/arm64/kernel/stacktrace.c

between commit:

  cd9bc2c92588 ("arm64: Recover kretprobe modified return address in stacktrace")

from Linus' tree and commit:

  552e196d88e5 ("arm64: ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR")

from the arm64 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/arm64/include/asm/stacktrace.h
index a4e046ef4568,9a319eca5cab..000000000000
--- a/arch/arm64/include/asm/stacktrace.h
+++ b/arch/arm64/include/asm/stacktrace.h
@@@ -57,12 -53,6 +54,9 @@@ struct stackframe 
  	DECLARE_BITMAP(stacks_done, __NR_STACK_TYPES);
  	unsigned long prev_fp;
  	enum stack_type prev_type;
- #ifdef CONFIG_FUNCTION_GRAPH_TRACER
- 	int graph;
- #endif
 +#ifdef CONFIG_KRETPROBES
 +	struct llist_node *kr_cur;
 +#endif
  };
  
  extern int unwind_frame(struct task_struct *tsk, struct stackframe *frame);
diff --cc arch/arm64/kernel/stacktrace.c
index c30624fff6ac,13ea4e4a4d27..000000000000
--- a/arch/arm64/kernel/stacktrace.c
+++ b/arch/arm64/kernel/stacktrace.c
@@@ -38,12 -38,6 +38,9 @@@ void start_backtrace(struct stackframe 
  {
  	frame->fp = fp;
  	frame->pc = pc;
- #ifdef CONFIG_FUNCTION_GRAPH_TRACER
- 	frame->graph = 0;
- #endif
 +#ifdef CONFIG_KRETPROBES
 +	frame->kr_cur = NULL;
 +#endif
  
  	/*
  	 * Prime the first unwind.
@@@ -126,19 -122,14 +125,18 @@@ int notrace unwind_frame(struct task_st
  		 * to hook a function return.
  		 * So replace it to an original value.
  		 */
- 		ret_stack = ftrace_graph_get_ret_stack(tsk, frame->graph++);
- 		if (WARN_ON_ONCE(!ret_stack))
+ 		orig_pc = ftrace_graph_ret_addr(tsk, NULL, frame->pc,
+ 						(void *)frame->fp);
+ 		if (WARN_ON_ONCE(frame->pc == orig_pc))
  			return -EINVAL;
- 		frame->pc = ret_stack->ret;
+ 		frame->pc = orig_pc;
  	}
  #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
 +#ifdef CONFIG_KRETPROBES
 +	if (is_kretprobe_trampoline(frame->pc))
 +		frame->pc = kretprobe_find_ret_addr(tsk, (void *)frame->fp, &frame->kr_cur);
 +#endif
  
- 	frame->pc = ptrauth_strip_insn_pac(frame->pc);
- 
  	return 0;
  }
  NOKPROBE_SYMBOL(unwind_frame);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2021-11-03 22:32 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 22:32 Stephen Rothwell [this message]
2021-11-05  9:34 ` linux-next: manual merge of the arm64 tree with Linus' tree Will Deacon
  -- strict thread matches above, loose matches on Subject: below --
2025-11-12 22:55 Stephen Rothwell
2025-05-21  1:34 Stephen Rothwell
2025-05-21  8:40 ` Will Deacon
2023-01-24 21:36 Stephen Rothwell
2023-01-25  9:26 ` Catalin Marinas
2022-03-08 22:42 Stephen Rothwell
2022-03-09 12:20 ` Will Deacon
2022-03-08 22:38 Stephen Rothwell
2021-03-28 22:29 Stephen Rothwell
2021-03-29  9:22 ` Catalin Marinas
2020-07-26 23:18 Stephen Rothwell
2019-10-27 21:39 Stephen Rothwell
2019-10-28  8:39 ` Catalin Marinas
2019-06-24 23:31 Stephen Rothwell
2018-12-10 21:52 Stephen Rothwell
2018-12-11 10:16 ` Catalin Marinas
2018-12-06 22:18 Stephen Rothwell
2018-12-07 12:16 ` Will Deacon
2018-12-07 14:27   ` Suzuki K Poulose
2018-07-23 22:50 Stephen Rothwell
2018-07-24  9:29 ` Will Deacon
2018-01-16 22:30 Stephen Rothwell
2018-01-16 22:25 Stephen Rothwell
2018-01-14 21:32 Stephen Rothwell
2018-01-14 21:40 ` Catalin Marinas
2018-01-11 21:23 Stephen Rothwell
2018-01-12 12:25 ` Catalin Marinas
2017-10-31 20:57 Stephen Rothwell
2017-11-13  6:09 ` Stephen Rothwell
2017-11-13  9:15   ` Catalin Marinas
2017-11-13 10:38     ` Lorenzo Pieralisi
2017-10-19 11:28 Mark Brown
2017-10-19 12:50 ` Lorenzo Pieralisi
2017-08-23 23:22 Stephen Rothwell
2017-09-04  5:59 ` Stephen Rothwell
2016-11-21 23:34 Stephen Rothwell
2016-11-22 13:31 ` Catalin Marinas
2016-09-11 23:17 Stephen Rothwell
2016-09-05  1:27 Stephen Rothwell
2016-07-11  0:14 Stephen Rothwell
2016-04-28 23:59 Stephen Rothwell
2016-04-29  8:49 ` Will Deacon
2016-03-21 23:15 Stephen Rothwell
2016-03-23 11:14 ` Catalin Marinas
2016-03-06 23:48 Stephen Rothwell
2015-10-31 23:53 Stephen Rothwell
2015-11-02 10:39 ` Catalin Marinas
2015-01-26 23:45 Stephen Rothwell
2013-06-17  0:37 Stephen Rothwell
2012-12-05 23:17 Stephen Rothwell

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=20211104093208.0380c1f2@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=catalin.marinas@arm$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=mhiramat@kernel$(echo .)org \
    --cc=rostedt@goodmis$(echo .)org \
    --cc=will@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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