<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 11, 2016 at 1:35 PM, Khem Raj <span dir="ltr"><<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>><br></blockquote><div><br></div><div><br></div><div>These shouldn't be carried out of tree. So can you drop the linux-yocto changes from the</div><div>series, and I'll look at getting them integrated later.</div><div><br></div><div>Bruce</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
...ace-Fix-out-of-bounds-array-access-warnin.patch | 50 ++++++++++++++++++++++<br>
meta/recipes-kernel/linux/<a href="http://linux-yocto_4.4.bb" rel="noreferrer" target="_blank">linux-yocto_4.4.bb</a> | 4 +-<br>
2 files changed, 53 insertions(+), 1 deletion(-)<br>
create mode 100644 meta/recipes-kernel/linux/linux-yocto/0001-powerpc-ptrace-Fix-out-of-bounds-array-access-warnin.patch<br>
<br>
diff --git a/meta/recipes-kernel/linux/linux-yocto/0001-powerpc-ptrace-Fix-out-of-bounds-array-access-warnin.patch b/meta/recipes-kernel/linux/linux-yocto/0001-powerpc-ptrace-Fix-out-of-bounds-array-access-warnin.patch<br>
new file mode 100644<br>
index 0000000..05315ed<br>
--- /dev/null<br>
+++ b/meta/recipes-kernel/linux/linux-yocto/0001-powerpc-ptrace-Fix-out-of-bounds-array-access-warnin.patch<br>
@@ -0,0 +1,50 @@<br>
+From 32acc1d9a5738b02e8815047af8886978aa40ead Mon Sep 17 00:00:00 2001<br>
+From: Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>><br>
+Date: Mon, 25 Apr 2016 05:47:01 +0000<br>
+Subject: [PATCH V2] powerpc/ptrace: Fix out of bounds array access warning<br>
+<br>
+gcc-6 correctly warns about a out of bounds access<br>
+<br>
+arch/powerpc/kernel/ptrace.c:407:24: warning: index 32 denotes an offset greater than size of 'u64[32][1] {aka long long unsigned int[32][1]}' [-Warray-bounds]<br>
+ offsetof(struct thread_fp_state, fpr[32][0]));<br>
+ ^<br>
+<br>
+check the end of array instead of beginning of next element to fix this<br>
+<br>
+Signed-off-by: Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>><br>
+Cc: Kees Cook <<a href="mailto:keescook@chromium.org">keescook@chromium.org</a>><br>
+Cc: Michael Ellerman <<a href="mailto:mpe@ellerman.id.au">mpe@ellerman.id.au</a>><br>
+Cc: Segher Boessenkool <<a href="mailto:segher@kernel.crashing.org">segher@kernel.crashing.org</a>><br>
+---<br>
+Changes from v1 to v2:<br>
+<br>
+- Check for fpr[32] instead of fpr[31][1]<br>
+<br>
+ arch/powerpc/kernel/ptrace.c | 4 ++--<br>
+ 1 file changed, 2 insertions(+), 2 deletions(-)<br>
+<br>
+diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c<br>
+index 737c0d0..b38fd08 100644<br>
+--- a/arch/powerpc/kernel/ptrace.c<br>
++++ b/arch/powerpc/kernel/ptrace.c<br>
+@@ -376,7 +376,7 @@ static int fpr_get(struct task_struct *target, const struct user_regset *regset,<br>
+<br>
+ #else<br>
+ BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) !=<br>
+- offsetof(struct thread_fp_state, fpr[32][0]));<br>
++ offsetof(struct thread_fp_state, fpr[32]));<br>
+<br>
+ return user_regset_copyout(&pos, &count, &kbuf, &ubuf,<br>
+ &target->thread.fp_state, 0, -1);<br>
+@@ -404,7 +404,7 @@ static int fpr_set(struct task_struct *target, const struct user_regset *regset,<br>
+ return 0;<br>
+ #else<br>
+ BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) !=<br>
+- offsetof(struct thread_fp_state, fpr[32][0]));<br>
++ offsetof(struct thread_fp_state, fpr[32]));<br>
+<br>
+ return user_regset_copyin(&pos, &count, &kbuf, &ubuf,<br>
+ &target->thread.fp_state, 0, -1);<br>
+--<br>
+1.9.1<br>
+<br>
diff --git a/meta/recipes-kernel/linux/<a href="http://linux-yocto_4.4.bb" rel="noreferrer" target="_blank">linux-yocto_4.4.bb</a> b/meta/recipes-kernel/linux/<a href="http://linux-yocto_4.4.bb" rel="noreferrer" target="_blank">linux-yocto_4.4.bb</a><br>
index b74903e..fbb592a 100644<br>
--- a/meta/recipes-kernel/linux/<a href="http://linux-yocto_4.4.bb" rel="noreferrer" target="_blank">linux-yocto_4.4.bb</a><br>
+++ b/meta/recipes-kernel/linux/<a href="http://linux-yocto_4.4.bb" rel="noreferrer" target="_blank">linux-yocto_4.4.bb</a><br>
@@ -22,7 +22,9 @@ SRCREV_machine ?= "b18090556c1d1b449233cd555c27a04d38272d6d"<br>
SRCREV_meta ?= "9ab4787fe2aea2ae0fcc31a5e067eaba19ef64c8"<br>
<br>
SRC_URI = "git://<a href="http://git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}" rel="noreferrer" target="_blank">git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}</a>; \<br>
- git://<a href="http://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}" rel="noreferrer" target="_blank">git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}</a>"<br>
+ git://<a href="http://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}" rel="noreferrer" target="_blank">git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}</a> \<br>
+ file://0001-powerpc-ptrace-Fix-out-of-bounds-array-access-warnin.patch \<br>
+"<br>
<br>
LINUX_VERSION ?= "4.4.3"<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.8.2<br>
<br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"</div>
</div></div>