From: "PaX Team" <pageexec@freemail.hu>
To: kernel-hardening@lists.openwall.com, Kees Cook <keescook@chromium.org>
Cc: Emese Revfy <re.emese@gmail.com>,
linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Josh Triplett <josh@joshtriplett.org>,
spender@grsecurity.net, mmarek@suse.com,
yamada.masahiro@socionext.com, linux-kbuild@vger.kernel.org,
minipli@ld-linux.so, linux@armlinux.org.uk,
catalin.marinas@arm.com, linux@rasmusvillemoes.dk,
david.brown@linaro.org, benh@kernel.crashing.org,
tglx@linutronix.de, akpm@linux-foundation.org,
jlayton@poochiereds.net, sam@ravnborg.org
Subject: [kernel-hardening] Re: [PATCH v4 1/4] gcc-plugins: Add the initify gcc plugin
Date: Fri, 16 Dec 2016 23:45:42 +0100 [thread overview]
Message-ID: <58546E96.16770.2C23F1B4@pageexec.freemail.hu> (raw)
In-Reply-To: <1481925984-98605-2-git-send-email-keescook@chromium.org>
On 16 Dec 2016 at 14:06, Kees Cook wrote:
> diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
> index 950fd2e64bb7..369bfb471e58 100644
> --- a/scripts/gcc-plugins/gcc-common.h
> +++ b/scripts/gcc-plugins/gcc-common.h
> @@ -287,6 +287,26 @@ static inline struct cgraph_node *cgraph_next_function_with_gimple_body(struct c
> return NULL;
> }
>
> +static inline bool cgraph_for_node_and_aliases(cgraph_node_ptr node,
> + bool (*callback)(cgraph_node_ptr, void *),
> + void *data, bool include_overwritable)
> +{
> + cgraph_node_ptr alias;
> +
> + if (callback(node, data))
> + return true;
> +
> + for (alias = node->same_body; alias; alias = alias->next) {
> + if (include_overwritable ||
> + cgraph_function_body_availability(alias) > AVAIL_OVERWRITABLE)
> + if (cgraph_for_node_and_aliases(alias, callback, data,
> + include_overwritable))
> + return true;
> + }
> +
> + return false;
> +}
> +
> #define FOR_EACH_FUNCTION_WITH_GIMPLE_BODY(node) \
> for ((node) = cgraph_first_function_with_gimple_body(); (node); \
> (node) = cgraph_next_function_with_gimple_body(node))
this hunk above and...
> @@ -674,6 +707,14 @@ static inline cgraph_node_ptr cgraph_alias_target(cgraph_node_ptr node)
> return node->get_alias_target();
> }
>
> +static inline bool cgraph_for_node_and_aliases(cgraph_node_ptr node,
> + bool (*callback)(cgraph_node_ptr, void *),
> + void *data, bool include_overwritable)
> +{
> + return node->call_for_symbol_thunks_and_aliases(callback, data,
> + include_overwritable);
> +}
> +
> static inline struct cgraph_node_hook_list *cgraph_add_function_insertion_hook(cgraph_node_hook hook, void *data)
> {
> return symtab->add_cgraph_insertion_hook(hook, data);
...this one aren't needed by any plugins upstream so maybe introduce them when
the needed arises? and the whole patch against gcc-common.h would also conflict
with the version i maintain and that you said you'd sync to so there's a decision
to be made regarding how this will is to be maintained...
next prev parent reply other threads:[~2016-12-16 22:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-16 22:06 [kernel-hardening] [PATCH v4 0/4] Introduce the initify gcc plugin Kees Cook
2016-12-16 22:06 ` [kernel-hardening] [PATCH v4 1/4] gcc-plugins: Add " Kees Cook
2016-12-16 22:45 ` PaX Team [this message]
2016-12-16 23:02 ` [kernel-hardening] " Kees Cook
2016-12-16 23:15 ` PaX Team
2016-12-16 22:06 ` [kernel-hardening] [PATCH v4 2/4] util: Move type casts into is_kernel_rodata Kees Cook
2016-12-16 22:06 ` [kernel-hardening] [PATCH v4 3/4] initify: Mark functions with the __nocapture attribute Kees Cook
2016-12-16 22:06 ` [kernel-hardening] [PATCH v4 4/4] initify: Mark functions with the __unverified_nocapture attribute Kees Cook
2016-12-16 22:19 ` [kernel-hardening] Re: [PATCH v4 0/4] Introduce the initify gcc plugin Kees Cook
2016-12-19 11:10 ` Emese Revfy
2017-01-04 0:23 ` Kees Cook
2017-01-11 0:24 ` Emese Revfy
2017-01-11 1:09 ` Kees Cook
2017-01-12 21:41 ` Emese Revfy
2017-01-12 23:27 ` Kees Cook
2017-01-12 23:40 ` Kees Cook
2017-01-17 20:31 ` Emese Revfy
2017-01-19 1:22 ` Kees Cook
2017-02-15 0:23 ` Emese Revfy
2017-02-15 19:27 ` Kees Cook
2017-02-20 21:42 ` Emese Revfy
2016-12-19 18:24 ` Laura Abbott
2017-01-04 0:23 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58546E96.16770.2C23F1B4@pageexec.freemail.hu \
--to=pageexec@freemail.hu \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=catalin.marinas@arm.com \
--cc=david.brown@linaro.org \
--cc=jlayton@poochiereds.net \
--cc=josh@joshtriplett.org \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linux@rasmusvillemoes.dk \
--cc=minipli@ld-linux.so \
--cc=mmarek@suse.com \
--cc=re.emese@gmail.com \
--cc=sam@ravnborg.org \
--cc=spender@grsecurity.net \
--cc=tglx@linutronix.de \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox