| 4b49df65 | 26-Jul-2023 |
Chen Jiahao <[email protected]> |
samples/hw_breakpoint: mark sample_hbp as static
There is a sparse warning shown as below:
samples/hw_breakpoint/data_breakpoint.c:24:19: warning: symbol 'sample_hbp' was not declared. Should it be
samples/hw_breakpoint: mark sample_hbp as static
There is a sparse warning shown as below:
samples/hw_breakpoint/data_breakpoint.c:24:19: warning: symbol 'sample_hbp' was not declared. Should it be static?
Since 'sample_hbp' is only called within data_breakpoint.c, mark it as static to fix the warning.
Fixes: 44ee63587dce ("percpu: Add __percpu sparse annotations to hw_breakpoint") Signed-off-by: Chen Jiahao <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
show more ...
|
| b9080468 | 25-Jul-2023 |
Arnd Bergmann <[email protected]> |
samples/hw_breakpoint: fix building without module unloading
__symbol_put() is really meant as an internal helper and is not available when module unloading is disabled, unlike the previously used s
samples/hw_breakpoint: fix building without module unloading
__symbol_put() is really meant as an internal helper and is not available when module unloading is disabled, unlike the previously used symbol_put():
samples/hw_breakpoint/data_breakpoint.c: In function 'hw_break_module_exit': samples/hw_breakpoint/data_breakpoint.c:73:9: error: implicit declaration of function '__symbol_put'; did you mean '__symbol_get'? [-Werror=implicit-function-declaration]
The hw_break_module_exit() function is not actually used when module unloading is disabled, but it still causes the build failure for an undefined identifier. Enclose this one call in an appropriate #ifdef to clarify what the requirement is. Leaving out the entire exit function would also work but feels less clar in this case.
Fixes: 910e230d5f1bb ("samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000'") Fixes: d8a84d33a4954 ("samples/hw_breakpoint: drop use of kallsyms_lookup_name()") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
show more ...
|
| d8a84d33 | 07-Apr-2020 |
Will Deacon <[email protected]> |
samples/hw_breakpoint: drop use of kallsyms_lookup_name()
The 'data_breakpoint' test code is the only modular user of kallsyms_lookup_name(), which was exported as part of fixing the test in f60d24d
samples/hw_breakpoint: drop use of kallsyms_lookup_name()
The 'data_breakpoint' test code is the only modular user of kallsyms_lookup_name(), which was exported as part of fixing the test in f60d24d2ad04 ("hw-breakpoints: Fix broken hw-breakpoint sample module").
In preparation for un-exporting this symbol, switch the test over to using __symbol_get(), which can be used to place breakpoints on exported symbols.
Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Masami Hiramatsu <[email protected]> Reviewed-by: Quentin Perret <[email protected]> Cc: K.Prasad <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Miroslav Benes <[email protected]> Cc: Petr Mladek <[email protected]> Cc: Joe Lawrence <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
show more ...
|
| dd1853c3 | 27-Nov-2009 |
Frederic Weisbecker <[email protected]> |
hw-breakpoints: Use struct perf_event_attr to define kernel breakpoints
Kernel breakpoints are created using functions in which we pass breakpoint parameters as individual variables: address, length
hw-breakpoints: Use struct perf_event_attr to define kernel breakpoints
Kernel breakpoints are created using functions in which we pass breakpoint parameters as individual variables: address, length and type.
Although it fits well for x86, this just does not scale across architectures that may support this api later as these may have more or different needs. Pass in a perf_event_attr structure instead because it is meant to evolve as much as possible into a generic hardware breakpoint parameter structure.
Reported-by: K.Prasad <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
show more ...
|