]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
A few more syscall comments and doc tweaks
authorPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 26 Nov 2025 19:27:43 +0000 (20:27 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 26 Nov 2025 19:27:43 +0000 (20:27 +0100)
coregrind/m_syswrap/syswrap-main.c
docs/internals/client_syscall_arguments.txt

index ff9960225f81a0fc77bd95579ed5d89d93c1172a..07f1930469e6dc15e18deba3422cfe489279369c 100644 (file)
@@ -1858,6 +1858,10 @@ void getSyscallArgLayout ( /*OUT*/SyscallArgLayout* layout, /*IN*/Bool syscall_s
    layout->uu_arg8  = -1; /* impossible value */
 
 #elif defined(VGP_x86_freebsd)
+   // libc converts syscall_syscall to canonical form
+   // (it just needs to pop the ret address, pop the sysno into eax
+  // do the syscall
+   // and push back the ret address)
    layout->o_sysno  = OFFSET_x86_EAX;
    // syscall parameters are on stack in C convention
    layout->s_arg1   = sizeof(UWord) * 1;
index 1ef113db847b86df1655e15f315605cb81f2bea5..233d332122f71855a1ebbea45a1983e165cc756a 100644 (file)
@@ -56,6 +56,7 @@ This stores the canonical arguments (syscall syscall format gets shuffled)
 in the SyscallArgs structure.
 
 2. Get the syscall argument layout
+Call getSyscallArgLayout()
 This just initialises the fields of the SyscallArgLayout structure. The layout
 will be different depending if it is a normal syscall or a syscall syscall.
 It cannot be canonicalised - we can shuffle around the values but we can't
@@ -83,7 +84,7 @@ This is the more complicated of the two as we need to release the global lock,
 change to using the guest signal mask, do the syscall, restore the Valgrind
 signal mask and request the global lock again.
 
-A call to putSyscallArgsIntoGuestState is made. The PRE may have changed
+A call to putSyscallArgsIntoGuestState() is made. The PRE may have changed
 some of the arguments so we need to put the arguments back into
 VexGuestArchState.
 
@@ -93,7 +94,7 @@ from VexGuestArchState.
 
 6. Perform a non-blocking syscall.
 
-This is much simpler. It performs the syscall via VG_(do_syscall).
+This is much simpler. It performs the syscall via VG_(do_syscall)().
 The arguments are passed via struct SyscallArgs (possibly modified by the PRE
 wrapper).