Re: [PATCH v8] add -fpatchable-function-entry=N,M option

2017-06-06 Thread Torsten Duwe
On Sun, Jun 04, 2017 at 08:12:49PM -0600, Sandra Loosemore wrote: > On 05/29/2017 04:29 AM, Maxim Kuvyrkov wrote: > > >>diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > >>index 65308c9d933..6cbb77a8dc4 100644 > >>--- a/gcc/doc/invoke.texi > >>+++ b/gcc/doc/invoke.texi > >>@@ -11382,6 +1138

[PATCH v9] add -fpatchable-function-entry=N,M option

2017-06-13 Thread Torsten Duwe
Changes since v8: * Documentation changes as requested by Sandra * 3 functional test cases added Torsten gcc/c-family/ChangeLog 2017-06-13 Torsten Duwe * c-attribs.c (c_common_attribute_table): Add entry for "patchable_function_entry". gcc/lto/ChangeL

Re: [PATCH v9] add -fpatchable-function-entry=N,M option

2017-06-30 Thread Torsten Duwe
Richard, Ping? On Tue, Jun 13, 2017 at 07:00:27PM +0200, Torsten Duwe wrote: > Changes since v8: > > * Documentation changes as requested by Sandra > * 3 functional test cases added > > Torsten > > > gcc/c-family/ChangeLog > 2017-06-13 Torsten D

Re: [PATCH v9] add -fpatchable-function-entry=N,M option

2017-07-04 Thread Torsten Duwe
On Tue, Jul 04, 2017 at 12:02:47PM +0100, Richard Earnshaw (lists) wrote: > On 13/06/17 18:00, Torsten Duwe wrote: > > Changes since v8: > > > > * Documentation changes as requested by Sandra > > * 3 functional test cases added > > > > Torst

Re: [PATCH v9] add -fpatchable-function-entry=N,M option

2017-07-04 Thread Torsten Duwe
On Tue, Jul 04, 2017 at 02:27:00PM +0100, Richard Earnshaw (lists) wrote: > > > > How about omitting the recording step and document that? This way the > > instrumentation can still be useful on e.g. a.out format; the framework > > would then have to check around each function entry whether the NO

[PATCH v10] add -fpatchable-function-entry=N,M option

2017-07-05 Thread Torsten Duwe
Torsten Duwe * c-attribs.c (c_common_attribute_table): Add entry for "patchable_function_entry". gcc/lto/ChangeLog 2017-07-04 Torsten Duwe * lto-lang.c (lto_attribute_table): Add entry for "patchable_function_entry". gcc/ChangeLog 2017

[PATCH v11] add -fpatchable-function-entry=N,M option

2017-07-06 Thread Torsten Duwe
Permit A 38 gcc/c-family/ChangeLog 2017-07-06 Torsten Duwe * c-attribs.c (c_common_attribute_table): Add entry for "patchable_function_entry". gcc/lto/ChangeLog 2017-07-06 Torsten Duwe * lto-lang.c (lto_attribute_table): Add

[PATCH v12] add -fpatchable-function-entry=N,M option

2017-07-07 Thread Torsten Duwe
Change since v11: < +#if TARGET_HAVE_NAMED_SECTIONS > + if (record_p && targetm_common.have_named_sections) (plus > +#include "common/common-target.h" ) Torsten gcc/c-family/ChangeLog 2017-07-07 Torsten Duwe * c-attribs.c (c_common_attr

Re: [PATCH v12] add -fpatchable-function-entry=N,M option

2017-07-17 Thread Torsten Duwe
What is the next step now? Is anybody going to commit that patch? Torsten On Fri, Jul 07, 2017 at 02:57:55PM +0100, Richard Earnshaw (lists) wrote: > On 06/07/17 15:03, Torsten Duwe wrote: > +#if TARGET_HAVE_NAMED_SECTIONS No, this is a hook. You need t

Re: [PATCH v12] add -fpatchable-function-entry=N,M option

2017-07-20 Thread Torsten Duwe
On Thu, Jul 20, 2017 at 01:58:06PM +0300, Maxim Kuvyrkov wrote: > > On Jul 17, 2017, at 3:10 PM, Torsten Duwe wrote: > > > > What is the next step now? Is anybody going to commit that patch? > > Torsten, if you prefer I can commit your patch (after bootstrap and a reg

Re: [PATCH v12] add -fpatchable-function-entry=N,M option

2017-07-25 Thread Torsten Duwe
On Tue, Jul 25, 2017 at 10:12:00AM +0300, Maxim Kuvyrkov wrote: > > I confirmed that bootstrap and reg test on x86_64-linux-gnu and > aarch64-linux-gnu are OK. Thanks a lot! > Torsten, any update on which way you are going to handle copyright assignment > -- apply for a new one or have one of

Re: [PATCH v12] add -fpatchable-function-entry=N,M option

2017-07-25 Thread Torsten Duwe
On Tue, Jul 25, 2017 at 10:12:00AM +0300, Maxim Kuvyrkov wrote: > > > > SuSe/Novell choose to do its assignments per engineer, not for the whole > > company, so I don't think you are covered as is. > > Torsten, any update on which way you are going to handle copyright assignment > -- apply for

Re: [PATCH v12] add -fpatchable-function-entry=N,M option

2017-07-26 Thread Torsten Duwe
On Wed, Jul 26, 2017 at 04:16:25PM +0200, Andreas Schwab wrote: > On Jul 07 2017, Torsten Duwe wrote: > > > diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c > > b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c > > new file mode 1006

[PATCH] skip patchable_function_entry tests on ia64

2017-08-11 Thread Torsten Duwe
ement with alternate binary code. But I'd rather leave this to the platform experts, or whoever comes up with a good use case, to implement the proper cpu override hook. Meanwhile, as long as the expected results remain undefined, disable the tests. Torsten gcc/testsuite/ChangeLog 2017

[PATCH v4] add -fprolog-pad=N,M option

2016-12-21 Thread Torsten Duwe
code sizes and offsets around the prologue? (All target CPUs have an insn called "nop" which does what we expect, AFAICS ;-) gcc should error out somehow meaningfully, IMHO. Torsten 2016-12-21 Torsten Duwe : * c-family/c-attribs.c : introduce prolog_pad attribu

[PATCH v5] add -fprolog-pad=N,M option

2017-01-13 Thread Torsten Duwe
Changes since v4: hopefully addressed all of Sandra's requests and suggestions concerning the documentation snippets, thanks for the feedback. If it still isn't clear, feel free to rephrase -- I'm a programmer, not a technical writer. 2017-01-13 Torsten Duwe :

Re: [PATCH v5] add -fprolog-pad=N,M option

2017-01-23 Thread Torsten Duwe
And what's next now? Maxim mentioned in this thread you should sort of formally approve(?) a global feature, have you had a look at it yet? I should emphasize that this code can substitute the -fentry for arm64 for the purpose of kernel live patching that was discussed in the beginning, as well a

[PATCH v8] add -fpatchable-function-entry=N,M option

2017-05-03 Thread Torsten Duwe
s about now? Here is version 8, which is functionally identical to v6 (v7 tried to guard the gen_nop call, which you wrote isn't neccessary). The longer names required some reformatting. Torsten gcc/c-family/ChangeLog 2017-05-03 Torsten Duwe * c-attrib

Re: [PATCH v5] add -fprolog-pad=N,M option

2017-02-08 Thread Torsten Duwe
On Mon, Jan 23, 2017 at 05:25:45PM +0100, Bernd Schmidt wrote: > There's still a a few details that need addressing, and some questions I > have. Also Ccing Jakub to have another pair of eyes on the name of the > section - I don't know if we want some sort of .gnu.something name. So Jakub, Richard

[PATCH v6] add -fprolog-pad=N,M option

2017-02-17 Thread Torsten Duwe
ument () * Documentation has less "pad"s * completely reworked default_print_prolog_pad () -- never liked the old version either. Torsten gcc/c-family/ChangeLog 2017-02-17 Torsten Duwe * c-attribs.c (c_common_attribute_table): Add entry for "prolog_pad"

Re: [PATCH v5] add -fprolog-pad=N,M option

2017-02-17 Thread Torsten Duwe
On Wed, Feb 15, 2017 at 11:01:16AM +, Richard Earnshaw (lists) wrote: > On 13/01/17 12:19, Torsten Duwe wrote: > > > +++ b/gcc/doc/invoke.texi > > @@ -11341,6 +11341,27 @@ of the function name, it is considered to be a > > match. For C99 and C++ > > extended

Re: [PATCH v5] add -fprolog-pad=N,M option

2017-02-17 Thread Torsten Duwe
On Wed, Feb 08, 2017 at 12:48:56PM +0100, Jakub Jelinek wrote: > > First of all, GCC is in stage4 and this isn't a fix for a regression, so it > is not acceptable at this point. Next stage1 will start in April or so. I had gotten the impression there were sort of branches in the SCM; this of cou

Poll for option name (Was: [PATCH v6] add -fprolog-pad=N,M option)

2017-03-01 Thread Torsten Duwe
On Fri, Feb 17, 2017 at 11:30:29PM -0700, Sandra Loosemore wrote: > > > >+@item prolog_pad > >+@cindex @code{prolog_pad} function attribute > > I'm only a documentation maintainer so this is out of my area of > responsibility, but I really wish we could rename the attribute and > command-line opti

Re: Poll for option name (Was: [PATCH v6] add -fprolog-pad=N,M option)

2017-03-01 Thread Torsten Duwe
On Wed, Mar 01, 2017 at 11:34:37AM +, Richard Earnshaw (lists) wrote: > On 01/03/17 11:26, Torsten Duwe wrote: > > > > However, writing some more documentation and being asked for clarity, > > I found it more depicting to talk about the function entry point than > &g

Re: [PATCH] [AArch64] support -mfentry feature for arm64

2016-04-19 Thread Torsten Duwe
On Mon, Apr 18, 2016 at 02:12:09PM +0200, Michael Matz wrote: > > . It can also be solved by having just one NOP after the function label, > and a number of them before, then no thread can be in the nop pad. That > seems to indicate that GCC should not try to be too clever and simply > leave

[PATCH v2] add -fprolog-pad=N option to c-family

2016-09-29 Thread Torsten Duwe
ord a prolog_nop_pad_size value specified on the command line in each function's attributes, so that it survives an LTO pipe. Signed-off-by: Torsten Duwe diff --git a/gcc/attribs.c b/gcc/attribs.c index 16996e9..a5cf2aa 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -365,6 +365,21 @@ decl_attributes (

Re: [PATCH v2] add -fprolog-pad=N option to c-family

2016-09-30 Thread Torsten Duwe
On Fri, Sep 30, 2016 at 12:01:47PM +0200, Jose E. Marchesi wrote: > > How is this supposed to be exploited atomically in RISC arches such as > sparc? In such architectures you usually need to patch several > instructions to load an absolute address into a register. http://mpe.github.io/posts/201

[PATCH v3] add -fprolog-pad=N,M option

2016-12-16 Thread Torsten Duwe
imisation here is potentially wrong. > >> > >> * record a prolog_nop_pad_size value specified on the command line > >> in each function's attributes, so that it survives an LTO pipe. > >> Signed-off-by: Torsten Duwe diff --git a/gcc/attribs.c b/gc

[PATCH] add -fprolog-pad=N option to c-family

2016-04-27 Thread Torsten Duwe
Hi Maxim, thanks for starting the work on this; I have added the missing command line option. It builds now and the resulting compiler generates a linux kernel with the desired properties, so work can continue there. Torsten diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c

Re: [PATCH] add -fprolog-pad=N option to c-family

2016-04-28 Thread Torsten Duwe
On Thu, Apr 28, 2016 at 11:39:48AM +0300, Maxim Kuvyrkov wrote: > > On Apr 27, 2016, at 6:22 PM, Torsten Duwe wrote: > > Your current patch is great for experiments for the kernel engineers to check > if suggested approaches to code patching will work. Still, I prefer to

Re: [PATCH] add -fprolog-pad=N option to c-family

2016-04-28 Thread Torsten Duwe
On Thu, Apr 28, 2016 at 11:58:25AM +0100, Szabolcs Nagy wrote: > On 28/04/16 09:47, Maxim Kuvyrkov wrote: > >> On Apr 27, 2016, at 7:26 PM, Szabolcs Nagy wrote: > >> > >> with -mfentry, by default the user only has to > >> implement the fentry call (linux wants nops there, but > >> e.g. glibc coul

[PATCH] avr: add support for tinyAVR 2 family

2022-04-26 Thread Torsten Duwe via Gcc-patches
Signed-off-by: Torsten Duwe --- gcc/ChangeLog: 2022-04-26 Torsten Duwe * config/avr/avr-mcus.def (AVR_MCU): add definitions for attiny{4,8,16,32}2{4,6,7}; 4k and 8k flash types use RCALL. --- a/gcc/config/avr/avr-mcus.def +++ b/gcc/config/avr/avr-mcus.def @@ -333,6