<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/riscv/kernel/mcount.S, branch linux-6.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-02-22T23:38:54Z</updated>
<entry>
<title>riscv: remove MCOUNT_NAME workaround</title>
<updated>2024-02-22T23:38:54Z</updated>
<author>
<name>Nathan Chancellor</name>
</author>
<published>2024-01-25T22:55:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de5f3984664e55bdb5f29108d579857facd407ac'/>
<id>urn:sha1:de5f3984664e55bdb5f29108d579857facd407ac</id>
<content type='text'>
Now that the minimum supported version of LLVM for building the kernel has
been bumped to 13.0.1, the condition for using _mcount as MCOUNT_NAME is
always true, as the build will fail during the configuration stage for
older LLVM versions.  Replace MCOUNT_NAME with _mcount directly.

This effectively reverts commit 7ce047715030 ("riscv: Workaround mcount
name prior to clang-13").

Link: https://lkml.kernel.org/r/20240125-bump-min-llvm-ver-to-13-0-1-v1-7-f5ff9bda41c5@kernel.org
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Albert Ou &lt;aou@eecs.berkeley.edu&gt;
Cc: "Aneesh Kumar K.V (IBM)" &lt;aneesh.kumar@kernel.org&gt;
Cc: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Cc: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Conor Dooley &lt;conor@kernel.org&gt;
Cc: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Cc: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Cc: "Naveen N. Rao" &lt;naveen.n.rao@linux.ibm.com&gt;
Cc: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Cc: Nicolas Schier &lt;nicolas@fjasle.eu&gt;
Cc: Palmer Dabbelt &lt;palmer@dabbelt.com&gt;
Cc: Paul Walmsley &lt;paul.walmsley@sifive.com&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>use linux/export.h rather than asm-generic/export.h</title>
<updated>2024-01-10T04:10:40Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2023-12-14T19:19:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62694797f56bf72e4c598bc0e319c7b828c1b187'/>
<id>urn:sha1:62694797f56bf72e4c598bc0e319c7b828c1b187</id>
<content type='text'>
asm-generic/export.h is a wrapper for linux/export.h, with explicit request
to use linux/export.h directly.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Link: https://lore.kernel.org/r/20231214191922.GQ1674809@ZenIV
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>riscv: Use SYM_*() assembly macros instead of deprecated ones</title>
<updated>2023-11-06T17:42:47Z</updated>
<author>
<name>Clément Léger</name>
</author>
<published>2023-10-24T13:26:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=76329c693924d8f37afbf361f0d8daab594e1644'/>
<id>urn:sha1:76329c693924d8f37afbf361f0d8daab594e1644</id>
<content type='text'>
ENTRY()/END()/WEAK() macros are deprecated and we should make use of the
new SYM_*() macros [1] for better annotation of symbols. Replace the
deprecated ones with the new ones and fix wrong usage of END()/ENDPROC()
to correctly describe the symbols.

[1] https://docs.kernel.org/core-api/asm-annotations.html

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Link: https://lore.kernel.org/r/20231024132655.730417-3-cleger@rivosinc.com
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>riscv: use ".L" local labels in assembly when applicable</title>
<updated>2023-11-06T17:42:05Z</updated>
<author>
<name>Clément Léger</name>
</author>
<published>2023-10-24T13:26:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b18f7296fbfdb2ad0871f00f3042fc74663d52ac'/>
<id>urn:sha1:b18f7296fbfdb2ad0871f00f3042fc74663d52ac</id>
<content type='text'>
For the sake of coherency, use local labels in assembly when
applicable. This also avoid kprobes being confused when applying a
kprobe since the size of function is computed by checking where the
next visible symbol is located. This might end up in computing some
function size to be way shorter than expected and thus failing to apply
kprobes to the specified offset.

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Link: https://lore.kernel.org/r/20231024132655.730417-2-cleger@rivosinc.com
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>riscv: Add ftrace_stub_graph</title>
<updated>2023-08-23T21:16:38Z</updated>
<author>
<name>Sami Tolvanen</name>
</author>
<published>2023-07-10T18:35:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f3a0c23f2539a69792df4586485225fda5fab988'/>
<id>urn:sha1:f3a0c23f2539a69792df4586485225fda5fab988</id>
<content type='text'>
Commit 883bbbffa5a4 ("ftrace,kcfi: Separate ftrace_stub() and
ftrace_stub_graph()") added a separate ftrace_stub_graph function for
CFI_CLANG. Add the stub to fix FUNCTION_GRAPH_TRACER compatibility
with CFI.

Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Link: https://lore.kernel.org/r/20230710183544.999540-11-samitolvanen@google.com
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>riscv: Add types to indirectly called assembly functions</title>
<updated>2023-08-23T21:16:37Z</updated>
<author>
<name>Sami Tolvanen</name>
</author>
<published>2023-07-10T18:35:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f59c6855bad1809a4f85ce4db412f9ede45a4a0'/>
<id>urn:sha1:5f59c6855bad1809a4f85ce4db412f9ede45a4a0</id>
<content type='text'>
With CONFIG_CFI_CLANG, assembly functions indirectly called
from C code must be annotated with type identifiers to pass CFI
checking. Use the SYM_TYPED_START macro to add types to the
relevant functions.

Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Link: https://lore.kernel.org/r/20230710183544.999540-10-samitolvanen@google.com
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>riscv: ftrace: Enable HAVE_FUNCTION_GRAPH_RETVAL</title>
<updated>2023-06-22T14:39:56Z</updated>
<author>
<name>Donglin Peng</name>
</author>
<published>2023-04-08T12:42:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b97aec082b51a0728adc9f69494826d32e0d1f8f'/>
<id>urn:sha1:b97aec082b51a0728adc9f69494826d32e0d1f8f</id>
<content type='text'>
The previous patch ("function_graph: Support recording and printing
the return value of function") has laid the groundwork for the for
the funcgraph-retval, and this modification makes it available on
the RISC-V platform.

We introduce a new structure called fgraph_ret_regs for the RISC-V
platform to hold return registers and the frame pointer. We then
fill its content in the return_to_handler and pass its address to
the function ftrace_return_to_handler to record the return value.

Link: https://lore.kernel.org/linux-trace-kernel/a8d71b12259f90e7e63d0ea654fcac95b0232bbc.1680954589.git.pengdonglin@sangfor.com.cn

Signed-off-by: Donglin Peng &lt;pengdonglin@sangfor.com.cn&gt;
Acked-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>RISC-V: preserve a1 in mcount</title>
<updated>2022-12-02T18:04:37Z</updated>
<author>
<name>Jamie Iles</name>
</author>
<published>2022-11-15T20:08:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc58a24db8c12ea361e94eaf53adc5d471534694'/>
<id>urn:sha1:dc58a24db8c12ea361e94eaf53adc5d471534694</id>
<content type='text'>
The RISC-V ELF psABI states that both a0 and a1 are used for return
values so we should preserve them both in return_to_handler.  This is
especially important for RV32 for functions returning a 64-bit quantity
otherwise the return value can be corrupted and undefined behaviour
results.

Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Signed-off-by: Jamie Iles &lt;jamie@jamieiles.com&gt;
Link: https://lore.kernel.org/r/20221115200832.706370-4-jamie@jamieiles.com
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>RISC-V: reduce mcount save space on RV32</title>
<updated>2022-12-02T18:04:36Z</updated>
<author>
<name>Jamie Iles</name>
</author>
<published>2022-11-15T20:08:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3bd7743f8d6d7171db9897a746038eefd52a1fbd'/>
<id>urn:sha1:3bd7743f8d6d7171db9897a746038eefd52a1fbd</id>
<content type='text'>
For RV32 we can reduce the size of the ABI save+restore state by using
SZREG so that register stores are packed rather than on an 8 byte
boundary.

Signed-off-by: Jamie Iles &lt;jamie@jamieiles.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Link: https://lore.kernel.org/r/20221115200832.706370-3-jamie@jamieiles.com
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>RISC-V: use REG_S/REG_L for mcount</title>
<updated>2022-12-02T18:04:35Z</updated>
<author>
<name>Jamie Iles</name>
</author>
<published>2022-11-15T20:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a6841c439dfbba2067a533b0e8264ea438689f6'/>
<id>urn:sha1:8a6841c439dfbba2067a533b0e8264ea438689f6</id>
<content type='text'>
In preparation for rv32i ftrace support, convert mcount routines to use
native sized loads/stores.

Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Signed-off-by: Jamie Iles &lt;jamie@jamieiles.com&gt;
Link: https://lore.kernel.org/r/20221115200832.706370-2-jamie@jamieiles.com
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
</content>
</entry>
</feed>
