Skip to contentSkip to conversation

arch/x86/kernel/ptrace.c:659:22: warning: ISO C90 forbids mixing declarations and code

PATCH Nathan Chancellor 2 participants 3 messages Jul 14, 2019 1 message not in the archive Stable branch

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 23 lines · kbuild test robot

CC: [email protected]
TO: Dianzhang Chen <[email protected]>
CC: "Greg Kroah-Hartman" <[email protected]>
CC: Thomas Gleixner <[email protected]>

tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
head:   728f3eef5bdde0f9516277b4c4519fa5436e7e5d
commit: 55ac552ebd34f9687cc1bdcb07006bf7f104dc99 [9981/9999] x86/ptrace: Fix possible spectre-v1 in ptrace_get_debugreg()
config: x86_64-rhel-7.2 (attached as .config)
compiler: clang version 9.0.0 (git://gitmirror/llvm_project 87856e739c8e55f3b4e0f37baaf93308ec2dbd47)
reproduce:
        git checkout 55ac552ebd34f9687cc1bdcb07006bf7f104dc99
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag

All warnings (new ones prefixed by >>):

Quoted 1 line
Quoted 1 line

arch/x86/kernel/ptrace.c:659:22: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]

                   struct perf_event *bp = thread->ptrace_bps[index];
                                      ^
Quoted 7 lines

1 warning generated.

vim +659 arch/x86/kernel/ptrace.c

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Hi Greg and Sasha,

I was going to reply to this on the GCC version of the thread but I don't really see a way to get the original message or the message ID from the web archive since I'm not subscribed to that list :(

https://lists.01.org/pipermail/kbuild-all/2019-July/062379.html

This is not an issue in Linus' tree because he fixed it manually during the merge:

https://lore.kernel.org/lkml/CAHk-=whhq5RQYNKzHOLqC+gzSjmcEGNJjbC=Psc_vQaCx4TCKg@mail.gmail.com/

I would say that it isn't unreasonable to fold that fixup into the original patch, with a note that it came from Linus' merge upstream:

223cea6a4f05 ("Merge branch 'x86-pti-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip").

Cheers,
Nathan

#2 lore raw
Quoted 45 lines · Nathan Chancellor
Quoted 23 lines · kbuild test robot

CC: [email protected]
TO: Dianzhang Chen <[email protected]>
CC: "Greg Kroah-Hartman" <[email protected]>
CC: Thomas Gleixner <[email protected]>

tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
head:   728f3eef5bdde0f9516277b4c4519fa5436e7e5d
commit: 55ac552ebd34f9687cc1bdcb07006bf7f104dc99 [9981/9999] x86/ptrace: Fix possible spectre-v1 in ptrace_get_debugreg()
config: x86_64-rhel-7.2 (attached as .config)
compiler: clang version 9.0.0 (git://gitmirror/llvm_project 87856e739c8e55f3b4e0f37baaf93308ec2dbd47)
reproduce:
        git checkout 55ac552ebd34f9687cc1bdcb07006bf7f104dc99
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag

All warnings (new ones prefixed by >>):

Quoted 1 line
Quoted 1 line

arch/x86/kernel/ptrace.c:659:22: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]

                   struct perf_event *bp = thread->ptrace_bps[index];
                                      ^
Quoted 7 lines

1 warning generated.

vim +659 arch/x86/kernel/ptrace.c

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Hi Greg and Sasha,

I was going to reply to this on the GCC version of the thread but I don't really see a way to get the original message or the message ID from the web archive since I'm not subscribed to that list :(

https://lists.01.org/pipermail/kbuild-all/2019-July/062379.html

This is not an issue in Linus' tree because he fixed it manually during the merge:

https://lore.kernel.org/lkml/CAHk-=whhq5RQYNKzHOLqC+gzSjmcEGNJjbC=Psc_vQaCx4TCKg@mail.gmail.com/

Quoted 8 lines

I would say that it isn't unreasonable to fold that fixup into the original patch, with a note that it came from Linus' merge upstream:

223cea6a4f05 ("Merge branch 'x86-pti-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip").

Cheers,
Nathan

Re-adding our list, which I messed up when adding stable. Sorry for the noise :(

#3 lore raw
Quoted 49 lines · Nathan Chancellor
Quoted 48 lines · Nathan Chancellor
Quoted 23 lines · kbuild test robot

CC: [email protected]
TO: Dianzhang Chen <[email protected]>
CC: "Greg Kroah-Hartman" <[email protected]>
CC: Thomas Gleixner <[email protected]>

tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
head:   728f3eef5bdde0f9516277b4c4519fa5436e7e5d
commit: 55ac552ebd34f9687cc1bdcb07006bf7f104dc99 [9981/9999] x86/ptrace: Fix possible spectre-v1 in ptrace_get_debugreg()
config: x86_64-rhel-7.2 (attached as .config)
compiler: clang version 9.0.0 (git://gitmirror/llvm_project 87856e739c8e55f3b4e0f37baaf93308ec2dbd47)
reproduce:
        git checkout 55ac552ebd34f9687cc1bdcb07006bf7f104dc99
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag

All warnings (new ones prefixed by >>):

Quoted 1 line
Quoted 1 line

arch/x86/kernel/ptrace.c:659:22: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]

                   struct perf_event *bp = thread->ptrace_bps[index];
                                      ^
Quoted 7 lines

1 warning generated.

vim +659 arch/x86/kernel/ptrace.c

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Hi Greg and Sasha,

I was going to reply to this on the GCC version of the thread but I don't really see a way to get the original message or the message ID from the web archive since I'm not subscribed to that list :(

https://lists.01.org/pipermail/kbuild-all/2019-July/062379.html

This is not an issue in Linus' tree because he fixed it manually during the merge:

https://lore.kernel.org/lkml/CAHk-=whhq5RQYNKzHOLqC+gzSjmcEGNJjbC=Psc_vQaCx4TCKg@mail.gmail.com/

I would say that it isn't unreasonable to fold that fixup into the original patch, with a note that it came from Linus' merge upstream:

Quoted 8 lines
Quoted 5 lines

223cea6a4f05 ("Merge branch 'x86-pti-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip").

Cheers,
Nathan

Re-adding our list, which I messed up when adding stable. Sorry for the noise :(

Ah, didn't realize it was fixed during the merge, will do the same thing here and tweak the original patch.

thanks,

greg k-h