[(pushed)] docs: document new --param=asan-kernel-mem-intrinsic-prefix

Message ID 7f2b6f00-c5f0-474d-280f-27f241e8fdf4@suse.cz
State Committed
Commit 545c9f8b78bae8ed542e7da4ed537edeb7485c30
Series [(pushed)] docs: document new --param=asan-kernel-mem-intrinsic-prefix |

Commit Message

Martin Liška Feb. 15, 2023, 8:39 a.m. UTC

	* doc/invoke.texi: Document --param=asan-kernel-mem-intrinsic-prefix.
 gcc/doc/invoke.texi | 4 ++++
 1 file changed, 4 insertions(+)


Jakub Jelinek Feb. 15, 2023, 8:41 a.m. UTC | #1
On Wed, Feb 15, 2023 at 09:39:11AM +0100, Martin Liška wrote:
> gcc/ChangeLog:
> 	* doc/invoke.texi: Document --param=asan-kernel-mem-intrinsic-prefix.

Ok, thanks.

Sandra Loosemore March 12, 2023, 4:03 a.m. UTC | #2
On 2/15/23 01:39, Martin Liška wrote:
> gcc/ChangeLog:
> 	* doc/invoke.texi: Document --param=asan-kernel-mem-intrinsic-prefix.

I noticed this new text was missing Texinfo markup, so I've committed 
the attached followup patch.

I also wonder why this thing and several of the other asan things were 
added as parameters instead of options.  --param documentation is in the 
optimization options section, and the text before the table this new 
blurb was inserted into reads:

"In some places, GCC uses various constants to control the amount of
optimization that is done.  For example, GCC does not inline functions
that contain more than a certain number of instructions.  You can
control some of these constants on the command line using the
@option{--param} option. [...]"

I guess it is too late (at least for GCC 13) to change these things to 
be options and not parameters, but if we're now using --param for things 
other than avoiding hard-wired magic numbers in GCC's optimizers, we 
should probably move the --param documentation out of the optimization 
section and rewrite the description of what it's for.



diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 26de582e41e..0a43720f614 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -15809,6 +15809,10 @@  is greater or equal to this number, use callbacks instead of inline checks.
 E.g. to disable inline code use
 @option{--param asan-instrumentation-with-call-threshold=0}.
+@item asan-kernel-mem-intrinsic-prefix
+Prefix calls to memcpy, memset and memmove with __asan_ or __hwasan_
+for -fsanitize=kernel-address or -fsanitize=kernel-hwaddress.
 @item hwasan-instrument-stack
 Enable hwasan instrumentation of statically sized stack-allocated variables.
 This kind of instrumentation is enabled by default when using