Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7ca59d8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "arm: kernel: Ignore KASan errors from unwind_frame"

parents 6dafc17b 3fa3a1ca
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
#include <linux/export.h>
#include <linux/kasan.h>
#include <linux/sched.h>
#include <linux/stacktrace.h>

@@ -35,11 +36,15 @@ int notrace unwind_frame(struct stackframe *frame)
	if (fp < low + 12 || fp > high - 4)
		return -EINVAL;

	kasan_disable_current();

	/* restore the registers from the stack frame */
	frame->fp = *(unsigned long *)(fp - 12);
	frame->sp = *(unsigned long *)(fp - 8);
	frame->pc = *(unsigned long *)(fp - 4);

	kasan_enable_current();

	return 0;
}
#endif
+5 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include <linux/kasan.h>
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/sched.h>
@@ -46,6 +47,8 @@ int notrace unwind_frame(struct stackframe *frame)
	if (fp < low || fp > high - 0x18 || fp & 0xf)
		return -EINVAL;

	kasan_disable_current();

	frame->sp = fp + 0x10;
	frame->fp = *(unsigned long *)(fp);
	/*
@@ -54,6 +57,8 @@ int notrace unwind_frame(struct stackframe *frame)
	 */
	frame->pc = *(unsigned long *)(fp + 8) - 4;

	kasan_enable_current();

	return 0;
}