<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/arch/arc, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/arch/arc?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/arch/arc?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-06-03T23:03:05Z</updated>
<entry>
<title>Merge tag 'kthread-cleanups-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace</title>
<updated>2022-06-03T23:03:05Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-06-03T23:03:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1ec6574a3c0a22c130c08e8c36c825cb87d68f8e'/>
<id>urn:sha1:1ec6574a3c0a22c130c08e8c36c825cb87d68f8e</id>
<content type='text'>
Pull kthread updates from Eric Biederman:
 "This updates init and user mode helper tasks to be ordinary user mode
  tasks.

  Commit 40966e316f86 ("kthread: Ensure struct kthread is present for
  all kthreads") caused init and the user mode helper threads that call
  kernel_execve to have struct kthread allocated for them. This struct
  kthread going away during execve in turned made a use after free of
  struct kthread possible.

  Here, commit 343f4c49f243 ("kthread: Don't allocate kthread_struct for
  init and umh") is enough to fix the use after free and is simple
  enough to be backportable.

  The rest of the changes pass struct kernel_clone_args to clean things
  up and cause the code to make sense.

  In making init and the user mode helpers tasks purely user mode tasks
  I ran into two complications. The function task_tick_numa was
  detecting tasks without an mm by testing for the presence of
  PF_KTHREAD. The initramfs code in populate_initrd_image was using
  flush_delayed_fput to ensuere the closing of all it's file descriptors
  was complete, and flush_delayed_fput does not work in a userspace
  thread.

  I have looked and looked and more complications and in my code review
  I have not found any, and neither has anyone else with the code
  sitting in linux-next"

* tag 'kthread-cleanups-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
  sched: Update task_tick_numa to ignore tasks without an mm
  fork: Stop allowing kthreads to call execve
  fork: Explicitly set PF_KTHREAD
  init: Deal with the init process being a user mode process
  fork: Generalize PF_IO_WORKER handling
  fork: Explicity test for idle tasks in copy_thread
  fork: Pass struct kernel_clone_args into copy_thread
  kthread: Don't allocate kthread_struct for init and umh
</content>
</entry>
<entry>
<title>fork: Generalize PF_IO_WORKER handling</title>
<updated>2022-05-07T14:01:59Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2022-04-12T15:18:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5bd2e97c868a8a44470950ed01846cab6328e540'/>
<id>urn:sha1:5bd2e97c868a8a44470950ed01846cab6328e540</id>
<content type='text'>
Add fn and fn_arg members into struct kernel_clone_args and test for
them in copy_thread (instead of testing for PF_KTHREAD | PF_IO_WORKER).
This allows any task that wants to be a user space task that only runs
in kernel mode to use this functionality.

The code on x86 is an exception and still retains a PF_KTHREAD test
because x86 unlikely everything else handles kthreads slightly
differently than user space tasks that start with a function.

The functions that created tasks that start with a function
have been updated to set ".fn" and ".fn_arg" instead of
".stack" and ".stack_size".  These functions are fork_idle(),
create_io_thread(), kernel_thread(), and user_mode_thread().

Link: https://lkml.kernel.org/r/20220506141512.516114-4-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>fork: Pass struct kernel_clone_args into copy_thread</title>
<updated>2022-05-07T14:01:48Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2022-04-08T23:07:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c5febea0956fd3874e8fb59c6f84d68f128d68f8'/>
<id>urn:sha1:c5febea0956fd3874e8fb59c6f84d68f128d68f8</id>
<content type='text'>
With io_uring we have started supporting tasks that are for most
purposes user space tasks that exclusively run code in kernel mode.

The kernel task that exec's init and tasks that exec user mode
helpers are also user mode tasks that just run kernel code
until they call kernel execve.

Pass kernel_clone_args into copy_thread so these oddball
tasks can be supported more cleanly and easily.

v2: Fix spelling of kenrel_clone_args on h8300
Link: https://lkml.kernel.org/r/20220506141512.516114-2-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>ARC: bpf: define uapi for BPF_PROG_TYPE_PERF_EVENT program type</title>
<updated>2022-04-26T16:35:28Z</updated>
<author>
<name>Sergey Matyukevich</name>
<email>sergey.matyukevich@synopsys.com</email>
</author>
<published>2022-04-14T08:11:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6aa98f6217861889523e38b0141c8c71b2ef8a83'/>
<id>urn:sha1:6aa98f6217861889523e38b0141c8c71b2ef8a83</id>
<content type='text'>
Define appropriate uapi for the BPF_PROG_TYPE_PERF_EVENT program type
by exporting the user_regs_struct structure instead of the pt_regs
structure that is in-kernel only.

Signed-off-by: Sergey Matyukevich &lt;sergey.matyukevich@synopsys.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: disasm: handle ARCv2 case in kprobe get/set functions</title>
<updated>2022-04-26T16:34:42Z</updated>
<author>
<name>Sergey Matyukevich</name>
<email>sergey.matyukevich@synopsys.com</email>
</author>
<published>2022-04-14T08:17:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9a78a8a8bb582743ce6747d978b58360c3c599d9'/>
<id>urn:sha1:9a78a8a8bb582743ce6747d978b58360c3c599d9</id>
<content type='text'>
Current implementation of get_reg/set_reg implies ARCompact layout
of pt_regs structure. Meanwhile pt_regs structure differs between
ARCompact and ARCv2. Update those functions to handle ARCv2.

Tested-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Sergey Matyukevich &lt;sergey.matyukevich@synopsys.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: implement syscall tracepoints</title>
<updated>2022-04-25T20:09:47Z</updated>
<author>
<name>Sergey Matyukevich</name>
<email>sergey.matyukevich@synopsys.com</email>
</author>
<published>2022-04-14T08:17:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=fb0b54909b153ac6195378fa8ddee3f7531f8e51'/>
<id>urn:sha1:fb0b54909b153ac6195378fa8ddee3f7531f8e51</id>
<content type='text'>
Implement all the bits required to support HAVE_SYSCALL_TRACEPOINTS
according to Documentation/trace/ftrace-design.rst.

Signed-off-by: Sergey Matyukevich &lt;sergey.matyukevich@synopsys.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: enable HAVE_REGS_AND_STACK_ACCESS_API feature</title>
<updated>2022-04-25T20:09:47Z</updated>
<author>
<name>Sergey Matyukevich</name>
<email>sergey.matyukevich@synopsys.com</email>
</author>
<published>2022-04-14T08:17:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b3bbf6a70ba0f827938525e285cd2be6c76a6a00'/>
<id>urn:sha1:b3bbf6a70ba0f827938525e285cd2be6c76a6a00</id>
<content type='text'>
Enable HAVE_REGS_AND_STACK_ACCESS_API feature for ARC architecture,
including ARCcompact and ARCv2 flavors. Add supporting functions
and defines.

Signed-off-by: Sergey Matyukevich &lt;sergey.matyukevich@synopsys.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: remove redundant READ_ONCE() in cmpxchg loop</title>
<updated>2022-04-18T21:47:05Z</updated>
<author>
<name>Bang Li</name>
<email>libang.linuxer@gmail.com</email>
</author>
<published>2022-03-19T02:03:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c6ed4d84a2c49de7d6f490144cca7b4a4831fb6e'/>
<id>urn:sha1:c6ed4d84a2c49de7d6f490144cca7b4a4831fb6e</id>
<content type='text'>
This patch reverts commit 7082a29c22ac ("ARC: use ACCESS_ONCE in cmpxchg
loop").

It is not necessary to use READ_ONCE() because cmpxchg contains barrier. We
can get it from commit d57f727264f1 ("ARC: add compiler barrier to LLSC
based cmpxchg").

Signed-off-by: Bang Li &lt;libang.linuxer@gmail.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: atomic: cleanup atomic-llsc definitions</title>
<updated>2022-04-18T21:45:09Z</updated>
<author>
<name>Sergey Matyukevich</name>
<email>sergey.matyukevich@synopsys.com</email>
</author>
<published>2022-02-22T14:05:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ac411e41ec065daa867b5668b6e71ea1aff7b36a'/>
<id>urn:sha1:ac411e41ec065daa867b5668b6e71ea1aff7b36a</id>
<content type='text'>
Remove redundant c_op macro argument. Only asm_op is needed
to define atomic operations using llock/scond.

Signed-off-by: Sergey Matyukevich &lt;sergey.matyukevich@synopsys.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>arc: drop definitions of pgd_index() and pgd_offset{, _k}() entirely</title>
<updated>2022-04-18T21:44:12Z</updated>
<author>
<name>Rolf Eike Beer</name>
<email>eb@emlix.com</email>
</author>
<published>2022-03-28T08:15:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d139d0f0bfdabe5762214a96f3d5c4b88f524b41'/>
<id>urn:sha1:d139d0f0bfdabe5762214a96f3d5c4b88f524b41</id>
<content type='text'>
They were in &lt;asm/pgtables.h&gt; and have been removed from there in
974b9b2c68f ("mm: consolidate pte_index() and pte_offset_*() definitions")
in favor of the generic version. But that missed that the same definitons
also existed in &lt;asm/pgtable-levels.h&gt;, where they were (inadvertently?)
introduced in fe6cb7b043b6 ("ARC: mm: disintegrate pgtable.h into levels
and flags").

Fixes: 974b9b2c68f3 ("mm: consolidate pte_index() and pte_offset_*() definitions")
Fixes: fe6cb7b043b6 ("ARC: mm: disintegrate pgtable.h into levels and flags")
Signed-off-by: Rolf Eike Beer &lt;eb@emlix.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
</feed>
