Page MenuHomeFreeBSD

yanko.yankulov_gmail.com (Yanko Yankulov)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 14 2018, 11:09 AM (305 w, 1 d)

Recent Activity

Jun 21 2018

yanko.yankulov_gmail.com updated the diff for D15954: update proc->p_ptevents annotation.

Restore the wrongfully deleted empty line.

Jun 21 2018, 6:52 PM
yanko.yankulov_gmail.com updated the diff for D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.

Address last comments.

Jun 21 2018, 6:51 PM
yanko.yankulov_gmail.com created D15954: update proc->p_ptevents annotation.
Jun 21 2018, 4:55 PM
yanko.yankulov_gmail.com updated the diff for D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.

Style & comments

Jun 21 2018, 4:54 PM
yanko.yankulov_gmail.com added inline comments to D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.
Jun 21 2018, 1:30 PM
yanko.yankulov_gmail.com added inline comments to D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.
Jun 21 2018, 11:30 AM
yanko.yankulov_gmail.com added inline comments to D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.
Jun 21 2018, 9:41 AM
yanko.yankulov_gmail.com updated the diff for D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.

Merge the two parts of set child as traced

Jun 21 2018, 7:56 AM

Jun 20 2018

yanko.yankulov_gmail.com added a comment to D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.
In D15857#337018, @kib wrote:

I think John' idea was to move the block which sets the has_ptrace_fork variable to true, down to the code which acts on its true value. De-fact, eliminating the var, and removing one if().

OK, but as far as I can tell we will need p1's PROC_LOCK or the proctree_lock in order to check the PTRACE_FORK flag. Am i missing something obvious again :) ?

We can read it lockless, and re-acquire the proc lock if set to re-read under the lock. This is not much different from reading under the lock, remembering the result, then drop the lock and use the result.

Jun 20 2018, 4:28 PM
yanko.yankulov_gmail.com added a comment to D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.

I think John' idea was to move the block which sets the has_ptrace_fork variable to true, down to the code which acts on its true value. De-fact, eliminating the var, and removing one if().

Jun 20 2018, 3:48 PM

Jun 18 2018

yanko.yankulov_gmail.com updated the diff for D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.

Address 2 of the jhb comments.

Jun 18 2018, 6:42 PM
yanko.yankulov_gmail.com added inline comments to D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.
Jun 18 2018, 6:01 PM
yanko.yankulov_gmail.com added inline comments to D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.
Jun 18 2018, 5:18 PM
yanko.yankulov_gmail.com updated the diff for D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.

bool & yet more style issues

Jun 18 2018, 2:30 PM
yanko.yankulov_gmail.com added a reviewer for D15880: linux_clone_thread: mark new thread as TDB_BORN: kib.
Jun 18 2018, 12:20 PM
yanko.yankulov_gmail.com created D15880: linux_clone_thread: mark new thread as TDB_BORN.
Jun 18 2018, 12:19 PM
yanko.yankulov_gmail.com updated the diff for D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.

address style issues

Jun 18 2018, 12:12 PM

Jun 16 2018

yanko.yankulov_gmail.com updated the summary of D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.
Jun 16 2018, 7:28 PM
yanko.yankulov_gmail.com updated the diff for D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.

Removed the now outdated comment in do_fork

Jun 16 2018, 7:23 PM
yanko.yankulov_gmail.com added a comment to D15823: Linuxlator enable ptrace.

Just one more question. I can't figure out why we can't reparent the new proc in do_fork instead of waiting for its thread to do it? Any hint will be appreciated.

I am not sure about your question. Can you point to the exact piece of code which you want to move into do_fork ? If you mean proc_reparent() call from fork_return(), I put it there to have all code dealing with the attaching new child to the debugger, in single place. ptracestop() must be called from the stopping thread context, and proc_reparent() as part of the attachment code is naturally located nearby. But I may be mis-interpreting your question, and also I do not see why you are asking.

Yes, that the question. I was trying to figure out why we need the sleep in the fork path at all. Because if we can get rid of the sleep, there is no need to change anything else. So my reasoning was like this - it is either required by the ptrace interface/promises i.e. parent process will not continue execution before the child is attached, or it is part of the implementation of the interface.

I assumed it is not a ptrace requirement because there is no guarantees for the parent/child execution in non-ptraced mode, and went on to see why it might be needed. One thing in the current code is that we can't allow the parent process to exit before the child was reparented as we will not attach to the child.

So my question is if we reparent the child in do_fork wouldn't it be possible and desirable to drop the wait altogether?

Jun 16 2018, 7:17 PM · Linux Emulation
yanko.yankulov_gmail.com created D15857: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED.
Jun 16 2018, 7:13 PM
yanko.yankulov_gmail.com added a comment to D15823: Linuxlator enable ptrace.

Just one more question. I can't figure out why we can't reparent the new proc in do_fork instead of waiting for its thread to do it? Any hint will be appreciated.

I am not sure about your question. Can you point to the exact piece of code which you want to move into do_fork ? If you mean proc_reparent() call from fork_return(), I put it there to have all code dealing with the attaching new child to the debugger, in single place. ptracestop() must be called from the stopping thread context, and proc_reparent() as part of the attachment code is naturally located nearby. But I may be mis-interpreting your question, and also I do not see why you are asking.

Jun 16 2018, 3:22 PM · Linux Emulation
yanko.yankulov_gmail.com added a comment to D15823: Linuxlator enable ptrace.
In D15823#335057, @kib wrote:

Please generate large diff context when you upload diff into phab, e.g. for svn it would be svn diff -x -U999999, for git diff -U999999.

Jun 16 2018, 1:59 PM · Linux Emulation

Jun 15 2018

yanko.yankulov_gmail.com created D15823: Linuxlator enable ptrace.
Jun 15 2018, 3:19 PM · Linux Emulation