<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/nios2/kernel, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-02-06T06:49:45Z</updated>
<entry>
<title>exit: Add and use make_task_dead.</title>
<updated>2023-02-06T06:49:45Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2023-02-03T00:27:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7d5de91a9ae564c7b5869310192ab6cb72ea4c6b'/>
<id>urn:sha1:7d5de91a9ae564c7b5869310192ab6cb72ea4c6b</id>
<content type='text'>
commit 0e25498f8cd43c1b5aa327f373dd094e9a006da7 upstream.

There are two big uses of do_exit.  The first is it's design use to be
the guts of the exit(2) system call.  The second use is to terminate
a task after something catastrophic has happened like a NULL pointer
in kernel code.

Add a function make_task_dead that is initialy exactly the same as
do_exit to cover the cases where do_exit is called to handle
catastrophic failure.  In time this can probably be reduced to just a
light wrapper around do_task_dead. For now keep it exactly the same so
that there will be no behavioral differences introducing this new
concept.

Replace all of the uses of do_exit that use it for catastraphic
task cleanup with make_task_dead to make it clear what the code
is doing.

As part of this rename rewind_stack_do_exit
rewind_stack_and_make_dead.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nios2: add force_successful_syscall_return()</title>
<updated>2022-08-25T09:15:40Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2022-08-08T15:09:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8cae08d7323e65dd1bd105c071bf11cc3a68f86f'/>
<id>urn:sha1:8cae08d7323e65dd1bd105c071bf11cc3a68f86f</id>
<content type='text'>
commit fd0c153daad135d0ec1a53c5dbe6936a724d6ae1 upstream.

If we use the ancient SysV syscall ABI, we'd better have tell the
kernel how to claim that a negative return value is a success.
Use -&gt;orig_r2 for that - it's inaccessible via ptrace, so it's
a fair game for changes and it's normally[*] non-negative on return
from syscall.  Set to -1; syscall is not going to be restart-worthy
by definition, so we won't interfere with that use either.

[*] the only exception is rt_sigreturn(), where we skip the entire
messing with r1/r2 anyway.

Fixes: 82ed08dd1b0e ("nios2: Exception handling")
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Dinh Nguyen &lt;dinguyen@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nios2: restarts apply only to the first sigframe we build...</title>
<updated>2022-08-25T09:15:40Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2022-08-08T15:09:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=835e4e9d55d614e5813bcf0a4919967f74ca1928'/>
<id>urn:sha1:835e4e9d55d614e5813bcf0a4919967f74ca1928</id>
<content type='text'>
commit 411a76b7219555c55867466c82d70ce928d6c9e1 upstream.

Fixes: b53e906d255d ("nios2: Signal handling support")
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Dinh Nguyen &lt;dinguyen@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nios2: fix syscall restart checks</title>
<updated>2022-08-25T09:15:40Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2022-08-08T15:08:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=753c601390d898b15b6387a80e4d68b078359106'/>
<id>urn:sha1:753c601390d898b15b6387a80e4d68b078359106</id>
<content type='text'>
commit 2d631bd58fe0ea3e3350212e23c9aba1fb606514 upstream.

sys_foo() returns -512 (aka -ERESTARTSYS) =&gt; do_signal() sees
512 in r2 and 1 in r1.

sys_foo() returns 512 =&gt; do_signal() sees 512 in r2 and 0 in r1.

The former is restart-worthy; the latter obviously isn't.

Fixes: b53e906d255d ("nios2: Signal handling support")
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Dinh Nguyen &lt;dinguyen@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nios2: traced syscall does need to check the syscall number</title>
<updated>2022-08-25T09:15:40Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2022-08-08T15:07:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d91a2191a0f46b6250e523b130f15b520a7d9d4e'/>
<id>urn:sha1:d91a2191a0f46b6250e523b130f15b520a7d9d4e</id>
<content type='text'>
commit 25ba820ef36bdbaf9884adeac69b6e1821a7df76 upstream.

all checks done before letting the tracer modify the register
state are worthless...

Fixes: 82ed08dd1b0e ("nios2: Exception handling")
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Dinh Nguyen &lt;dinguyen@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nios2: don't leave NULLs in sys_call_table[]</title>
<updated>2022-08-25T09:15:40Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2022-08-08T15:06:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6196425ac9ae9e8d80d33635b525d88931276f41'/>
<id>urn:sha1:6196425ac9ae9e8d80d33635b525d88931276f41</id>
<content type='text'>
commit 45ec746c65097c25e77d24eae8fee0def5b6cc5d upstream.

fill the gaps in there with sys_ni_syscall, as everyone does...

Fixes: 82ed08dd1b0e ("nios2: Exception handling")
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Dinh Nguyen &lt;dinguyen@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nios2: page fault et.al. are *not* restartable syscalls...</title>
<updated>2022-08-25T09:15:39Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2022-08-08T15:06:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e48a47aeed740b09496401e4cc7a5087743b39a7'/>
<id>urn:sha1:e48a47aeed740b09496401e4cc7a5087743b39a7</id>
<content type='text'>
commit 8535c239ac674f7ead0f2652932d35c52c4123b2 upstream.

make sure that -&gt;orig_r2 is negative for everything except
the syscalls.

Fixes: 82ed08dd1b0e ("nios2: Exception handling")
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Dinh Nguyen &lt;dinguyen@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nios2: ksyms: Add missing symbol exports</title>
<updated>2020-01-27T13:50:30Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2018-11-07T02:36:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=69e9107f291df99ff624b53f6473a09295977346'/>
<id>urn:sha1:69e9107f291df99ff624b53f6473a09295977346</id>
<content type='text'>
[ Upstream commit 0f8ed994575429d6042cf5d7ef70081c94091587 ]

Building nios2:allmodconfig fails as follows (each symbol is only listed
once).

ERROR: "__ashldi3" [drivers/md/dm-writecache.ko] undefined!
ERROR: "__ashrdi3" [fs/xfs/xfs.ko] undefined!
ERROR: "__ucmpdi2" [drivers/media/i2c/adv7842.ko] undefined!
ERROR: "__lshrdi3" [drivers/md/dm-zoned.ko] undefined!
ERROR: "flush_icache_range" [drivers/misc/lkdtm/lkdtm.ko] undefined!
ERROR: "empty_zero_page" [drivers/md/dm-mod.ko] undefined!

The problem is seen with gcc 7.3.0.

Export the missing symbols.

Fixes: 2fc8483fdcde ("nios2: Build infrastructure")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Ley Foon Tan &lt;ley.foon.tan@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>signal/nios2: Use force_sig_fault where appropriate</title>
<updated>2018-04-25T15:44:04Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2018-04-16T02:10:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c046e2c693c770153acb568e56c0c41cce9c91e2'/>
<id>urn:sha1:c046e2c693c770153acb568e56c0c41cce9c91e2</id>
<content type='text'>
Filling in struct siginfo before calling force_sig_info a tedious and
error prone process, where once in a great while the wrong fields
are filled out, and siginfo has been inconsistently cleared.

Simplify this process by using the helper force_sig_fault.  Which
takes as a parameters all of the information it needs, ensures
all of the fiddly bits of filling in struct siginfo are done properly
and then calls force_sig_info.

In short about a 5 line reduction in code for every time force_sig_info
is called, which makes the calling function clearer.

Cc: Ley Foon Tan &lt;lftan@altera.com&gt;
Cc: nios2-dev@lists.rocketboards.org
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>signal: Ensure every siginfo we send has all bits initialized</title>
<updated>2018-04-25T15:40:51Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2018-04-17T20:26:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3eb0f5193b497083391aa05d35210d5645211eef'/>
<id>urn:sha1:3eb0f5193b497083391aa05d35210d5645211eef</id>
<content type='text'>
Call clear_siginfo to ensure every stack allocated siginfo is properly
initialized before being passed to the signal sending functions.

Note: It is not safe to depend on C initializers to initialize struct
siginfo on the stack because C is allowed to skip holes when
initializing a structure.

The initialization of struct siginfo in tracehook_report_syscall_exit
was moved from the helper user_single_step_siginfo into
tracehook_report_syscall_exit itself, to make it clear that the local
variable siginfo gets fully initialized.

In a few cases the scope of struct siginfo has been reduced to make it
clear that siginfo siginfo is not used on other paths in the function
in which it is declared.

Instances of using memset to initialize siginfo have been replaced
with calls clear_siginfo for clarity.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
</feed>
