Re: [PATCH 20/23] gcc-plugins: always build plugins with C++

2018-02-22 Thread Emese Revfy
On Sat, 17 Feb 2018 03:38:48 +0900 Masahiro Yamada wrote: > If the target compiler is GCC 4.8 or newer, plugins are compiled with > HOSTCXX. Otherwise, gcc-plugin.sh will select HOSTCC or HOSTCXX. > > To simpily things, let's decide GCC 4.8 is the requirement for

Re: [PATCH 20/23] gcc-plugins: always build plugins with C++

2018-02-22 Thread Emese Revfy
On Sat, 17 Feb 2018 03:38:48 +0900 Masahiro Yamada wrote: > If the target compiler is GCC 4.8 or newer, plugins are compiled with > HOSTCXX. Otherwise, gcc-plugin.sh will select HOSTCC or HOSTCXX. > > To simpily things, let's decide GCC 4.8 is the requirement for GCC > pulgins. With this,

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2017-02-20 Thread Emese Revfy
On Wed, 15 Feb 2017 11:27:06 -0800 Kees Cook <keesc...@chromium.org> wrote: > On Tue, Feb 14, 2017 at 4:23 PM, Emese Revfy <re.em...@gmail.com> wrote: > > On Thu, 12 Jan 2017 15:40:41 -0800 > > Kees Cook <keesc...@chromium.org> wrote: > > > >>

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2017-02-20 Thread Emese Revfy
On Wed, 15 Feb 2017 11:27:06 -0800 Kees Cook wrote: > On Tue, Feb 14, 2017 at 4:23 PM, Emese Revfy wrote: > > On Thu, 12 Jan 2017 15:40:41 -0800 > > Kees Cook wrote: > > > >> WARNING: drivers/clk/bcm/built-in.o(.text+0xec2): Section mismatch in > >&g

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2017-02-14 Thread Emese Revfy
On Thu, 12 Jan 2017 15:40:41 -0800 Kees Cook wrote: > WARNING: drivers/clk/bcm/built-in.o(.text+0xec2): Section mismatch in > reference from the function clk_gate() to the variable > .init.rodata.str:__func__.29708 > The function clk_gate() references > the variable

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2017-02-14 Thread Emese Revfy
On Thu, 12 Jan 2017 15:40:41 -0800 Kees Cook wrote: > WARNING: drivers/clk/bcm/built-in.o(.text+0xec2): Section mismatch in > reference from the function clk_gate() to the variable > .init.rodata.str:__func__.29708 > The function clk_gate() references > the variable __initconst __func__.29708. >

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2017-01-17 Thread Emese Revfy
On Thu, 12 Jan 2017 15:40:41 -0800 Kees Cook wrote: > WARNING: drivers/clk/bcm/built-in.o(.text+0xec2): Section mismatch in > reference from the function clk_gate() to the variable > .init.rodata.str:__func__.29708 > The function clk_gate() references > the variable

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2017-01-17 Thread Emese Revfy
On Thu, 12 Jan 2017 15:40:41 -0800 Kees Cook wrote: > WARNING: drivers/clk/bcm/built-in.o(.text+0xec2): Section mismatch in > reference from the function clk_gate() to the variable > .init.rodata.str:__func__.29708 > The function clk_gate() references > the variable __initconst __func__.29708. >

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2017-01-12 Thread Emese Revfy
On Tue, 10 Jan 2017 17:09:31 -0800 Kees Cook wrote: > WARNING: vmlinux.o(.text+0x1087e7): Section mismatch in reference from > the function rebind_subsystems() to the variable > .init.rodata.str:__func__.4400 > The function rebind_subsystems() references > the variable

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2017-01-12 Thread Emese Revfy
On Tue, 10 Jan 2017 17:09:31 -0800 Kees Cook wrote: > WARNING: vmlinux.o(.text+0x1087e7): Section mismatch in reference from > the function rebind_subsystems() to the variable > .init.rodata.str:__func__.4400 > The function rebind_subsystems() references > the variable __initconst __func__.4400.

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2017-01-10 Thread Emese Revfy
On Tue, 3 Jan 2017 16:23:03 -0800 Kees Cook <keesc...@chromium.org> wrote: > On Mon, Dec 19, 2016 at 3:10 AM, Emese Revfy <re.em...@gmail.com> wrote: > > On Fri, 16 Dec 2016 14:19:10 -0800 > > Kees Cook <keesc...@chromium.org> wrote: > > > >> FW

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2017-01-10 Thread Emese Revfy
On Tue, 3 Jan 2017 16:23:03 -0800 Kees Cook wrote: > On Mon, Dec 19, 2016 at 3:10 AM, Emese Revfy wrote: > > On Fri, 16 Dec 2016 14:19:10 -0800 > > Kees Cook wrote: > > > >> FWIW, it still seems to me that these aren't false positives: > >> >

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2016-12-19 Thread Emese Revfy
On Fri, 16 Dec 2016 14:19:10 -0800 Kees Cook wrote: > FWIW, it still seems to me that these aren't false positives: > > WARNING: vmlinux.o(.text.unlikely+0x1b1): Section mismatch in > reference from the function uncore_pci_exit.part.22() to the function >

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2016-12-19 Thread Emese Revfy
On Fri, 16 Dec 2016 14:19:10 -0800 Kees Cook wrote: > FWIW, it still seems to me that these aren't false positives: > > WARNING: vmlinux.o(.text.unlikely+0x1b1): Section mismatch in > reference from the function uncore_pci_exit.part.22() to the function > .init.text:uncore_free_pcibus_map() >

Re: [PATCH] gcc-plugin: include memmodel.h and tree_vrp.h for gcc-7

2016-12-16 Thread Emese Revfy
On Fri, 16 Dec 2016 10:00:22 +0100 Arnd Bergmann wrote: > Cc: sta...@vger.kernel.org > Suggested-by: Kugan > Signed-off-by: Arnd Bergmann > --- > scripts/gcc-plugins/gcc-common.h | 6 ++ > 1 file changed, 6 insertions(+) >

Re: [PATCH] gcc-plugin: include memmodel.h and tree_vrp.h for gcc-7

2016-12-16 Thread Emese Revfy
On Fri, 16 Dec 2016 10:00:22 +0100 Arnd Bergmann wrote: > Cc: sta...@vger.kernel.org > Suggested-by: Kugan > Signed-off-by: Arnd Bergmann > --- > scripts/gcc-plugins/gcc-common.h | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/scripts/gcc-plugins/gcc-common.h >

Re: enabling COMPILE_TEST support for GCC plugins in v4.11

2016-12-10 Thread Emese Revfy
On Fri, 9 Dec 2016 11:12:18 -0800 Kees Cook wrote: > On Fri, Dec 9, 2016 at 2:40 AM, Arnd Bergmann wrote: > > On Thursday, December 8, 2016 11:00:42 AM CET Kees Cook wrote: > > > >> If you have a moment, applying 215e2aa6c024[1] and reverting > >>

Re: enabling COMPILE_TEST support for GCC plugins in v4.11

2016-12-10 Thread Emese Revfy
On Fri, 9 Dec 2016 11:12:18 -0800 Kees Cook wrote: > On Fri, Dec 9, 2016 at 2:40 AM, Arnd Bergmann wrote: > > On Thursday, December 8, 2016 11:00:42 AM CET Kees Cook wrote: > > > >> If you have a moment, applying 215e2aa6c024[1] and reverting > >> a519167e753e for an allyesconfig/allmodconfig

Re: [PATCH 3/3] powerpc: enable support for GCC plugins

2016-12-06 Thread Emese Revfy
On Tue, 6 Dec 2016 17:28:00 +1100 Andrew Donnellan wrote: > + # Various gccs between 4.5 and 5.1 have bugs on powerpc due to missing > + # header files. gcc <= 4.6 doesn't work at all, gccs from 4.8 to 5.1 > have > + # issues with 64-bit targets. >

Re: [PATCH 3/3] powerpc: enable support for GCC plugins

2016-12-06 Thread Emese Revfy
On Tue, 6 Dec 2016 17:28:00 +1100 Andrew Donnellan wrote: > + # Various gccs between 4.5 and 5.1 have bugs on powerpc due to missing > + # header files. gcc <= 4.6 doesn't work at all, gccs from 4.8 to 5.1 > have > + # issues with 64-bit targets. > + ifeq ($(ARCH),powerpc)

Re: scripts/gcc-plugins/gcc-common.h:4:22: fatal error: bversion.h: No such file or directory

2016-11-06 Thread Emese Revfy
On Sun, 6 Nov 2016 07:09:57 +0800 kbuild test robot wrote: > Hi Emese, > > FYI, the error/warning still remains. > >++(scripts/gcc-plugin.sh:12): main(): gcc-4.6 -E -x c++ - -o /dev/null > -Iscripts/gcc-plugins -Iplugin/include >scripts/Makefile.gcc-plugins:30:

Re: scripts/gcc-plugins/gcc-common.h:4:22: fatal error: bversion.h: No such file or directory

2016-11-06 Thread Emese Revfy
On Sun, 6 Nov 2016 07:09:57 +0800 kbuild test robot wrote: > Hi Emese, > > FYI, the error/warning still remains. > >++(scripts/gcc-plugin.sh:12): main(): gcc-4.6 -E -x c++ - -o /dev/null > -Iscripts/gcc-plugins -Iplugin/include >scripts/Makefile.gcc-plugins:30: warning: your gcc

Re: drivers/pci/hotplug/ibmphp_ebda.c:409:1: warning: the frame size of 1108 bytes is larger than 1024 bytes

2016-10-18 Thread Emese Revfy
On Tue, 18 Oct 2016 15:05:39 -0700 Kees Cook <keesc...@chromium.org> wrote: > On Tue, Oct 18, 2016 at 2:36 PM, Emese Revfy <re.em...@gmail.com> wrote: > > On Tue, 18 Oct 2016 13:57:35 -0700 > > Kees Cook <keesc...@chromium.org> wrote: > > > >>

Re: drivers/pci/hotplug/ibmphp_ebda.c:409:1: warning: the frame size of 1108 bytes is larger than 1024 bytes

2016-10-18 Thread Emese Revfy
On Tue, 18 Oct 2016 15:05:39 -0700 Kees Cook wrote: > On Tue, Oct 18, 2016 at 2:36 PM, Emese Revfy wrote: > > On Tue, 18 Oct 2016 13:57:35 -0700 > > Kees Cook wrote: > > > >> This is controlled by CONFIG_FRAME_WARN. I don't think this is a > >>

Re: drivers/pci/hotplug/ibmphp_ebda.c:409:1: warning: the frame size of 1108 bytes is larger than 1024 bytes

2016-10-18 Thread Emese Revfy
On Tue, 18 Oct 2016 13:57:35 -0700 Kees Cook wrote: > This is controlled by CONFIG_FRAME_WARN. I don't think this is a > particular problem or should be avoided, but perhaps we can set the > default to 2048 (as done on 64BIT) if we're building with the entropy > plugin.

Re: drivers/pci/hotplug/ibmphp_ebda.c:409:1: warning: the frame size of 1108 bytes is larger than 1024 bytes

2016-10-18 Thread Emese Revfy
On Tue, 18 Oct 2016 13:57:35 -0700 Kees Cook wrote: > This is controlled by CONFIG_FRAME_WARN. I don't think this is a > particular problem or should be avoided, but perhaps we can set the > default to 2048 (as done on 64BIT) if we're building with the entropy > plugin. This is probably a gcc

Re: drivers/pci/hotplug/ibmphp_ebda.c:409:1: warning: the frame size of 1108 bytes is larger than 1024 bytes

2016-10-17 Thread Emese Revfy
On Sun, 16 Oct 2016 06:52:16 +0800 kbuild test robot wrote: >drivers/pci/hotplug/ibmphp_ebda.c: In function 'ibmphp_access_ebda': > >> drivers/pci/hotplug/ibmphp_ebda.c:409:1: warning: the frame size of 1108 > >> bytes is larger than 1024 bytes [-Wframe-larger-than=]

Re: drivers/pci/hotplug/ibmphp_ebda.c:409:1: warning: the frame size of 1108 bytes is larger than 1024 bytes

2016-10-17 Thread Emese Revfy
On Sun, 16 Oct 2016 06:52:16 +0800 kbuild test robot wrote: >drivers/pci/hotplug/ibmphp_ebda.c: In function 'ibmphp_access_ebda': > >> drivers/pci/hotplug/ibmphp_ebda.c:409:1: warning: the frame size of 1108 > >> bytes is larger than 1024 bytes [-Wframe-larger-than=] Hi, Thanks for the

[PATCH v3 6/7] Mark a few functions with the printf attribute

2016-07-27 Thread Emese Revfy
Fixed format strings warnings exposed by the printf attribute. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- drivers/acpi/acpica/dbhistry.c | 2 +- drivers/acpi/acpica/dbinput.c | 10 ++--- drivers/acpi/acpica/dbstats.c | 88 +++--- d

[PATCH v3 6/7] Mark a few functions with the printf attribute

2016-07-27 Thread Emese Revfy
Fixed format strings warnings exposed by the printf attribute. Signed-off-by: Emese Revfy --- drivers/acpi/acpica/dbhistry.c | 2 +- drivers/acpi/acpica/dbinput.c | 10 ++--- drivers/acpi/acpica/dbstats.c | 88 +++--- drivers/acpi/acpica/utdebug.c

[PATCH v3 2/7] Split up struct warn_args

2016-07-27 Thread Emese Revfy
Disable the initify plugin on the 6th parameter of __warn() because the va_list type can't be NULL on the tile arch. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- include/asm-generic/bug.h | 7 +-- kernel/panic.c| 32 lib

[PATCH v3 2/7] Split up struct warn_args

2016-07-27 Thread Emese Revfy
Disable the initify plugin on the 6th parameter of __warn() because the va_list type can't be NULL on the tile arch. Signed-off-by: Emese Revfy --- include/asm-generic/bug.h | 7 +-- kernel/panic.c| 32 lib/bug.c | 2 +- 3 files

[PATCH v3 7/7] Mark functions with the __unverified_nocapture attribute

2016-07-26 Thread Emese Revfy
This attribute disables the compile data flow verification of the designated nocapture parameters of the function. Use it only on function parameters that are difficult for the plugin to analyze. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- include/linux/compiler-gcc.h | 1 + i

[PATCH v3 7/7] Mark functions with the __unverified_nocapture attribute

2016-07-26 Thread Emese Revfy
This attribute disables the compile data flow verification of the designated nocapture parameters of the function. Use it only on function parameters that are difficult for the plugin to analyze. Signed-off-by: Emese Revfy --- include/linux/compiler-gcc.h | 1 + include/linux/compiler.h | 4

[PATCH v3 6/7] Mark a few functions with the printf attribute

2016-07-26 Thread Emese Revfy
This allows not only compile time format string checking but can also increase the coverage of the initify plugin. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- drivers/scsi/esas2r/esas2r_log.h | 4 ++-- include/acpi/acpiosxf.h | 3 ++- 2 files changed, 4 insertions

[PATCH v3 6/7] Mark a few functions with the printf attribute

2016-07-26 Thread Emese Revfy
This allows not only compile time format string checking but can also increase the coverage of the initify plugin. Signed-off-by: Emese Revfy --- drivers/scsi/esas2r/esas2r_log.h | 4 ++-- include/acpi/acpiosxf.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH v3 5/7] Mark functions with the __nocapture attribute

2016-07-26 Thread Emese Revfy
then the plugin initifies all vararg arguments. I couldn't test the arm, arm64 and powerpc architectures. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- arch/arm/include/asm/string.h | 10 +++--- arch/arm64/include/asm/string.h | 25 ++--- arch/powerpc/include/asm/string.

[PATCH v3 5/7] Mark functions with the __nocapture attribute

2016-07-26 Thread Emese Revfy
then the plugin initifies all vararg arguments. I couldn't test the arm, arm64 and powerpc architectures. Signed-off-by: Emese Revfy --- arch/arm/include/asm/string.h | 10 +++--- arch/arm64/include/asm/string.h | 25 ++--- arch/powerpc/include/asm/string.h | 19 +- arch/x86

[PATCH v3 4/7] Add the initify gcc plugin

2016-07-26 Thread Emese Revfy
plugin to increase coverage. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- arch/Kconfig | 35 + arch/x86/Kconfig |1 + arch/x86/lib/Makefile|4 + include/asm-generic/vmlinux.lds.h|2 + include/linux/compiler

[PATCH v3 4/7] Add the initify gcc plugin

2016-07-26 Thread Emese Revfy
plugin to increase coverage. Signed-off-by: Emese Revfy --- arch/Kconfig | 35 + arch/x86/Kconfig |1 + arch/x86/lib/Makefile|4 + include/asm-generic/vmlinux.lds.h|2 + include/linux/compiler-gcc.h | 14

[PATCH v3 3/7] Constify some function parameters

2016-07-26 Thread Emese Revfy
Initify needs const pointer types, the initify plugin caught some __printf arguments that weren't const yet. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- drivers/isdn/hisax/config.c | 16 drivers/isdn/hisax/hisax.h | 4 ++-- 2 files changed, 10 insertions(

[PATCH v3 3/7] Constify some function parameters

2016-07-26 Thread Emese Revfy
Initify needs const pointer types, the initify plugin caught some __printf arguments that weren't const yet. Signed-off-by: Emese Revfy --- drivers/isdn/hisax/config.c | 16 drivers/isdn/hisax/hisax.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git

[PATCH v3 2/7] Split up struct warn_args

2016-07-26 Thread Emese Revfy
to enable dataflow verification by the initify plugin. This allows marking warn_slowpath* parameters as nocapture and compile time verification of the related dataflows. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- include/asm-generic/bug.h | 5 + kernel/panic.c

[PATCH v3 2/7] Split up struct warn_args

2016-07-26 Thread Emese Revfy
to enable dataflow verification by the initify plugin. This allows marking warn_slowpath* parameters as nocapture and compile time verification of the related dataflows. Signed-off-by: Emese Revfy --- include/asm-generic/bug.h | 5 + kernel/panic.c| 32

[PATCH v3 1/7] Move type casts into is_kernel_rodata

2016-07-26 Thread Emese Revfy
so that its parameter can be marked as nocapture. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- mm/util.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/util.c b/mm/util.c index 662cddf..d95f10b 100644 --- a/mm/util.c +++ b/mm/util.c @@ -17,10

[PATCH v3 1/7] Move type casts into is_kernel_rodata

2016-07-26 Thread Emese Revfy
so that its parameter can be marked as nocapture. Signed-off-by: Emese Revfy --- mm/util.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/util.c b/mm/util.c index 662cddf..d95f10b 100644 --- a/mm/util.c +++ b/mm/util.c @@ -17,10 +17,10 @@ #include

[PATCH v3 0/7] Introduce the initify gcc plugin

2016-07-26 Thread Emese Revfy
__ksymtab_gpl __ksymtab_strings __init_rodata __param __modver 03 .init.text .altinstr_aux .init.data .x86_cpu_dev.init .parainstructions .altinstructions .altinstr_replacement .iommu_table .apicdrivers .exit.text .exit.data .smp_locks .bss .brk Emese Revfy (7): Move type

[PATCH v3 0/7] Introduce the initify gcc plugin

2016-07-26 Thread Emese Revfy
__ksymtab_gpl __ksymtab_strings __init_rodata __param __modver 03 .init.text .altinstr_aux .init.data .x86_cpu_dev.init .parainstructions .altinstructions .altinstr_replacement .iommu_table .apicdrivers .exit.text .exit.data .smp_locks .bss .brk Emese Revfy (7): Move type

Re: [PATCH v2 1/3] Add the initify gcc plugin

2016-07-13 Thread Emese Revfy
On Tue, 12 Jul 2016 18:38:47 -0400 Kees Cook <keesc...@chromium.org> wrote: > On Tue, Jul 12, 2016 at 6:08 PM, Russell King - ARM Linux > <li...@armlinux.org.uk> wrote: > > On Tue, Jul 12, 2016 at 03:45:56PM -0400, Kees Cook wrote: > >> On Mon, Jul 4, 20

Re: [PATCH v2 1/3] Add the initify gcc plugin

2016-07-13 Thread Emese Revfy
On Tue, 12 Jul 2016 18:38:47 -0400 Kees Cook wrote: > On Tue, Jul 12, 2016 at 6:08 PM, Russell King - ARM Linux > wrote: > > On Tue, Jul 12, 2016 at 03:45:56PM -0400, Kees Cook wrote: > >> On Mon, Jul 4, 2016 at 7:40 PM, Emese Revfy wrote: > > That sounds like

Re: [PATCH v2 1/3] Add the initify gcc plugin

2016-07-13 Thread Emese Revfy
On Tue, 12 Jul 2016 15:45:56 -0400 Kees Cook <keesc...@chromium.org> wrote: > On Mon, Jul 4, 2016 at 7:40 PM, Emese Revfy <re.em...@gmail.com> wrote: > > If a function is called by __init and __exit functions as well then > > the plugin moves it to the __exit section.

Re: [PATCH v2 1/3] Add the initify gcc plugin

2016-07-13 Thread Emese Revfy
On Tue, 12 Jul 2016 15:45:56 -0400 Kees Cook wrote: > On Mon, Jul 4, 2016 at 7:40 PM, Emese Revfy wrote: > > If a function is called by __init and __exit functions as well then > > the plugin moves it to the __exit section. This causes false positive > > section mismatch e

Re: [PATCH v2 1/3] Add the initify gcc plugin

2016-07-13 Thread Emese Revfy
On Tue, 12 Jul 2016 16:05:45 -0400 Kees Cook wrote: > /* > * The initify gcc-plugin attempts to identify const arguments that are only > * used during init (see __init), so they can be moved to the .init.rodata > * section. If an argument is passed to a non-init

Re: [PATCH v2 1/3] Add the initify gcc plugin

2016-07-13 Thread Emese Revfy
On Tue, 12 Jul 2016 16:05:45 -0400 Kees Cook wrote: > /* > * The initify gcc-plugin attempts to identify const arguments that are only > * used during init (see __init), so they can be moved to the .init.rodata > * section. If an argument is passed to a non-init function, it must > *

Re: [PATCH v2 1/3] Add the initify gcc plugin

2016-07-12 Thread Emese Revfy
On Tue, 12 Jul 2016 15:45:56 -0400 Kees Cook <keesc...@chromium.org> wrote: > On Mon, Jul 4, 2016 at 7:40 PM, Emese Revfy <re.em...@gmail.com> wrote: > Thanks for sending this! I'll get it added to my tree for some 0day > build testing, and then get it into my -next tree.

Re: [PATCH v2 1/3] Add the initify gcc plugin

2016-07-12 Thread Emese Revfy
On Tue, 12 Jul 2016 15:45:56 -0400 Kees Cook wrote: > On Mon, Jul 4, 2016 at 7:40 PM, Emese Revfy wrote: > Thanks for sending this! I'll get it added to my tree for some 0day > build testing, and then get it into my -next tree. I'll send a new patch set soon. I'm working on some fi

Re: [PATCH v2 3/3] Constify some function parameters

2016-07-06 Thread Emese Revfy
On Tue, 5 Jul 2016 07:58:04 +0800 kbuild test robot wrote: > All warnings (new ones prefixed by >>): > >drivers/isdn/hisax/config.c: In function 'VHiSax_putstatus': > >> drivers/isdn/hisax/config.c:688:5: warning: assignment discards 'const' > >> qualifier from pointer

Re: [PATCH v2 3/3] Constify some function parameters

2016-07-06 Thread Emese Revfy
On Tue, 5 Jul 2016 07:58:04 +0800 kbuild test robot wrote: > All warnings (new ones prefixed by >>): > >drivers/isdn/hisax/config.c: In function 'VHiSax_putstatus': > >> drivers/isdn/hisax/config.c:688:5: warning: assignment discards 'const' > >> qualifier from pointer target type

[PATCH v2 3/3] Constify some function parameters

2016-07-06 Thread Emese Revfy
Initify needs const pointer types, the initify plugin caught some __printf arguments that weren't const yet. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- drivers/isdn/hisax/config.c | 16 drivers/isdn/hisax/hisax.h | 4 ++-- 2 files changed, 10 insertions(

[PATCH v2 3/3] Constify some function parameters

2016-07-06 Thread Emese Revfy
Initify needs const pointer types, the initify plugin caught some __printf arguments that weren't const yet. Signed-off-by: Emese Revfy --- drivers/isdn/hisax/config.c | 16 drivers/isdn/hisax/hisax.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git

[PATCH v2 3/3] Constify some function parameters

2016-07-04 Thread Emese Revfy
Initify needs const pointer types, the initify plugin caught some __printf arguments that weren't const yet. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- drivers/isdn/hisax/config.c | 4 ++-- drivers/isdn/hisax/hisax.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)

[PATCH v2 3/3] Constify some function parameters

2016-07-04 Thread Emese Revfy
Initify needs const pointer types, the initify plugin caught some __printf arguments that weren't const yet. Signed-off-by: Emese Revfy --- drivers/isdn/hisax/config.c | 4 ++-- drivers/isdn/hisax/hisax.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/isdn

[PATCH v2 2/3] Mark functions with the __nocapture attribute

2016-07-04 Thread Emese Revfy
the arm, arm64 and powerpc architectures. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- arch/arm/include/asm/string.h | 4 +-- arch/arm64/include/asm/string.h | 19 ++-- arch/powerpc/include/asm/string.h | 19 ++-- arch/x86/include/asm/string_32.h

[PATCH v2 2/3] Mark functions with the __nocapture attribute

2016-07-04 Thread Emese Revfy
the arm, arm64 and powerpc architectures. Signed-off-by: Emese Revfy --- arch/arm/include/asm/string.h | 4 +-- arch/arm64/include/asm/string.h | 19 ++-- arch/powerpc/include/asm/string.h | 19 ++-- arch/x86/include/asm/string_32.h | 21 ++--- arch/x86/include/asm

[PATCH v2 1/3] Add the initify gcc plugin

2016-07-04 Thread Emese Revfy
plugin to increase coverage. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- arch/Kconfig | 23 + include/asm-generic/vmlinux.lds.h|2 + scripts/Makefile.gcc-plugins |4 + scripts/gcc-plugins/gcc-common.h | 41 ++ scripts/gcc-p

[PATCH v2 1/3] Add the initify gcc plugin

2016-07-04 Thread Emese Revfy
plugin to increase coverage. Signed-off-by: Emese Revfy --- arch/Kconfig | 23 + include/asm-generic/vmlinux.lds.h|2 + scripts/Makefile.gcc-plugins |4 + scripts/gcc-plugins/gcc-common.h | 41 ++ scripts/gcc-plugins/initify_plugin.c | 1183

[PATCH v2 0/3] Introduce the initify gcc plugin

2016-07-04 Thread Emese Revfy
u_dev.init .parainstructions .altinstructions .altinstr_replacement .iommu_table .apicdrivers .exit.text .exit.data .smp_locks .bss .brk Emese Revfy (3): Add the initify gcc plugin Mark functions with the __nocapture attribute Constify some function parameters Changes from v1: * Removed u

[PATCH v2 0/3] Introduce the initify gcc plugin

2016-07-04 Thread Emese Revfy
u_dev.init .parainstructions .altinstructions .altinstr_replacement .iommu_table .apicdrivers .exit.text .exit.data .smp_locks .bss .brk Emese Revfy (3): Add the initify gcc plugin Mark functions with the __nocapture attribute Constify some function parameters Changes from v1: * Removed u

Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute

2016-07-01 Thread Emese Revfy
On Wed, 29 Jun 2016 17:12:45 -0700 Joe Perches <j...@perches.com> wrote: > On Wed, 2016-06-29 at 20:42 +0200, Emese Revfy wrote: > > On Tue, 28 Jun 2016 14:00:57 -0700 Joe Perches <j...@perches.com> wrote: > > > On Tue, 2016-06-28 at 22:40 +0200, Emese Revfy wrote:

Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute

2016-07-01 Thread Emese Revfy
On Wed, 29 Jun 2016 17:12:45 -0700 Joe Perches wrote: > On Wed, 2016-06-29 at 20:42 +0200, Emese Revfy wrote: > > On Tue, 28 Jun 2016 14:00:57 -0700 Joe Perches wrote: > > > On Tue, 2016-06-28 at 22:40 +0200, Emese Revfy wrote: > > > > On Tue, 28 Jun 2016 09:

Re: [PATCH v1 1/2] Add the initify gcc plugin

2016-06-29 Thread Emese Revfy
On Tue, 28 Jun 2016 23:05:56 +0200 Rasmus Villemoes <li...@rasmusvillemoes.dk> wrote: > On Tue, Jun 28 2016, Emese Revfy <re.em...@gmail.com> wrote: > > > The kernel already has a mechanism to free up code and data memory that > > is only used during k

Re: [PATCH v1 1/2] Add the initify gcc plugin

2016-06-29 Thread Emese Revfy
On Tue, 28 Jun 2016 23:05:56 +0200 Rasmus Villemoes wrote: > On Tue, Jun 28 2016, Emese Revfy wrote: > > > The kernel already has a mechanism to free up code and data memory that > > is only used during kernel or module initialization. > > This plugin will teach t

Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute

2016-06-29 Thread Emese Revfy
On Tue, 28 Jun 2016 14:00:57 -0700 Joe Perches <j...@perches.com> wrote: > On Tue, 2016-06-28 at 22:40 +0200, Emese Revfy wrote: > > On Tue, 28 Jun 2016 09:43:31 -0700 Joe Perches <j...@perches.com> wrote: > > > On Tue, 2016-06-28 at 13:36 +0200, Emese Revfy wr

Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute

2016-06-29 Thread Emese Revfy
On Tue, 28 Jun 2016 14:00:57 -0700 Joe Perches wrote: > On Tue, 2016-06-28 at 22:40 +0200, Emese Revfy wrote: > > On Tue, 28 Jun 2016 09:43:31 -0700 Joe Perches wrote: > > > On Tue, 2016-06-28 at 13:36 +0200, Emese Revfy wrote: > > > > The nocapture gcc attr

Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute

2016-06-29 Thread Emese Revfy
On Tue, 28 Jun 2016 22:50:55 +0200 Rasmus Villemoes <li...@rasmusvillemoes.dk> wrote: > On Tue, Jun 28 2016, Emese Revfy <re.em...@gmail.com> wrote: > > diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h > > index 6f96247..4cdf266 100644 > >

Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute

2016-06-29 Thread Emese Revfy
On Tue, 28 Jun 2016 22:50:55 +0200 Rasmus Villemoes wrote: > On Tue, Jun 28 2016, Emese Revfy wrote: > > diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h > > index 6f96247..4cdf266 100644 > > --- a/include/asm-generic/bug.h > > +++ b/include/asm-

Re: [kernel-hardening] [PATCH v1 0/2] Introduce the initify gcc plugin

2016-06-29 Thread Emese Revfy
On Wed, 29 Jun 2016 18:52:27 +0100 Mark Rutland <mark.rutl...@arm.com> wrote: > On Wed, Jun 29, 2016 at 09:21:37AM +0100, Mark Rutland wrote: > > On Tue, Jun 28, 2016 at 01:46:04PM -0700, Kees Cook wrote: > > > On Tue, Jun 28, 2016 at 9:14 AM, Emese Revfy &l

Re: [kernel-hardening] [PATCH v1 0/2] Introduce the initify gcc plugin

2016-06-29 Thread Emese Revfy
On Wed, 29 Jun 2016 18:52:27 +0100 Mark Rutland wrote: > On Wed, Jun 29, 2016 at 09:21:37AM +0100, Mark Rutland wrote: > > On Tue, Jun 28, 2016 at 01:46:04PM -0700, Kees Cook wrote: > > > On Tue, Jun 28, 2016 at 9:14 AM, Emese Revfy wrote: > > > > On Tue, 28 Jun 20

Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute

2016-06-28 Thread Emese Revfy
On Tue, 28 Jun 2016 09:43:31 -0700 Joe Perches <j...@perches.com> wrote: > On Tue, 2016-06-28 at 13:36 +0200, Emese Revfy wrote: > > The nocapture gcc attribute can be on functions only. > > The attribute takes one or more unsigned integer constants as parameters > >

Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute

2016-06-28 Thread Emese Revfy
On Tue, 28 Jun 2016 09:43:31 -0700 Joe Perches wrote: > On Tue, 2016-06-28 at 13:36 +0200, Emese Revfy wrote: > > The nocapture gcc attribute can be on functions only. > > The attribute takes one or more unsigned integer constants as parameters > > that specify the function

Re: [PATCH v1 0/2] Introduce the initify gcc plugin

2016-06-28 Thread Emese Revfy
On Tue, 28 Jun 2016 21:02:54 +0200 Rasmus Villemoes wrote: > It'll get placed in multiple sections by the compiler, and nothing bad > happens. String deduplication is something the linker does to sections > equipped with appropriate flags. So in this case that of course

Re: [PATCH v1 0/2] Introduce the initify gcc plugin

2016-06-28 Thread Emese Revfy
On Tue, 28 Jun 2016 21:02:54 +0200 Rasmus Villemoes wrote: > It'll get placed in multiple sections by the compiler, and nothing bad > happens. String deduplication is something the linker does to sections > equipped with appropriate flags. So in this case that of course means Note that I didn't

Re: [PATCH v1 0/2] Introduce the initify gcc plugin

2016-06-28 Thread Emese Revfy
On Tue, 28 Jun 2016 19:00:22 +0200 Mathias Krause wrote: > > section vanilla vanilla + initifychange > > --- > > .rodata 39059688 (0x25400e8)38527210 (0x24be0ea)

Re: [PATCH v1 0/2] Introduce the initify gcc plugin

2016-06-28 Thread Emese Revfy
On Tue, 28 Jun 2016 19:00:22 +0200 Mathias Krause wrote: > > section vanilla vanilla + initifychange > > --- > > .rodata 39059688 (0x25400e8)38527210 (0x24be0ea)-532478 > > .data

Re: [kernel-hardening] [PATCH v1 0/2] Introduce the initify gcc plugin

2016-06-28 Thread Emese Revfy
On Tue, 28 Jun 2016 13:57:49 +0100 Mark Rutland <mark.rutl...@arm.com> wrote: > On Tue, Jun 28, 2016 at 01:34:07PM +0200, Emese Revfy wrote: > > This patch set is based on the "Add support for complex gcc plugins that > > don't fit in a single file" patch se

Re: [kernel-hardening] [PATCH v1 0/2] Introduce the initify gcc plugin

2016-06-28 Thread Emese Revfy
On Tue, 28 Jun 2016 13:57:49 +0100 Mark Rutland wrote: > On Tue, Jun 28, 2016 at 01:34:07PM +0200, Emese Revfy wrote: > > This patch set is based on the "Add support for complex gcc plugins that > > don't fit in a single file" patch set (git/kees/linux.git#kspp HEAD

Re: [PATCH v1 0/2] Introduce the initify gcc plugin

2016-06-28 Thread Emese Revfy
On Tue, 28 Jun 2016 13:34:07 +0200 Emese Revfy <re.em...@gmail.com> wrote: > * automatically discover init/exit functions and apply the __init or >__exit attributes on them Hi, I have a question about this. If a function is called by __init and __exit functions as well

Re: [PATCH v1 0/2] Introduce the initify gcc plugin

2016-06-28 Thread Emese Revfy
On Tue, 28 Jun 2016 13:34:07 +0200 Emese Revfy wrote: > * automatically discover init/exit functions and apply the __init or >__exit attributes on them Hi, I have a question about this. If a function is called by __init and __exit functions as well then I move it to the __exit sect

[PATCH v1 2/2] Mark functions with the __nocapture attribute

2016-06-28 Thread Emese Revfy
the arm, arm64 and powerpc architectures. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- arch/arm/include/asm/string.h | 10 +++--- arch/arm64/include/asm/string.h | 23 ++-- arch/powerpc/include/asm/string.h | 19 +- arch/x86/boot/string.h| 4 +-- ar

[PATCH v1 1/2] Add the initify gcc plugin

2016-06-28 Thread Emese Revfy
systems. The instrumentation pass of the latent_entropy plugin must run after the initify plugin to increase coverage. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- arch/Kconfig | 23 + include/asm-generic/vmlinux.lds.h|2 + scripts/Makefile.gcc-p

[PATCH v1 2/2] Mark functions with the __nocapture attribute

2016-06-28 Thread Emese Revfy
the arm, arm64 and powerpc architectures. Signed-off-by: Emese Revfy --- arch/arm/include/asm/string.h | 10 +++--- arch/arm64/include/asm/string.h | 23 ++-- arch/powerpc/include/asm/string.h | 19 +- arch/x86/boot/string.h| 4 +-- arch/x86/include/asm/string_32

[PATCH v1 1/2] Add the initify gcc plugin

2016-06-28 Thread Emese Revfy
systems. The instrumentation pass of the latent_entropy plugin must run after the initify plugin to increase coverage. Signed-off-by: Emese Revfy --- arch/Kconfig | 23 + include/asm-generic/vmlinux.lds.h|2 + scripts/Makefile.gcc-plugins |4 + scripts

[PATCH v1 0/2] Introduce the initify gcc plugin

2016-06-28 Thread Emese Revfy
77576664 (0x49fb9d8) -38464 .init.text 1108455 (0x10e9e7) 1137618 (0x115bd2) +29163 Emese Revfy (2): Add the initify gcc plugin Mark functions with the __nocapture attribute --- arch/Kconfig | 23 + arch/arm/include/asm/string.h| 1

[PATCH v1 0/2] Introduce the initify gcc plugin

2016-06-28 Thread Emese Revfy
77576664 (0x49fb9d8) -38464 .init.text 1108455 (0x10e9e7) 1137618 (0x115bd2) +29163 Emese Revfy (2): Add the initify gcc plugin Mark functions with the __nocapture attribute --- arch/Kconfig | 23 + arch/arm/include/asm/string.h| 1

[PATCH v4 4/4] Add the extra_latent_entropy kernel parameter

2016-06-20 Thread Emese Revfy
When extra_latent_entropy is passed on the kernel command line, entropy will be extracted from up to the first 4GB of RAM while the runtime memory allocator is being initialized. Based on work created by the PaX Team. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- Documentation/

[PATCH v4 4/4] Add the extra_latent_entropy kernel parameter

2016-06-20 Thread Emese Revfy
When extra_latent_entropy is passed on the kernel command line, entropy will be extracted from up to the first 4GB of RAM while the runtime memory allocator is being initialized. Based on work created by the PaX Team. Signed-off-by: Emese Revfy --- Documentation/kernel-parameters.txt | 5

[PATCH v4 3/4] Mark functions with the latent_entropy attribute

2016-06-20 Thread Emese Revfy
with integer fields. These functions have been selected because they are init functions or are called at random times or they have variable loops. Signed-off-by: Emese Revfy <re.em...@gmail.com> --- block/blk-softirq.c | 2 +- drivers/char/random.c| 6 +++--- fs/names

[PATCH v4 3/4] Mark functions with the latent_entropy attribute

2016-06-20 Thread Emese Revfy
with integer fields. These functions have been selected because they are init functions or are called at random times or they have variable loops. Signed-off-by: Emese Revfy --- block/blk-softirq.c | 2 +- drivers/char/random.c| 6 +++--- fs/namespace.c | 1 + include

[PATCH v4 2/4] Add the latent_entropy gcc plugin

2016-06-20 Thread Emese Revfy
in do_one_initcall() and _do_fork(). Signed-off-by: Emese Revfy <re.em...@gmail.com> --- arch/Kconfig| 18 + arch/powerpc/kernel/Makefile| 4 + include/linux/random.h | 10 + init/main.c

[PATCH v4 2/4] Add the latent_entropy gcc plugin

2016-06-20 Thread Emese Revfy
in do_one_initcall() and _do_fork(). Signed-off-by: Emese Revfy --- arch/Kconfig| 18 + arch/powerpc/kernel/Makefile| 4 + include/linux/random.h | 10 + init/main.c | 1 + kernel/fork.c

  1   2   3   >