Some questions on OSv?

2016-08-29 Thread maryandmeichao
Hello everyone, I am new to OSv,these days I have done some experiments on OSv,I found it was a great project,I am interested in it very much.But now I have some questions to ask,I will appreciate it very much if some one of you can explain to me. 1. About the image size. In some

Jenkins build is back to normal : osv-build-nightly #862

2016-08-29 Thread avi
See -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [PATCH] Support FIOASYNC ioctl and add unit tests.

2016-08-29 Thread Madhuri Yechuri
Hi Nadav, Appreciate your detailed review comments! So sorry for the delayed response. > Just curious, why did you need to add the "{" here? It's indeed suspicious how SCOPE_LOCK() worked without it, but it did seem to work before, so why this change? i initially did not add "{". Then ran into

[COMMIT osv master] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Commit Bot
From: Nadav Har'El Committer: Nadav Har'El Branch: master syscall: fix CFI information for debugging with GDB GDB uses DWARF CFI meta-instructions to know how to backtrace through function call frames, and which registers get saved where. This patch

[COMMIT osv master] syscall: change stack alignment trick

2016-08-29 Thread Commit Bot
From: Nadav Har'El Committer: Nadav Har'El Branch: master syscall: change stack alignment trick The stack alignment trick I used in syscall_entry() worked, but the CFI code was actually wrong and only worked in for certain alignments but not others. To

[PATCH 2/2] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Nadav Har'El
GDB uses DWARF CFI meta-instructions to know how to backtrace through function call frames, and which registers get saved where. This patch fixes the CFI instructions in the syscall_entry() assembly code. After this patch, if we are in system call code we can backtrack through the syscall_entry()

[PATCH 1/2] syscall: fix indentation mishmash in entry.S

2016-08-29 Thread Nadav Har'El
No functional changes. Signed-off-by: Nadav Har'El --- arch/x64/entry.S | 166 --- 1 file changed, 86 insertions(+), 80 deletions(-) diff --git a/arch/x64/entry.S b/arch/x64/entry.S index 48a0a71..e265a30 100644 ---

Re: [PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Avi Kivity
On 08/29/2016 09:00 PM, Nadav Har'El wrote: On Mon, Aug 29, 2016 at 8:12 PM, Avi Kivity > wrote: On 08/29/2016 08:10 PM, Benoît Canet wrote: On Mon, Aug 29, 2016 at 7:08 PM, Avi Kivity >

Re: [PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Nadav Har'El
On Mon, Aug 29, 2016 at 8:12 PM, Avi Kivity wrote: > > > On 08/29/2016 08:10 PM, Benoît Canet wrote: > > > > On Mon, Aug 29, 2016 at 7:08 PM, Avi Kivity wrote: > >> diff --git a/arch/x64/entry.S b/arch/x64/entry.S >> >>> index e265a30..e3be0bc 100644 >>>

Re: [PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Benoît Canet
Ah sorry he does it with rflag and r11 On Mon, Aug 29, 2016 at 7:10 PM, Benoît Canet wrote: > > > On Mon, Aug 29, 2016 at 7:08 PM, Avi Kivity wrote: > >> >> >> On 08/29/2016 07:49 PM, Nadav Har'El wrote: >> >>> GDB uses DWARF CFI

Re: [PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Avi Kivity
On 08/29/2016 07:49 PM, Nadav Har'El wrote: GDB uses DWARF CFI meta-instructions to know how to backtrace through function call frames, and which registers get saved where. This patch fixes the CFI instructions in the syscall_entry() assembly code. After this patch, if we are in system call

Re: [PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Benoît Canet
On Mon, Aug 29, 2016 at 7:08 PM, Avi Kivity wrote: > > > On 08/29/2016 07:49 PM, Nadav Har'El wrote: > >> GDB uses DWARF CFI meta-instructions to know how to backtrace through >> function call frames, and which registers get saved where. >> >> This patch fixes the CFI

[PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Nadav Har'El
GDB uses DWARF CFI meta-instructions to know how to backtrace through function call frames, and which registers get saved where. This patch fixes the CFI instructions in the syscall_entry() assembly code. After this patch, if we are in system call code we can backtrack through the syscall_entry()

Jenkins build is back to normal : osv-build #1124

2016-08-29 Thread avi
See -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[COMMIT osv master] osv::run(): run pthread TSD destructors before resetting app runtime

2016-08-29 Thread Commit Bot
From: Nadav Har'El Committer: Nadav Har'El Branch: master osv::run(): run pthread TSD destructors before resetting app runtime The change to osv::run() (and friends) to reuse the calling thread rather than start a new one to run a new shared-object

[COMMIT osv master] pthread: implement pthread_key_delete()

2016-08-29 Thread Commit Bot
From: Nadav Har'El Committer: Nadav Har'El Branch: master pthread: implement pthread_key_delete() Implement pthread_key_delete(). Currently, it will not mark the key available for re-use. The danger in allowing re-use is that if we leave data with that

Re: [PATCH] syscall: skip red zone

2016-08-29 Thread Benoît Canet
Should it be just around the "call" instruction ? On Mon, Aug 29, 2016 at 4:14 PM, Nadav Har'El wrote: > The AMD64 ABI allows a function to use 128 bytes beyond the bottom of the > stack without updating the stack pointer - as an optimization known as the > "red zone". If

[PATCH] syscall: skip red zone

2016-08-29 Thread Nadav Har'El
The AMD64 ABI allows a function to use 128 bytes beyond the bottom of the stack without updating the stack pointer - as an optimization known as the "red zone". If this function calls another function, it is supposed to update the stack pointer first; But with the SYSCALL instruction, it is not

[COMMIT osv master] syscall: save also %rbp and align stack

2016-08-29 Thread Commit Bot
From: Nadav Har'El Committer: Nadav Har'El Branch: master syscall: save also %rbp and align stack Not saving and restoring the rbp register causes tst-syscall to crash in the debug build. With this patch, the debug build of this test no longer crashes.

[COMMIT osv master] syscall: set syscall_entry() symbol size to non-zero

2016-08-29 Thread Commit Bot
From: Nadav Har'El Committer: Nadav Har'El Branch: master syscall: set syscall_entry() symbol size to non-zero With "readelf --dyn-syms" the syscall_entry symbol appears to have a zero size. This causes our print_backtrace() code to not display the name

Re: [PATCH v2 1/2] syscall: implement rt_sigaction

2016-08-29 Thread Benoît Canet
no the companion patch was wrong that's all. On Mon, Aug 29, 2016 at 3:47 PM, Nadav Har'El wrote: > It seems I committed the first version of this patch. I don't know how the > second version differed. If it did, please send an incremental patch. > > > -- > Nadav Har'El >

[COMMIT osv master] syscall: implement rt_sigprocmask

2016-08-29 Thread Commit Bot
From: Benoit Canet Committer: Nadav Har'El Branch: master syscall: implement rt_sigprocmask This is the next syscall required by the go hello world Signed-off-by: BenoÃt Canet Message-Id:

[COMMIT osv master] syscall: implement rt_sigaction

2016-08-29 Thread Commit Bot
From: Benoit Canet Committer: Nadav Har'El Branch: master syscall: implement rt_sigaction This is one of the first syscall used by go binaries. The kernel syscall have some custom layout that must be convert forth and back to and from libc.

[PATCH v2 1/2] syscall: implement rt_sigaction

2016-08-29 Thread Benoit Canet
This is one of the first syscall used by go binaries. The kernel syscall have some custom layout that must be convert forth and back to and from libc. Do it. Signed-off-by: Benoît Canet --- linux.cc | 29 + 1 file changed, 29 insertions(+) diff

Re: [PATCH] syscall: save also %rbp and align stack

2016-08-29 Thread Benoît Canet
Go on I'll be busy wrapping the syscalls. On Mon, Aug 29, 2016 at 2:48 PM, Nadav Har'El wrote: > By the way, Benoit - with this patch, we save some of the registered saved > more than once (rcx, rsp), and some space wasted on the stack, all for the > purpose of building

[PATCH 2/2] syscall: implement rt_sigaction

2016-08-29 Thread Benoit Canet
This is one of the first syscall used by go binaries. The kernel syscall have some custom layout that must be convert forth and back to and from libc. Do it. Signed-off-by: Benoît Canet --- linux.cc | 29 + 1 file changed, 29 insertions(+) diff

[PATCH 1/2] syscall: save also %rbp

2016-08-29 Thread Benoit Canet
From: Nadav Har'El Not saving and restoring the rbp register causes tst-syscall to crash in the debug build. Refs #791. Signed-off-by: Nadav Har'El --- arch/x64/entry.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x64/entry.S

Re: [PATCH] syscall: save also %rbp and align stack

2016-08-29 Thread Nadav Har'El
By the way, Benoit - with this patch, we save some of the registered saved more than once (rcx, rsp), and some space wasted on the stack, all for the purpose of building something resembling a "signal frame". Is this a worthy cause? Why should the syscall_entry() function resemble a signal, when

[PATCH] syscall: save also %rbp and align stack

2016-08-29 Thread Nadav Har'El
Not saving and restoring the rbp register causes tst-syscall to crash in the debug build. With this patch, the debug build of this test no longer crashes. Once we do save %rbp, let's kill two birds in one stone, and also enable backtrace_safe() (e.g., on abort) to go through the syscall_entry

[PATCH] syscall: set syscall_entry() symbol size to non-zero

2016-08-29 Thread Nadav Har'El
With "readelf --dyn-syms" the syscall_entry symbol appears to have a zero size. This causes our print_backtrace() code to not display the name "syscall_entry" in the backtrace because no code appears to be inside this symbol. We probably need to do this for other assembly functions as well, but

Re: [PATCH] syscall: save also %rbp

2016-08-29 Thread Nadav Har'El
On Mon, Aug 29, 2016 at 1:47 PM, Benoît Canet wrote: > > If you look as the assembly dump of loader.elf you will see save saving > rbp and restoring it is usually the first and last thing function do. > > It marks the begining of a frame. > Yes, that is the

Re: [PATCH] syscall: save also %rbp

2016-08-29 Thread Benoît Canet
If you look as the assembly dump of loader.elf you will see save saving rbp and restoring it is usually the first and last thing function do. It marks the begining of a frame. On Mon, Aug 29, 2016 at 12:29 PM, Nadav Har'El wrote: > Not saving and restoring the rbp register

[PATCH] syscall: save also %rbp

2016-08-29 Thread Nadav Har'El
Not saving and restoring the rbp register causes tst-syscall to crash in the debug build. Refs #791. Signed-off-by: Nadav Har'El --- arch/x64/entry.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x64/entry.S b/arch/x64/entry.S index 0526aa7..c2417b8 100644 ---

[COMMIT osv master] Partial fix for syscall instruction

2016-08-29 Thread Commit Bot
From: Nadav Har'El Committer: Pekka Enberg Branch: master Partial fix for syscall instruction We need to set up the LSTAR MSR and friends on each processor - it is not enough to do it on processor 0. Otherwise, a system call instruction will always

[PATCH] Partial fix for syscall instruction

2016-08-29 Thread Nadav Har'El
We need to set up the LSTAR MSR and friends on each processor - it is not enough to do it on processor 0. Otherwise, a system call instruction will always fails if happens to run on any vcpu other than the first one. With this patch, tst-syscall now passes on my machine with the release

Re: [PATCH] RFC: run pthread TSD destructors before resetting app runtime

2016-08-29 Thread Justin Cinkelj
It does help, the crash disappeared. BR Justin On 08/28/2016 02:31 PM, Nadav Har'El wrote: Hi Justin, I hate this patch, but can you please check if it fixes your crash-during-exit problem that you reported yesterday? -- Nadav Har'El n...@scylladb.com On Sun, Aug