<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 11, 2016 at 5:55 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">On Wed, May 11, 2016 at 2:36 PM, Bruce Ashfield<br>
<span class=""><<a href="mailto:bruce.ashfield@gmail.com">bruce.ashfield@gmail.com</a>> wrote:<br>
><br>
><br>
> On Wed, May 11, 2016 at 5:30 PM, Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>> wrote:<br>
>><br>
>> On Wed, May 11, 2016 at 2:27 PM, Bruce Ashfield<br>
>> <<a href="mailto:bruce.ashfield@gmail.com">bruce.ashfield@gmail.com</a>> wrote:<br>
>> ><br>
>> ><br>
>> > On Wed, May 11, 2016 at 1:35 PM, Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>> wrote:<br>
>> >><br>
>> >> Signed-off-by: Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>><br>
>> ><br>
>> ><br>
>> ><br>
>> > These shouldn't be carried out of tree. So can you drop the linux-yocto<br>
>> > changes from the<br>
>> > series, and I'll look at getting them integrated later.<br>
>><br>
>> I could but, this series switches to using gcc6 which will start to fail.<br>
><br>
><br>
> I can coordinate the fix. We just don't carry patches like this for linux<br>
> yocto. As you<br>
> can see, your series will no longer apply with the consolidated pull<br>
> requests that<br>
> I just sent.<br>
<br>
</span>Just include these patches in your pull request and send a v2. I will<br>
then drop it from my list.<br>
since these patches should work fine with older gcc as well your<br>
changes then can go in first<br>
or along with my changes.<br></blockquote><div><br></div><div>Sounds good. I'll have them out first thing in the morning Thursday.</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">
<div class="HOEnZb"><div class="h5"><br>
><br>
> Bruce<br>
><br>
>><br>
>><br>
>> ><br>
>> > Bruce<br>
>> ><br>
>> >><br>
>> >> ---<br>
>> >> ...ace-Fix-out-of-bounds-array-access-warnin.patch | 50<br>
>> >> ++++++++++++++++++++++<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<br>
>> >><br>
>> >> meta/recipes-kernel/linux/linux-yocto/0001-powerpc-ptrace-Fix-out-of-bounds-array-access-warnin.patch<br>
>> >><br>
>> >> diff --git<br>
>> >><br>
>> >> a/meta/recipes-kernel/linux/linux-yocto/0001-powerpc-ptrace-Fix-out-of-bounds-array-access-warnin.patch<br>
>> >><br>
>> >> 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>
>> >> +++<br>
>> >><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<br>
>> >> 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<br>
>> >> offset<br>
>> >> greater than size of 'u64[32][1] {aka long long unsigned int[32][1]}'<br>
>> >> [-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<br>
>> >> 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<br>
>> >> 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,<br>
>> >> const<br>
>> >> 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,<br>
>> >> const<br>
>> >> 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><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>
>> >> 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 ?=<br>
>> >> "b18090556c1d1b449233cd555c27a04d38272d6d"<br>
>> >> SRCREV_meta ?= "9ab4787fe2aea2ae0fcc31a5e067eaba19ef64c8"<br>
>> >><br>
>> >> SRC_URI =<br>
>> >><br>
>> >> "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>
>> >> \<br>
>> >> -<br>
>> >><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>
>> >> +<br>
>> >><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>
>> >> \<br>
>> >> +<br>
>> >> file://0001-powerpc-ptrace-Fix-out-of-bounds-array-access-warnin.patch<br>
>> >> \<br>
>> >> +"<br>
>> >><br>
>> >> LINUX_VERSION ?= "4.4.3"<br>
>> >><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>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > "Thou shalt not follow the NULL pointer, for chaos and madness await<br>
>> > thee at<br>
>> > its end"<br>
><br>
><br>
><br>
><br>
> --<br>
> "Thou shalt not follow the NULL pointer, for chaos and madness await thee at<br>
> its end"<br>
</div></div></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>