[uml-user] [PATCH 1/1] uml: fix compile warning

2010-09-16 Thread Richard Weinberger
This fixes:
incompatible pointer type:  => 89
   arch/um/kernel/exec.c: warning: passing argument 2 of 'execve1' from
incompatible pointer type:  => 69, 85
   arch/um/kernel/exec.c: warning: passing argument 3 of 'execve1' from
incompatible pointer type:  => 69, 85

which was introduced by d7627467b7a8dd6944885290a03a07ceb28c10eb
(Make do_execve() take a const filename pointer)

Signed-off-by: Richard Weinberger 
---
 arch/um/kernel/exec.c |6 +++---
 arch/um/kernel/internal.h |2 +-
 arch/um/kernel/syscall.c  |4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c
index cd145ed..49b5e1e 100644
--- a/arch/um/kernel/exec.c
+++ b/arch/um/kernel/exec.c
@@ -62,7 +62,7 @@ static long execve1(const char *file,
return error;
 }
 
-long um_execve(const char *file, char __user *__user *argv, char __user 
*__user *env)
+long um_execve(const char *file, const char __user *const __user *argv, const 
char __user *const __user *env)
 {
long err;
 
@@ -72,8 +72,8 @@ long um_execve(const char *file, char __user *__user *argv, 
char __user *__user
return err;
 }
 
-long sys_execve(const char __user *file, char __user *__user *argv,
-   char __user *__user *env)
+long sys_execve(const char __user *file, const char __user *const __user *argv,
+   const char __user *const __user *env)
 {
long error;
char *filename;
diff --git a/arch/um/kernel/internal.h b/arch/um/kernel/internal.h
index 1303a10..5bf97db 100644
--- a/arch/um/kernel/internal.h
+++ b/arch/um/kernel/internal.h
@@ -1 +1 @@
-extern long um_execve(const char *file, char __user *__user *argv, char __user 
*__user *env);
+extern long um_execve(const char *file, const char __user *const __user *argv, 
const char __user *const __user *env);
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c
index 5ddb246..f958cb8 100644
--- a/arch/um/kernel/syscall.c
+++ b/arch/um/kernel/syscall.c
@@ -60,8 +60,8 @@ int kernel_execve(const char *filename,
 
fs = get_fs();
set_fs(KERNEL_DS);
-   ret = um_execve(filename, (char __user *__user *)argv,
-   (char __user *__user *) envp);
+   ret = um_execve(filename, (const char __user *const __user *)argv,
+   (const char __user *const __user *) envp);
set_fs(fs);
 
return ret;
-- 
1.6.6.1


--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


[uml-user] [PATCH 1/1] um: ubd: Fix data corruption

2010-10-01 Thread Richard Weinberger
Under high load the file system gets corrupted.
This patch fixes the issue.

Many thanks to Janjaap Bos !

LKML-Reference: 
Signed-off-by: Richard Weinberger 
---
 arch/um/drivers/ubd_kern.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 1bcd208..2874b83 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -748,9 +748,12 @@ static int ubd_open_dev(struct ubd *ubd_dev)
}
ubd_dev->fd = fd;
 
-   if(ubd_dev->cow.file != NULL){
-   blk_queue_max_hw_sectors(ubd_dev->queue, 8 * sizeof(long));
+   /* A setting higher than 1 sector currently (>= v2.6.31) generates
+   data loss, both for raw and cow ubd. */
+   blk_queue_max_hw_sectors(ubd_dev->queue, 1 * sizeof(long));
+   blk_queue_max_segments(ubd_dev->queue, 1 * sizeof(long));
 
+   if (ubd_dev->cow.file != NULL) {
err = -ENOMEM;
ubd_dev->cow.bitmap = vmalloc(ubd_dev->cow.bitmap_len);
if(ubd_dev->cow.bitmap == NULL){
-- 
1.6.6.1


--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


[uml-user] [PATCH 1/1] um: Get rid of __do_IRQ()

2010-10-13 Thread Richard Weinberger
This patch removes __do_IRQ() from user mode linux.

Signed-off-by: Richard Weinberger 
---
 arch/um/Kconfig.um   |3 +++
 arch/um/kernel/irq.c |   15 ---
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um
index ec2b8da..7ad0916 100644
--- a/arch/um/Kconfig.um
+++ b/arch/um/Kconfig.um
@@ -147,3 +147,6 @@ config KERNEL_STACK_ORDER
  This option determines the size of UML kernel stacks.  They will
  be 1 << order pages.  The default is OK unless you're running Valgrind
  on UML, in which case, set this to 3.
+
+config GENERIC_HARDIRQS_NO__DO_IRQ
+   def_bool y
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index a3f0b04..ea21a87 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -334,7 +334,7 @@ unsigned int do_IRQ(int irq, struct uml_pt_regs *regs)
 {
struct pt_regs *old_regs = set_irq_regs((struct pt_regs *)regs);
irq_enter();
-   __do_IRQ(irq);
+   generic_handle_irq(irq);
irq_exit();
set_irq_regs(old_regs);
return 1;
@@ -391,17 +391,10 @@ void __init init_IRQ(void)
 {
int i;
 
-   irq_desc[TIMER_IRQ].status = IRQ_DISABLED;
-   irq_desc[TIMER_IRQ].action = NULL;
-   irq_desc[TIMER_IRQ].depth = 1;
-   irq_desc[TIMER_IRQ].chip = &SIGVTALRM_irq_type;
-   enable_irq(TIMER_IRQ);
+   set_irq_chip_and_handler(TIMER_IRQ, &SIGVTALRM_irq_type, 
handle_edge_irq);
+
for (i = 1; i < NR_IRQS; i++) {
-   irq_desc[i].status = IRQ_DISABLED;
-   irq_desc[i].action = NULL;
-   irq_desc[i].depth = 1;
-   irq_desc[i].chip = &normal_irq_type;
-   enable_irq(i);
+   set_irq_chip_and_handler(i, &normal_irq_type, handle_edge_irq);
}
 }
 
-- 
1.6.6.1


--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] [RFC] um: x86: unbreak build by reintroducing this_cpu_cmpxchg16b_emu

2011-04-06 Thread Richard Weinberger
Sergei,

Am Mittwoch 06 April 2011, 23:18:37 schrieb Sergei Trofimovich:
> I'm sure fix can be nices, but initial patch should express an idea.

Please send patches not as attachment.

I think this patch is only needed on x86_64.
Um builds fine on my main machine (i386).
It seems to fail on x86_64 when using  CONFIG_SLUB=y.

> The main offender is privileged 'cli'.
> 
> Thanks!

Thanks,
//richard


--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH 19/55] um: irq: Remove IRQF_DISABLED

2011-09-22 Thread Richard Weinberger
Am 22.09.2011 10:58, schrieb Yong Zhang:
> Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
> We run all interrupt handlers with interrupts disabled
> and we even check and yell when an interrupt handler
> returns with interrupts enabled (see commit [b738a50a:
> genirq: Warn when handler enables interrupts]).
> 
> So now this flag is a NOOP and can be removed.
> 
> Signed-off-by: Yong Zhang 

Acked-by: Richard Weinberger 



signature.asc
Description: OpenPGP digital signature
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


[uml-user] Advice to all glibc 2.12 users

2011-10-09 Thread Richard Weinberger
glibc 2.12's pthread_cond_signal() is broken on UML because it does not
have FUTEX_WAKE_OP.

The issue got fixed in 2.12.2:
http://sourceware.org/ml/libc-alpha/2010-08/msg00019.html

Sadly, some distros (like CentOS 6.0) still ship glibc 2.12.1.
So you have to expect problems when them on top of UML...

Thanks,
//richard



signature.asc
Description: OpenPGP digital signature
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Questions about User Mode Linux

2011-10-13 Thread Richard Weinberger
Am 13.10.2011 20:10, schrieb mic...@michaelblizek.twilightparadox.com:
> After migrating from i386 to x86_64, my uml started to segfault in weird ways.

What exactly is the problem?
Without any details nobody can and will help you.

> In the end, I figured that "make clean/mrproper/distclean" does not really
> clean up properly. I had to use "ARCH=um make distclean". The command "make
> distclean" did not remove these files:
> 
> arch/um/include/shared/kern_constants.h
> arch/um/include/shared/user_constants.h
> arch/um/kernel/config.c
> arch/um/kernel/config.tmp
> arch/um/kernel/vmlinux.lds
> arch/um/sys-x86_64/vdso/vdso.lds
> arch/um/sys-x86_64/vdso/vdso.so
> arch/um/sys-x86_64/vdso/vdso.so.dbg
> arch/um/sys-x86_64/vdso/vdso-syms.lds
> 

"make clean ARCH=um" works fine on my system.

Thanks,
//richard



signature.asc
Description: OpenPGP digital signature
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Questions about User Mode Linux

2011-10-14 Thread Richard Weinberger
Am 14.10.2011 07:29, schrieb mic...@michaelblizek.twilightparadox.com:
> I have attached the trace below, if you are interested. It happened
> during/after /sbin/init was executed. Version is
> f2c0d0266cc5eb36a4aa44944b4096ec121490aa of linus'es git tree. However,
> everything is running now. It was caused by uncleaned files. I am just
> reporting, because this was suprising to me.

Okay.

>> "make clean ARCH=um" works fine on my system.
> 
> Yes, the point is "ARCH=um". I do not really understand why it is needed for
> clean operations?

Otherwise kbuild will use x86 as arch.

Sorry, your trace is useless.
You have to ignore SIGSEGV.
UML is using it do detect page faults.

Thanks,
//richard



signature.asc
Description: OpenPGP digital signature
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Questions about User Mode Linux

2011-10-14 Thread Richard Weinberger
Am 14.10.2011 12:08, schrieb Bernd Petrovitsch:
> The question is IMHO more in the direction of:
> Shouldn't `make mrproper` delete *all* generated files from all
> architectures (and not only the current one) to get the tree in a (or
> actually the) pristine state?

To achieve this the Makefile needs some patching.
All make targets operate only on one arch.

> Hmm, how are other arches handling that?
> 

mrproper is not arch specific.

Thanks,
//richard



signature.asc
Description: OpenPGP digital signature
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH 18/49] um: irq: Remove IRQF_DISABLED

2011-10-28 Thread Richard Weinberger
Am 22.10.2011 11:56, schrieb Yong Zhang:
> Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
> We run all interrupt handlers with interrupts disabled
> and we even check and yell when an interrupt handler
> returns with interrupts enabled (see commit [b738a50a:
> genirq: Warn when handler enables interrupts]).
> 
> So now this flag is a NOOP and can be removed.
> 
> Signed-off-by: Yong Zhang 
> Acked-by: Richard Weinberger 

BTW: I think it's better when I carry this patch through my UML tree.
Okay?

Thanks,
//richard



signature.asc
Description: OpenPGP digital signature
--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] apache2 won't start with v3.6-rc5 (kernel v3.5 works fine)

2012-09-09 Thread Richard Weinberger
Am 09.09.2012 18:36, schrieb Toralf Förster:
> On 09/09/2012 02:48 PM, richard -rw- weinberger wrote:
>> On Sun, Sep 9, 2012 at 12:01 PM, Toralf Förster  
>> wrote:
>>> Hi,
>>>
>>> with current git tree 3.6-rc5 I cannot longer start apache2 at a
>>> UML image with an unstable Gentoo Linux.
>>>
>>> The apache error log gives :
>>>
>>> [Sun Sep 09 11:53:25.225818 2012] [core:emerg] [pid 1054:tid 1078662848]
>>> (22)Invalid argument: AH00023: Couldn't create the rewrite-map mutex
>>> AH00016: Configuration Failed
>>
>> Can you please find out which system call is failing with EINVAL?
> I attached the output of
> 
> strace -o /strace.out /usr/sbin/apache2 -D DEFAULT_VHOST -D INFO -D
> MANUAL -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D STATUS -D SUEXEC -D
> DOC -D PHP5 -k start
> 
> Does it gives you the info ?

Kind of. semctl() fails for whatever reason.

semget(IPC_PRIVATE, 1, IPC_CREAT|0600)  = 32769
semctl(32769, 0, IPC_64|SETVAL, 0xbfa05178) = -1 EINVAL (Invalid argument)
semctl(32769, 0, IPC_64|IPC_RMID, 0xbfa05158) = -1 EINVAL (Invalid argument)

>> A git bisect would also nice to have. :-)
>>
> ofc - although it needs a little bit time

Would be great. :-)
Apache2 works here fine...

Thanks,
//richard





signature.asc
Description: OpenPGP digital signature
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] apache2 won't start with v3.6-rc5 (kernel v3.5 works fine)

2012-09-10 Thread Richard Weinberger
Am 10.09.2012 15:56, schrieb Toralf Förster:
> On 09/09/2012 06:55 PM, Richard Weinberger wrote:
>> Kind of. semctl() fails for whatever reason.
> 
>> semget(IPC_PRIVATE, 1, IPC_CREAT|0600)  = 32769 semctl(32769, 0,
>> IPC_64|SETVAL, 0xbfa05178) = -1 EINVAL (Invalid argument) 
>> semctl(32769, 0, IPC_64|IPC_RMID, 0xbfa05158) = -1 EINVAL (Invalid
>> argument)
> 
>>>> A git bisect would also nice to have. :-)
> 
> I tried it yesterday evening - but I'm unsure anout the result
> (automating the bisecting is difficult b/c sometimes I've start up
> errors / core dumps *and* the issue seems to be not 100% reproduceable.
> nevertheless I found this after 2 attempts :
> 
> commit c1d7e01d7877a397655277a920aeaa3830ed9461
> Author: Will Deacon 
> Date:   Mon Jul 30 14:42:46 2012 -0700
> 
> ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION
> 
> Rather than #define the options manually in the architecture code, add
> Kconfig options for them and select them there instead.  This also
> allows
> us to select the compat IPC version parsing automatically for
> platforms
> using the old compat IPC interface.
> 
> Reported-by: Andrew Morton 
> Signed-off-by: Will Deacon 
> Cc: Arnd Bergmann 
> Cc: Chris Metcalf 
> Cc: Catalin Marinas 
> Signed-off-by: Andrew Morton 
> Signed-off-by: Linus Torvalds 
> 

Look like this commit broke SystemV semaphores on UML.
Can you please send me your .config?

I have an idea. :)

Thanks,
//richard



signature.asc
Description: OpenPGP digital signature
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] apache2 won't start with v3.6-rc5 (kernel v3.5 works fine)

2012-09-10 Thread Richard Weinberger
Am 10.09.2012 19:37, schrieb Toralf Förster:
> On 09/10/2012 04:23 PM, Richard Weinberger wrote:
>> Am 10.09.2012 15:56, schrieb Toralf Förster:
>>> On 09/09/2012 06:55 PM, Richard Weinberger wrote:
>>>> Kind of. semctl() fails for whatever reason.
>>>
>>>> semget(IPC_PRIVATE, 1, IPC_CREAT|0600)  = 32769 semctl(32769,
>>>> 0, IPC_64|SETVAL, 0xbfa05178) = -1 EINVAL (Invalid argument) 
>>>> semctl(32769, 0, IPC_64|IPC_RMID, 0xbfa05158) = -1 EINVAL
>>>> (Invalid argument)
>>>
>>>>>> A git bisect would also nice to have. :-)
>>>
>>> commit c1d7e01d7877a397655277a920aeaa3830ed9461 Author: Will
>>> Deacon  Date:   Mon Jul 30 14:42:46 2012
>>> -0700
> ..
>>>
> 
>> Look like this commit broke SystemV semaphores on UML. Can you
>> please send me your .config?
> 
>> I have an idea. :)
> 
> Great config attached
> 
> -BTW I bisected it again to this commit (now with a fully-automated
> script)
> 

Does the attached patch fix the issue for you?

Thanks,
//richard
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig
index 9926e11..aeaff8b 100644
--- a/arch/x86/um/Kconfig
+++ b/arch/x86/um/Kconfig
@@ -21,6 +21,7 @@ config 64BIT
 config X86_32
 	def_bool !64BIT
 	select HAVE_AOUT
+	select ARCH_WANT_IPC_PARSE_VERSION
 
 config X86_64
 	def_bool 64BIT


signature.asc
Description: OpenPGP digital signature
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] apache2 won't start with v3.6-rc5 (kernel v3.5 works fine)

2012-09-10 Thread Richard Weinberger
Am 10.09.2012 21:02, schrieb Toralf Förster:
> On 09/10/2012 08:23 PM, Richard Weinberger wrote:
>> Does the attached patch fix the issue for you?
> 
> yes
> :-)

Good.

> 
> 
> BTW and now to a complete different thing :
> Why is the kernel option CONFIG_CRYPTO_AES_NI_INTEL not selectable for
> UML ?

Hmm, It does not work on UML because that's a HW crypto module.
Let me look a bit closer at the issue maybe we can support it in some way.

Thanks,
//richard



signature.asc
Description: OpenPGP digital signature
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] apache2 won't start with v3.6-rc5 (kernel v3.5 works fine)

2012-09-24 Thread Richard Weinberger
Am 24.09.2012 21:23, schrieb Toralf Förster:
> On 09/10/2012 08:23 PM, Richard Weinberger wrote:
> 
>> Does the attached patch fix the issue for you?
> 
>> Thanks, //richard
> 
> Seems, that this patch won't make it into 3.6, or ?
> (or is it only a work around of an underlying issue ?)

It will.
Currently I'm preparing the pull request. :P

Thanks,
//richard



signature.asc
Description: OpenPGP digital signature
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH RESEND] typo in UserModeLinux-HOWTO

2012-09-27 Thread Richard Weinberger
Am Thu, 27 Sep 2012 09:34:16 +0200
schrieb Richard Genoud :

> [it seems that I sent it to the wrong maintainer at first... sorry
> for that] copy_from_user was meant instead of copy_to_user.
> 
> Signed-off-by: Richard Genoud 

Queued for 3.7!

Thanks,
//richard

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] apache2 won't start with v3.6-rc5 (kernel v3.5 works fine)

2012-09-29 Thread Richard Weinberger
Am Sat, 29 Sep 2012 22:10:07 +0200
schrieb Toralf Förster :

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 09/24/2012 09:25 PM, Richard Weinberger wrote:
> > Am 24.09.2012 21:23, schrieb Toralf Förster:
> >> On 09/10/2012 08:23 PM, Richard Weinberger wrote:
> >> 
> >>> Does the attached patch fix the issue for you?
> >> 
> >>> Thanks, //richard
> >> 
> >> Seems, that this patch won't make it into 3.6, or ? (or is it
> >> only a work around of an underlying issue ?)
> > 
> > It will. Currently I'm preparing the pull request. :P
> > 
> > Thanks, //richard
> > 
> yep, integrated now - thx.
> 
> But the current version sporadically crashes if apache2 + phpmyadmin
> is used - but I can't figure out a reproducible scenario :-( :

Since -rc7?
rc7 contains 4 fixes from Al, you can try to revert them.
Maybe he fixed too much ;)

Thanks,
//richard

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH 2/2] um: fix build failure due to mess-up of sig_info protorype

2012-12-30 Thread Richard Weinberger
Am Sun, 30 Dec 2012 01:37:31 +0300
schrieb Sergei Trofimovich :

> arch/um/os-Linux/signal.c:18:8: error: conflicting types for
> 'sig_info' In file included
> from /home/slyfox/linux-2.6/arch/um/os-Linux/signal.c:12:0:
> arch/um/include/shared/as-layout.h:64:15: note: previous declaration
> of 'sig_info' was here
> 
> Signed-off-by: Sergei Trofimovich 
> CC: Jeff Dike 
> CC: Richard Weinberger 
> CC: "Martin Pärtel" 
> CC: Al Viro 
> CC: user-mode-linux-de...@lists.sourceforge.net
> CC: user-mode-linux-user@lists.sourceforge.net
> CC: linux-ker...@vger.kernel.org
> ---

I think both patches need to be backported to -stable.
I'll add the tag and push the patches ASAP to Linus.

Thanks,
//richard

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH 2/2] um: fix build failure due to mess-up of sig_info protorype

2013-01-11 Thread Richard Weinberger
Am Sat, 12 Jan 2013 00:55:17 +0300
schrieb Sergei Trofimovich :

> On Sun, 30 Dec 2012 10:40:43 +0100
> Richard Weinberger  wrote:
> 
> > Am Sun, 30 Dec 2012 01:37:31 +0300
> > schrieb Sergei Trofimovich :
> > 
> > > arch/um/os-Linux/signal.c:18:8: error: conflicting types for
> > > 'sig_info' In file included
> > > from /home/slyfox/linux-2.6/arch/um/os-Linux/signal.c:12:0:
> > > arch/um/include/shared/as-layout.h:64:15: note: previous
> > > declaration of 'sig_info' was here
> > > 
> > > Signed-off-by: Sergei Trofimovich 
> > > CC: Jeff Dike 
> > > CC: Richard Weinberger 
> > > CC: "Martin Pärtel" 
> > > CC: Al Viro 
> > > CC: user-mode-linux-de...@lists.sourceforge.net
> > > CC: user-mode-linux-user@lists.sourceforge.net
> > > CC: linux-ker...@vger.kernel.org
> > > ---
> > 
> > I think both patches need to be backported to -stable.
> > I'll add the tag and push the patches ASAP to Linus.
> 
> Seems to have got lost.

Yeah. Sorry for that. I'm currently very busy.
This weekend I'll have some time to prepare all my patches.

Thanks,
//richard

--
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] include/asm-generic/io.h: add 'UML' case just like 'no-MMU'

2013-06-26 Thread Richard Weinberger
Am 26.06.2013 10:34, schrieb Chen Gang:
> On 06/26/2013 04:05 PM, Richard Weinberger wrote:
>>>>>>>> diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
>>>>>>>> index d5afe96..e80331d 100644
>>>>>>>> --- a/include/asm-generic/io.h
>>>>>>>> +++ b/include/asm-generic/io.h
>>>>>>>> @@ -303,10 +303,10 @@ static inline void *phys_to_virt(unsigned long 
>>>>>>>> address)
>>>>>>>>  /*
>>>>>>>>   * Change "struct page" to physical address.
>>>>>>>>   *
>>>>>>>> - * This implementation is for the no-MMU case only... if you have an 
>>>>>>>> MMU
>>>>>>>> + * This implementation is for the no-MMU or UML case only... if you 
>>>>>>>> have an MMU
>>>>>>>>   * you'll need to provide your own definitions.
>>>>>>>>   */
>>>>>>>> -#ifndef CONFIG_MMU
>>>>>>>> +#if !CONFIG_MMU || CONFIG_UML
>>>>>>>>  static inline void __iomem *ioremap(phys_addr_t offset, unsigned long 
>>>>>>>> size)
>>>>>>>>  {
>>>>>>>>return (void __iomem*) (unsigned long)offset;
>>>>>>>> @@ -325,7 +325,7 @@ static inline void __iomem *ioremap(phys_addr_t 
>>>>>>>> offset, unsigned long size)
>>>>>>>>  static inline void iounmap(void __iomem *addr)
>>>>>>>>  {
>>>>>>>>  }
>>>>>>>> -#endif /* CONFIG_MMU */
>>>>>>>> +#endif /* !CONFIG_MMU || CONFIG_UML */
>>>>>>>>  
>>>>>>>>  #ifdef CONFIG_HAS_IOPORT
>>>>>>>>  #ifndef CONFIG_GENERIC_IOMAP
>>>>>>>>
>>>>>>
>>>>>> UML has no io memory but a MMU, so I'd argue that you better fix 
>>>>>> drivers/ptp/ptp_pch.c dependencies.
>>>>>> _If_ ptp_pch.c really works without real io memory, you can look what I 
>>>>>> did in my GENERIC_IO series[1]
>>>>>> to make nandsim work on UML. Maybe this helps.
>>>>>>
>>>>
>>>> But "no io memory" is not the excuse to not define the related dummy
>>>> function.
>> UML has no io memory, period.
>> Same applies for s390, it also includes asm-generic/io.h in the !CONFIG_PCI
>> case.
>> UML and s390 are very special here.
>>
> 
> Oh, yes, really the same.
> 
>>>> The drivers internal code has already check the related return value,
>>>> so it is the architecture's duty to 'tell' the driver whether support
>>>> io memory (e.g. define ioremap, but return NULL).
>> It does so already by setting CONFIG_HAS_IOMEM=n
> 
> Excuse me, I use "grep -rn ioremap *" under "include/" and "arch/um/"
> directory, but can not find the related definition for 'ioremap'.
> 
> Is there another declaration or definition way which I don't know ?
> (maybe it is).

Both UML and s390 (in the !CONFIG_PCI) do not define ioremap() because
without io memory you cannot have a ioremap().

> For our case, the ".config" file does not define 'CONFIG_HAS_IOMEM', can
> I assume it means "CONFIG_HAS_IOMEM=n" ?

If I'm not mistaken it works the other way around.
All archs except UML and s390 set CONFIG_HAS_IOMEM=y.

Thanks,
//richard

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] include/asm-generic/io.h: add 'UML' case just like 'no-MMU'

2013-06-26 Thread Richard Weinberger
Hi!

Am 26.06.2013 08:31, schrieb Chen Gang:
> For "User Mode Linux", it may enable 'MMU', but not need implement
> ioremap and iounmap, so "include/asm-generic/io.h" need notice this
> case to keep itself 'generic'.
> 
> The related error (with allmodconfig, without pcap):
> 
> CC [M]  drivers/ptp/ptp_pch.o
>   drivers/ptp/ptp_pch.c: In function ‘pch_remove’:
>   drivers/ptp/ptp_pch.c:571:3: error: implicit declaration of function 
> ‘iounmap’ [-Werror=implicit-function-declaration]
>   drivers/ptp/ptp_pch.c: In function ‘pch_probe’:
>   drivers/ptp/ptp_pch.c:621:2: error: implicit declaration of function 
> ‘ioremap’ [-Werror=implicit-function-declaration]
>   drivers/ptp/ptp_pch.c:621:13: warning: assignment makes pointer from 
> integer without a cast [enabled by default]
>   cc1: some warnings being treated as errors
> 
> 
> Signed-off-by: Chen Gang 
> ---
>  arch/um/include/asm/Kbuild |1 +
>  include/asm-generic/io.h   |6 +++---
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild
> index b30f34a..a34ea5d 100644
> --- a/arch/um/include/asm/Kbuild
> +++ b/arch/um/include/asm/Kbuild
> @@ -3,3 +3,4 @@ generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h 
> topology.h xor.h
>  generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h
>  generic-y += switch_to.h clkdev.h
>  generic-y += trace_clock.h
> +generic-y += io.h

We include that file already. See three lines above.

> diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
> index d5afe96..e80331d 100644
> --- a/include/asm-generic/io.h
> +++ b/include/asm-generic/io.h
> @@ -303,10 +303,10 @@ static inline void *phys_to_virt(unsigned long address)
>  /*
>   * Change "struct page" to physical address.
>   *
> - * This implementation is for the no-MMU case only... if you have an MMU
> + * This implementation is for the no-MMU or UML case only... if you have an 
> MMU
>   * you'll need to provide your own definitions.
>   */
> -#ifndef CONFIG_MMU
> +#if !CONFIG_MMU || CONFIG_UML
>  static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
>  {
>   return (void __iomem*) (unsigned long)offset;
> @@ -325,7 +325,7 @@ static inline void __iomem *ioremap(phys_addr_t offset, 
> unsigned long size)
>  static inline void iounmap(void __iomem *addr)
>  {
>  }
> -#endif /* CONFIG_MMU */
> +#endif /* !CONFIG_MMU || CONFIG_UML */
>  
>  #ifdef CONFIG_HAS_IOPORT
>  #ifndef CONFIG_GENERIC_IOMAP
> 

UML has no io memory but a MMU, so I'd argue that you better fix 
drivers/ptp/ptp_pch.c dependencies.
_If_ ptp_pch.c really works without real io memory, you can look what I did in 
my GENERIC_IO series[1]
to make nandsim work on UML. Maybe this helps.

Thanks,
//richard

[1] http://lists.infradead.org/pipermail/linux-mtd/2012-February/039701.html


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] include/asm-generic/io.h: add 'UML' case just like 'no-MMU'

2013-06-26 Thread Richard Weinberger
Hi!

Am 26.06.2013 09:56, schrieb Chen Gang:
> On 06/26/2013 02:54 PM, Richard Weinberger wrote:
>> Hi!
>>
>> Am 26.06.2013 08:31, schrieb Chen Gang:
>>> For "User Mode Linux", it may enable 'MMU', but not need implement
>>> ioremap and iounmap, so "include/asm-generic/io.h" need notice this
>>> case to keep itself 'generic'.
>>>
>>> The related error (with allmodconfig, without pcap):
>>>
>>> CC [M]  drivers/ptp/ptp_pch.o
>>>   drivers/ptp/ptp_pch.c: In function �pch_remove�:
>>>   drivers/ptp/ptp_pch.c:571:3: error: implicit declaration of function 
>>> �iounmap� [-Werror=implicit-function-declaration]
>>>   drivers/ptp/ptp_pch.c: In function �pch_probe�:
>>>   drivers/ptp/ptp_pch.c:621:2: error: implicit declaration of function 
>>> �ioremap� [-Werror=implicit-function-declaration]
>>>   drivers/ptp/ptp_pch.c:621:13: warning: assignment makes pointer from 
>>> integer without a cast [enabled by default]
>>>   cc1: some warnings being treated as errors
>>>
>>>
>>> Signed-off-by: Chen Gang 
>>> ---
>>>  arch/um/include/asm/Kbuild |1 +
>>>  include/asm-generic/io.h   |6 +++---
>>>  2 files changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild
>>> index b30f34a..a34ea5d 100644
>>> --- a/arch/um/include/asm/Kbuild
>>> +++ b/arch/um/include/asm/Kbuild
>>> @@ -3,3 +3,4 @@ generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h 
>>> sections.h topology.h xor.h
>>>  generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h
>>>  generic-y += switch_to.h clkdev.h
>>>  generic-y += trace_clock.h
>>> +generic-y += io.h
>>
>> We include that file already. See three lines above.
>>
> 
> Oh, really it is, thanks.
> 
>>> diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
>>> index d5afe96..e80331d 100644
>>> --- a/include/asm-generic/io.h
>>> +++ b/include/asm-generic/io.h
>>> @@ -303,10 +303,10 @@ static inline void *phys_to_virt(unsigned long 
>>> address)
>>>  /*
>>>   * Change "struct page" to physical address.
>>>   *
>>> - * This implementation is for the no-MMU case only... if you have an MMU
>>> + * This implementation is for the no-MMU or UML case only... if you have 
>>> an MMU
>>>   * you'll need to provide your own definitions.
>>>   */
>>> -#ifndef CONFIG_MMU
>>> +#if !CONFIG_MMU || CONFIG_UML
>>>  static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
>>>  {
>>> return (void __iomem*) (unsigned long)offset;
>>> @@ -325,7 +325,7 @@ static inline void __iomem *ioremap(phys_addr_t offset, 
>>> unsigned long size)
>>>  static inline void iounmap(void __iomem *addr)
>>>  {
>>>  }
>>> -#endif /* CONFIG_MMU */
>>> +#endif /* !CONFIG_MMU || CONFIG_UML */
>>>  
>>>  #ifdef CONFIG_HAS_IOPORT
>>>  #ifndef CONFIG_GENERIC_IOMAP
>>>
>>
>> UML has no io memory but a MMU, so I'd argue that you better fix 
>> drivers/ptp/ptp_pch.c dependencies.
>> _If_ ptp_pch.c really works without real io memory, you can look what I did 
>> in my GENERIC_IO series[1]
>> to make nandsim work on UML. Maybe this helps.
>>
> 
> But "no io memory" is not the excuse to not define the related dummy
> function.

UML has no io memory, period.
Same applies for s390, it also includes asm-generic/io.h in the !CONFIG_PCI
case.
UML and s390 are very special here.


> The drivers internal code has already check the related return value,
> so it is the architecture's duty to 'tell' the driver whether support
> io memory (e.g. define ioremap, but return NULL).

It does so already by setting CONFIG_HAS_IOMEM=n

Thanks,
//richard

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] include/asm-generic/io.h: add 'UML' case just like 'no-MMU'

2013-06-26 Thread Richard Weinberger
Am 26.06.2013 12:01, schrieb Chen Gang:
> On 06/26/2013 05:48 PM, Geert Uytterhoeven wrote:
>> On Wed, Jun 26, 2013 at 11:38 AM, Richard Weinberger  wrote:
>>>>>> Since the API itself already contents the meaning: "return NULL means
>>>>>> the arch has no related io memory",
>> No, NULL means it could not map the I/O memory.
>>
> 
> "it could not map the I/O memory" includes "has no related io memory".
> So it is enough for our case.
> 
>>>>>> Why not define a generic dummy one in "include/asm-generic/io.h" instead
>>>>>> of "HAS_IOMEM" (which has already spread many various places, and also,
>>>>>> most of new drivers have to know about it).
>>>>>>
>>>>>> e.g: in "include/asm-generic/io.h", if "CONFIG_HAS_IOMEM=n", define a
>>>>>> dummy ioremap() which return NULL ... (also need consider more details).
>>>>
>>>> Because we don't even want to build these drivers and not make them fail 
>>>> while
>>>> executing io memory related functions.
>> Indeed, it doesn't make sense to build drivers that cannot work.
>> And they may fail in a very bad way.
> 
> That is our 'platform' guys feeling, not the 'module' guys, as
> 'platform' guys, it is better to provide the choice to 'module' guys,
> and let them decide by themselves, not forced by us.

FYI, this is my last reply to this thread.

As Geert and I said, drivers which need io memory have to depend on HAS_IOMEM=y.
If an arch does not have io memory these drivers cannot work and therefore we 
don't
want them built.

Over and out,
//richard

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] include/asm-generic/io.h: add 'UML' case just like 'no-MMU'

2013-06-26 Thread Richard Weinberger
Am 26.06.2013 11:33, schrieb Chen Gang:
> On 06/26/2013 05:03 PM, Richard Weinberger wrote:
>> Am 26.06.2013 10:58, schrieb Chen Gang:
>>>> On 06/26/2013 04:39 PM, Richard Weinberger wrote:
>>>>>>>>>>>>>>>>>>>>>> The drivers internal code has already check the related 
>>>>>>>>>>>>>>>>>>>>>> return value,
>>>>>>>>>>>>>>>>>>>>>> so it is the architecture's duty to 'tell' the driver 
>>>>>>>>>>>>>>>>>>>>>> whether support
>>>>>>>>>>>>>>>>>>>>>> io memory (e.g. define ioremap, but return NULL).
>>>>>>>>>>>>>> It does so already by setting CONFIG_HAS_IOMEM=n
>>>>>>>>>>
>>>>>>>>>> Excuse me, I use "grep -rn ioremap *" under "include/" and "arch/um/"
>>>>>>>>>> directory, but can not find the related definition for 'ioremap'.
>>>>>>>>>>
>>>>>>>>>> Is there another declaration or definition way which I don't know ?
>>>>>>>>>> (maybe it is).
>>>>>> Both UML and s390 (in the !CONFIG_PCI) do not define ioremap() because
>>>>>> without io memory you cannot have a ioremap().
>>>>>>
>>>>
>>>> I assume if ioremap() return NULL, it means "without io memory", is it
>>>> correct ?
>>>>
>>>> If it is correct, "define a dummy ioremap(), and return NULL" is just
>>>> the meaning that you mentioned above.
>>>>
>>>> If so, for UML, it is not requirement, but recommend to define a dummy
>>>> ioremap() which return NULL, so can be generic enough to mach all cases.
>> No.
>> Not setting CONFIG_HAS_IOMEM=y means "This arch has no io memory and 
>> therefore no
>> functions to mess with it".
>>
> 
> Since the API itself already contents the meaning: "return NULL means
> the arch has no related io memory",
> 
> Why not define a generic dummy one in "include/asm-generic/io.h" instead
> of "HAS_IOMEM" (which has already spread many various places, and also,
> most of new drivers have to know about it).
> 
> e.g: in "include/asm-generic/io.h", if "CONFIG_HAS_IOMEM=n", define a
> dummy ioremap() which return NULL ... (also need consider more details).

Because we don't even want to build these drivers and not make them fail while
executing io memory related functions.

> 
> All together, I think: it is the duty of "asm-generic/io.h" to process
> this issue, not the duty of many drivers and some architectures.
> 
> 
>> Let's get back to the real problem,
>> drivers/ptp/ptp_pch.c does not build on UML (and I'm very sure also not on 
>> S390).
>> Fix the issue by making it depend on HAS_IOMEM.
>>
> 
> At least now, it seems it is the only suitable way to fix this issue.  :-(
> 
> 
>> Btw: Did you actually look at this driver? There is *zero* reason to have it 
>> on UML.
>> ..like 99.9% of all other drivers which use io memory.
> 
> Excuse me, I did not look at the details of this driver. Maybe it just
> like you said above.

It is.

Thanks,
//richard


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] include/asm-generic/io.h: add 'UML' case just like 'no-MMU'

2013-06-26 Thread Richard Weinberger
Am 26.06.2013 10:58, schrieb Chen Gang:
> On 06/26/2013 04:39 PM, Richard Weinberger wrote:
>>>>>>>>>> The drivers internal code has already check the related return value,
>>>>>>>>>> so it is the architecture's duty to 'tell' the driver whether support
>>>>>>>>>> io memory (e.g. define ioremap, but return NULL).
>>>>>> It does so already by setting CONFIG_HAS_IOMEM=n
>>>>
>>>> Excuse me, I use "grep -rn ioremap *" under "include/" and "arch/um/"
>>>> directory, but can not find the related definition for 'ioremap'.
>>>>
>>>> Is there another declaration or definition way which I don't know ?
>>>> (maybe it is).
>> Both UML and s390 (in the !CONFIG_PCI) do not define ioremap() because
>> without io memory you cannot have a ioremap().
>>
> 
> I assume if ioremap() return NULL, it means "without io memory", is it
> correct ?
> 
> If it is correct, "define a dummy ioremap(), and return NULL" is just
> the meaning that you mentioned above.
> 
> If so, for UML, it is not requirement, but recommend to define a dummy
> ioremap() which return NULL, so can be generic enough to mach all cases.

No.
Not setting CONFIG_HAS_IOMEM=y means "This arch has no io memory and therefore 
no
functions to mess with it".

Let's get back to the real problem,
drivers/ptp/ptp_pch.c does not build on UML (and I'm very sure also not on 
S390).
Fix the issue by making it depend on HAS_IOMEM.

Btw: Did you actually look at this driver? There is *zero* reason to have it on 
UML.
...like 99.9% of all other drivers which use io memory.

Thanks,
//richard

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] tsc.c in UML

2013-08-27 Thread Richard Weinberger
Hi!

Am 27.08.2013 19:51, schrieb Han:
> 
> On Sat, Aug 24, 2013 at 6:42 AM, richard -rw- weinberger 
> mailto:richard.weinber...@gmail.com>> wrote:
> 
> On Fri, Aug 23, 2013 at 8:35 PM, Han  > wrote:
> > Hi,
> >
> > I am using Linux kernel 2.6.27 for building UML kernel.  It seems like
> > "arch/x86/kernel/tsc.c" is not built in and the symbol "cpu_khz" is not
> > available.
> >
> > My question is:  what's the reason that "tsc.c" not included in UML?  Is
> > there any config or simple way(patch?)  to include it in UML?
> 
> Simply because UML has no TSC.
> 
> 
> 
> [Han]  I don't really understand why UML has no TSC.   As I know,  TSC is 
> accessible from user space process (on x86 at least) and I don't see any 
> obvious reason why UML does not
> support TSC.   I might missed something.  

What exactly is the problem you are trying to solve?

> I am trying to add TSC into UML kernel (2.6.27)  for an experiment.   Is that 
> a practical thing to do at all? 

What exactly do you want to add? TSC as a clocksource to UML..?

Thanks,
//richard


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] tsc.c in UML

2013-08-27 Thread Richard Weinberger
Am 27.08.2013 23:30, schrieb Han:
> 
> 
> 
> On Tue, Aug 27, 2013 at 2:28 PM, Han  <mailto:keepsim...@gmail.com>> wrote:
> 
> 
> 
> 
>     On Tue, Aug 27, 2013 at 1:31 PM, Richard Weinberger  <mailto:rich...@nod.at>> wrote:
> 
> Hi!
> 
> Am 27.08.2013 19 :51, schrieb Han:
> >
> > On Sat, Aug 24, 2013 at 6:42 AM, richard -rw- weinberger 
> mailto:richard.weinber...@gmail.com> 
> <mailto:richard.weinber...@gmail.com
> <mailto:richard.weinber...@gmail.com>>> wrote:
> >
> > On Fri, Aug 23, 2013 at 8:35 PM, Han  <mailto:keepsim...@gmail.com> <mailto:keepsim...@gmail.com 
> <mailto:keepsim...@gmail.com>>> wrote:
> > > Hi,
> > >
> > > I am using Linux kernel 2.6.27 for building UML kernel.  It 
> seems like
> > > "arch/x86/kernel/tsc.c" is not built in and the symbol 
> "cpu_khz" is not
> > > available.
> > >
> > > My question is:  what's the reason that "tsc.c" not included 
> in UML?  Is
> > > there any config or simple way(patch?)  to include it in UML?
> >
> > Simply because UML has no TSC.
> >
> >
> >
> > [Han]  I don't really understand why UML has no TSC.   As I know,  
> TSC is accessible from user space process (on x86 at least) and I don't see 
> any obvious reason why UML
> does not
> > support TSC.   I might missed something.
> 
> What exactly is the problem you are trying to solve?
> 
> > I am trying to add TSC into UML kernel (2.6.27)  for an experiment. 
>   Is that a practical thing to do at all?
> 
> What exactly do you want to add? TSC as a clocksource to UML..?
> 
> 
> my immediate need is to compile and run an application that uses 
> "cpu_khz"  (which is part of tsc.c).  I cannot modify the source code of the 
> application as I am not the owner.  
> 
> [Han] sorry,  when I say "application",  I really meant Kernel Module. (klm). 

I really cannot help you on closed sources Kernel modules. You are on your own.
But you can look how arch/x86 computes cpu_khz. If you find a sane way to make 
it available on UML, fine. :)

Thanks,
//richard


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] um: remove used STDIO_CONSOLE Kconfig param

2013-10-27 Thread Richard Weinberger
Am 27.10.2013 08:06, schrieb Michael Opdenacker:
> This removes the STDIO_CONSOLE Kconfig parameter which
> is defined but no longer used anywhere in the makefiles and source code.
> 
> Signed-off-by: Michael Opdenacker 

Looks good.
Queued for 3.13.

Thanks,
//richard

> ---
>  arch/um/Kconfig.char | 4 
>  1 file changed, 4 deletions(-)
> 
> diff --git a/arch/um/Kconfig.char b/arch/um/Kconfig.char
> index b9d7c42..f10738d 100644
> --- a/arch/um/Kconfig.char
> +++ b/arch/um/Kconfig.char
> @@ -6,10 +6,6 @@ config STDERR_CONSOLE
>   help
> console driver which dumps all printk messages to stderr.
>  
> -config STDIO_CONSOLE
> - bool
> - default y
> -
>  config SSL
>   bool "Virtual serial line"
>   help
> 


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [patch] uml: check length in exitcode_proc_write()

2013-11-01 Thread Richard Weinberger
Am 29.10.2013 20:06, schrieb Dan Carpenter:
> We don't cap the size of buffer from the user so we could write past
> the end of the array here.  Only root can write to this file.
> 
> Reported-by: Nico Golde 
> Reported-by: Fabian Yamaguchi 
> Signed-off-by: Dan Carpenter 

Thanks everyone!
Patch applied and an it's way to Linus' tree.

Thanks,
//richard

> diff --git a/arch/um/kernel/exitcode.c b/arch/um/kernel/exitcode.c
> index 829df49..41ebbfe 100644
> --- a/arch/um/kernel/exitcode.c
> +++ b/arch/um/kernel/exitcode.c
> @@ -40,9 +40,11 @@ static ssize_t exitcode_proc_write(struct file *file,
>   const char __user *buffer, size_t count, loff_t *pos)
>  {
>   char *end, buf[sizeof("n\0")];
> + size_t size;
>   int tmp;
>  
> - if (copy_from_user(buf, buffer, count))
> + size = min(count, sizeof(buf));
> + if (copy_from_user(buf, buffer, size))
>   return -EFAULT;
>  
>   tmp = simple_strtol(buf, &end, 0);
> 


--
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] UML: Get's stuck

2013-11-06 Thread Richard Weinberger
On Tue, Nov 5, 2013 at 9:21 PM, Thomas Meyer  wrote:
> Hi,
>
> I'm running Fedora 20 inside a 3.12 UML kernel and the "yum upgrade -y"
> command seems to get stuck after a while/few minutes.
>
> Any ideas what's going one here? How to debug this?
>
> It looks like the process running yum is in state ptrace stopped, but
> doesn't continue.

Got only yum stuck or the whole UML kernel?
Does yum a ptrace() within UML or did you observe that from the outside?

> The process tree looks also strange:
>
> 20330 pts/3S+ 1:18  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20337 pts/3S+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20338 pts/3S+ 0:03  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20339 pts/3S+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20347 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20405 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20469 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20615 pts/3S+ 0:00  |   \_ xterm -T Virtual Console #1 (fedora20) 
> -e port-helper -uml-socket /tmp/xterm-pipeiW6d5k
> 20625 ?Ss 0:00  |   |   \_ port-helper -uml-socket 
> /tmp/xterm-pipeiW6d5k
> 20626 ?Zs 0:00  |   \_ [linux] 
> 20630 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20642 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20650 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20651 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20663 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20681 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20684 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20690 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20691 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20699 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20709 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20722 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20754 pts/3S+ 0:00  |   \_ xterm -T Virtual Console #2 (fedora20) 
> -e port-helper -uml-socket /tmp/xterm-pipetxRIbS
> 20757 ?Ss 0:00  |   |   \_ port-helper -uml-socket 
> /tmp/xterm-pipetxRIbS
> 20755 pts/3S+ 0:00  |   \_ xterm -T Virtual Console #6 (fedora20) 
> -e port-helper -uml-socket /tmp/xterm-pipedhXmGp
> 20762 ?Ss 0:00  |   |   \_ port-helper -uml-socket 
> /tmp/xterm-pipedhXmGp
> 20758 ?Zs 0:00  |   \_ [linux] 
> 20760 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20763 ?Zs 0:00  |   \_ [linux] 
> 20797 pts/3S+ 0:00  |   \_ xterm -T Virtual Console #3 (fedora20) 
> -e port-helper -uml-socket /tmp/xterm-pipeULItXd
> 20812 ?Ss 0:00  |   |   \_ port-helper -uml-socket 
> /tmp/xterm-pipeULItXd
> 20813 ?Zs 0:00  |   \_ [linux] 
> 20815 pts/3S+ 0:00  |   \_ xterm -T Virtual Console #5 (fedora20) 
> -e port-helper -uml-socket /tmp/xterm-pipeaKUbD3
> 20876 ?Ss 0:00  |   |   \_ port-helper -uml-socket 
> /tmp/xterm-pipeaKUbD3
> 20877 ?Zs 0:00  |   \_ [linux] 
> 20896 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 20909 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 21005 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 21007 pts/3Z+ 0:00  |   \_ [uml_net] 
> 21019 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 21112 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
> systemd.unit=multi-user.target umid=fedora20
> 21125 pts/3Z+ 

Re: [uml-user] UML: Get's stuck

2013-11-06 Thread Richard Weinberger
Am 06.11.2013 20:52, schrieb Thomas Meyer:
> Am Mittwoch, den 06.11.2013, 13:40 +0100 schrieb Richard Weinberger:
>> On Tue, Nov 5, 2013 at 9:21 PM, Thomas Meyer  wrote:
>>> Hi,
>>>
>>> I'm running Fedora 20 inside a 3.12 UML kernel and the "yum upgrade -y"
>>> command seems to get stuck after a while/few minutes.
>>>
>>> Any ideas what's going one here? How to debug this?
>>>
>>> It looks like the process running yum is in state ptrace stopped, but
>>> doesn't continue.
>>
>> Got only yum stuck or the whole UML kernel?
> 
> How to tell? It feels like the whole kernel got stuck.

Login on another shell... :)

>> Does yum a ptrace() within UML or did you observe that from the outside?
> 
> I saw it from outside in below process listing.

Okay. All UML childs do ptrace() as UML uses ptrace() for system call emulation.

>>
>>> The process tree looks also strange:
>>>
>>> 20330 pts/3S+ 1:18  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20337 pts/3S+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20338 pts/3S+ 0:03  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20339 pts/3S+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20347 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20405 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20469 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20615 pts/3S+ 0:00  |   \_ xterm -T Virtual Console #1 
>>> (fedora20) -e port-helper -uml-socket /tmp/xterm-pipeiW6d5k
>>> 20625 ?Ss 0:00  |   |   \_ port-helper -uml-socket 
>>> /tmp/xterm-pipeiW6d5k
>>> 20626 ?Zs 0:00  |   \_ [linux] 
>>> 20630 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20642 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20650 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20651 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20663 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20681 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20684 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20690 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20691 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20699 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20709 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20722 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20754 pts/3S+ 0:00  |   \_ xterm -T Virtual Console #2 
>>> (fedora20) -e port-helper -uml-socket /tmp/xterm-pipetxRIbS
>>> 20757 ?Ss 0:00  |   |   \_ port-helper -uml-socket 
>>> /tmp/xterm-pipetxRIbS
>>> 20755 pts/3S+ 0:00  |   \_ xterm -T Virtual Console #6 
>>> (fedora20) -e port-helper -uml-socket /tmp/xterm-pipedhXmGp
>>> 20762 ?Ss 0:00  |   |   \_ port-helper -uml-socket 
>>> /tmp/xterm-pipedhXmGp
>>> 20758 ?Zs 0:00  |   \_ [linux] 
>>> 20760 pts/3t+ 0:00  |   \_ ./linux ubd0=ext3fs.img mem=768M 
>>> systemd.unit=multi-user.target umid=fedora20
>>> 20763 ?Zs 0:00  |   \_ [linux] 
>>> 20797 pts/3S+ 0:00  |   \_ xterm -T Vir

Re: [uml-user] [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Richard Weinberger
Am 13.11.2013 06:06, schrieb Chen Gang:
> Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc()
> succeed, they may be used, so in the next failure, we have to skip them
> to let exit_mmap() or do_munmap() to process it.
> 
> According to "Documentation/vm/locking", 'mm->page_table_lock' is for
> using vma list, so not need it when its related vmas are detached or
> unmapped from using vma list.
> 
> The related work flow:
> 
>   exit_mmap() ->
> unmap_vmas(); /* so not need mm->page_table_lock */
> free_pgtables();
> 
>   do_munmap()->
> detach_vmas_to_be_unmapped(); /* so not need mm->page_table_lock */
> unmap_region() ->
>   free_pgtables();
> 
>   free_pgtables() ->
> free_pgd_range() ->
>   free_pud_range() ->
> free_pmd_range() ->
>   free_pte_range() ->
> pmd_clear();
> pte_free_tlb();
>   pud_clear();
>   pmd_free_tlb();
> pgd_clear(); 
> pud_free_tlb();
> 
> 
> Signed-off-by: Chen Gang 

Sounds reasonable to me.
*But* there are patches you from out there that tried to fix similar issues and 
got reverted later.
Now I'm a bit nervous and want a ACK from mm folks to have this verified.
It's not that I don't trust you, but I really don't trust you. ;-)

Thanks,
//richard

--
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Richard Weinberger
Am 14.11.2013 08:33, schrieb Chen Gang:
> On 11/14/2013 02:48 PM, Chen Gang wrote:
>>> >From the look of it, if an error did occur in init_stub_pte(),
 then the special mapping of STUB_CODE and STUB_DATA would not
 be installed, so this area would be invisible to munmap and exit,
 and with your patch then the pages allocated likely to be leaked.

>> It sounds reasonable to me: "although 'pgd' related with 'mm', but they
>> are not installed". But just like you said originally: "better get ACK
>> from some mm guys".
>>
>>
>> Hmm... is it another issue: "after STUB_CODE succeeds, but STUB_DATA
>> fails, the STUB_CODE will be leaked".
>>
>>
 Which is not to say that the existing code is actually correct:
 you're probably right that it's technically wrong.  But it would
 be very hard to get init_stub_pte() to fail, and has anyone
 reported a problem with it?  My guess is not, and my own
 inclination to dabble here is zero.

>> Yeah.
>>
> 
> If we can not get ACK from any mm guys, and we have no enough time
> resource to read related source code, for me, I still recommend to
> remove p?d_free() in failure processing.

It's rather easy, does your commit fix a real problem you are facing?
If the answer is "yes" we can talk.

Chen, If you really want to help us, please investigate into existing/real 
problems.
Toralf does a very good job in finding strange issues using trinity.
You could help him resolving the issue described in that thread:
"[uml-devel] fuzz tested 32 bit user mode linux image hangs in 
radix_tree_next_chunk()"

Thanks,
//richard

--
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] UML: Get's stuck

2014-03-16 Thread Richard Weinberger


Am 14.03.2014 15:57, schrieb Thomas Meyer:
> Am Mittwoch, den 06.11.2013, 20:59 +0100 schrieb Richard Weinberger:
>> Am 06.11.2013 20:52, schrieb Thomas Meyer:
>>> Am Mittwoch, den 06.11.2013, 13:40 +0100 schrieb Richard Weinberger:
>>>> On Tue, Nov 5, 2013 at 9:21 PM, Thomas Meyer  wrote:
>>>>> Hi,
>>>>>
>>>>> I'm running Fedora 20 inside a 3.12 UML kernel and the "yum upgrade -y"
>>>>> command seems to get stuck after a while/few minutes.
>>>>>
>>>>> Any ideas what's going one here? How to debug this?
>>>>>
>>>>> It looks like the process running yum is in state ptrace stopped, but
>>>>> doesn't continue.
>>>>
>>>> Got only yum stuck or the whole UML kernel?
>>>
> 
> only some processes get stuck.
> 
> After enabling hung task detection in the kernel I see this in the logs:
> 
> [ 8040.10] INFO: task jbd2/ubda-8:308 blocked for more than 120
> seconds.
> [ 8040.10]   Not tainted 3.13.6 #24
> [ 8040.10] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
> disables this message.
> [ 8040.10] jbd2/ubda-8 D 40aa1c83 0   308  2
> 0x
> [ 8040.10] Stack:
> [ 8040.10]  600795a0 603f3120 b066db70 6006476d
> [ 8040.10]  1b066dbb0 b0631040 b066db80 6001c0a3
> [ 8040.10]  600795a0 b066b380 b066dbe0 60314b4e
> [ 8040.10] Call Trace:
> [ 8040.10]  [<600795a0>] ? rcu_sched_qs+0x0/0xd0
> [ 8040.10]  [<6006476d>] ? dequeue_task+0x1d/0x50
> [ 8040.10]  [<6001c0a3>] __switch_to+0x53/0x90
> [ 8040.10]  [<600795a0>] ? rcu_sched_qs+0x0/0xd0
> [ 8040.10]  [<60314b4e>] __schedule+0x1ae/0x470
> [ 8040.10]  [<60068900>] ? pick_next_task_fair+0x0/0x1a0
> [ 8040.10]  [<6006aa70>] ? prepare_to_wait+0x0/0x90
> [ 8040.10]  [<60314e43>] schedule+0x33/0x80
> [ 8040.10]  [<6020b9d4>] ? submit_bio+0xa4/0x1c0
> [ 8040.10]  [<60315030>] io_schedule+0x60/0x90
> [ 8040.10]  [<6010b7b0>] sleep_on_buffer+0x10/0x20
> [ 8040.10]  [<603153a3>] __wait_on_bit+0x63/0xa0
> [ 8040.10]  [<6010b7a0>] ? sleep_on_buffer+0x0/0x20
> [ 8040.10]  [<6010b7a0>] ? sleep_on_buffer+0x0/0x20
> [ 8040.10]  [<60315466>] out_of_line_wait_on_bit+0x86/0xa0
> [ 8040.10]  [<6010e312>] ? submit_bh+0x12/0x20
> [ 8040.10]  [<6006aed0>] ? wake_bit_function+0x0/0x40
> [ 8040.10]  [<600645e3>] ? __might_sleep+0x153/0x170
> [ 8040.10]  [<60064490>] ? __might_sleep+0x0/0x170
> [ 8040.10]  [<6010b890>] ? __wait_on_buffer+0x0/0x40
> [ 8040.10]  [<6010b8c4>] __wait_on_buffer+0x34/0x40
> [ 8040.10]  [<6019a166>] jbd2_journal_commit_transaction
> +0x1696/0x19a0
> [ 8040.10]  [<60315060>] ? _cond_resched+0x0/0x50
> [ 8040.10]  [<6010d200>] ? __brelse+0x0/0x30
> [ 8040.10]  [<600330c0>] ? block_signals+0x0/0x20
> [ 8040.10]  [<6006abff>] ? finish_wait+0x6f/0x90
> [ 8040.10]  [<6006a950>] ? __wake_up+0x0/0x70
> [ 8040.10]  [<600487c0>] ? del_timer+0x0/0x60
> [ 8040.10]  [<6006a950>] ? __wake_up+0x0/0x70
> [ 8040.10]  [<6019dd5f>] kjournald2+0xdf/0x2d0
> [ 8040.10]  [<60068900>] ? pick_next_task_fair+0x0/0x1a0
> [ 8040.10]  [<6006ae90>] ? autoremove_wake_function+0x0/0x40
> [ 8040.10]  [<6019dc80>] ? kjournald2+0x0/0x2d0
> [ 8040.10]  [<6006a670>] ? __init_waitqueue_head+0x0/0x10
> [ 8040.10]  [<6019dc80>] ? kjournald2+0x0/0x2d0
> [ 8040.10]  [<6006a670>] ? __init_waitqueue_head+0x0/0x10
> [ 8040.10]  [<6005ce44>] kthread+0x114/0x140
> [ 8040.10]  [<6006442d>] ? finish_task_switch.isra.72+0x2d/0x90
> [ 8040.10]  [<600656a2>] ? schedule_tail+0x22/0xd0
> [ 8040.10]  [<6001be21>] new_thread_handler+0x81/0xb0
> [ 8040.10] 
> [ 8040.10] INFO: task yum:1082 blocked for more than 120 seconds.
> [ 8040.10]   Not tainted 3.13.6 #24
> [ 8040.10] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
> disables this message.
> [ 8040.10] yum D 40aa1c83 0  1082   1073
> 0x
> [ 8040.10] Stack:
> [ 8040.10]  600795a0 603f3120 aae3fc80 6006476d
> [ 8040.10]  162b83078 b0631040 aae3fc90 6001c0a3
> [ 8040.10]  600795a0 aadeab40 aae3fcf0 60314b4e
> [ 8040.10] Call Trace:
> [ 8040.10]  [<600795a0>] ? rcu_sched_qs+0x0/0xd0
> [ 8040.10]  [<6006476d>] ? dequeue_task+0x1d/0x50
> [ 8040.10]

Re: [uml-user] UML: Get's stuck

2014-05-26 Thread Richard Weinberger
Am 20.05.2014 16:32, schrieb Jonathan Rudenberg:
> On 2014-03-16, 11:09 AM, Richard Weinberger wrote:
>> Am 14.03.2014 15:57, schrieb Thomas Meyer:
>>>
>>> only some processes get stuck.
>>>
>>> After enabling hung task detection in the kernel I see this in the logs:
>>>
>>> [ 8040.10] INFO: task jbd2/ubda-8:308 blocked for more than 120
>>> seconds.
> ...
>>>
>>> any ideas? some synchronisation error in ext4?
>>
>> Hmm, maybe you suffer from the same issue this patch tries to address:
>> https://lkml.org/lkml/2014/2/14/733
> 
> I'm running into a very similar issue on vanilla 3.14.4 and 3.15-rc5, both 
> appear to have that patch already applied.
> 
> I've tested ext4, ext3, btrfs, all with the same issue: processes writing to 
> disk in the guest randomly hang permanently after a few minutes of uptime. 
> The guest reports 100%
> iowait, the host has no load and is totally fine.

Can you share your UML disk image?
Maybe your userspace triggers some odds.
What distro is it?

Does it only happen with ubd disks?
IOW does NFS or hostfs work?

Thanks,
//richard

--
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] UML with PIN

2014-05-28 Thread Richard Weinberger
On Wed, May 28, 2014 at 10:39 PM, Nalli, Sanketh  wrote:
> Hey,
>
> Has anyone successfully tried running UML with PIN attached to it ?

I have never used this tool.
If you want to debug the UML kernel you need to teach your debugger
that it has to
ignore SIGSEGV. UML is using this signal for page faults.

> https://software.intel.com/en-us/articles/pin-a-dynamic-binary-instrumentation-tool
>
>
>
> Also, can you explain the output of ps –e, after I run UML :
>
> 1256 pts/700:00:00 linux
>
> 1266 pts/700:00:00 linux
>
> 1267 pts/700:00:00 linux
>
> 1268 pts/700:00:00 linux
>
> 1269 pts/700:00:00 linux
>
>
>
> Why are there these many processes ?

Every UML guest process has a twin on the host side.
Actually it is a thread (not a pthread).

> What is a good resource to understand UML better ?

The source. :-)
Feel free to ask if you have questions.

-- 
Thanks,
//richard

--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] invalid /proc/PID/exe in UML processes

2014-05-30 Thread Richard Weinberger
On Fri, May 30, 2014 at 3:22 AM, Nalli, Sanketh  wrote:
> Hi,
>
> So I start UML with the cmdline
>
> ./linux rootfstype=hostfs rw mem=1G init=/bin/bash
>
>
>
> When the bash shell comes up, I run my prog : ./my_prog
>
>
>
> 6173 pts/800:00:00 linux
>
> 6180 pts/800:00:00 linux
>
> 6181 pts/800:00:00 linux
>
> 6182 pts/800:00:00 linux
>
> 6183 pts/800:00:00 linux
>
> 6188 pts/800:00:13 linux
>
>
>
>
>
> The last item in the list with PID is 6188 is my program.
>
> I can tell because my_prog increments a counter in an infinite loop
>
> And consumes CPU cycles. It shows up on “top” as the dominant process.
>
>
>
> My question:
>
> 1.   /proc/6188/exe is invalid. Why ??
>
> I mean, it doesn’t point to anything.

This cannot be.
On the host side it will point to the UML binary itself and on the
guest side to the executed program image.

> Shouldn’t it point to my_prog or something ?
>
>
>
> 2.   What do the 4 UML processes 6173, 6180, 6181, 6182 do ? (6183 is
> /bin/bash whos “exe” symlink is also doesn’t point to anything !!)

See enjoymind...@gmail.com's answer.


> 3.   When a UML process, say my_prog (PID 6188) makes a system call,
> where is the system call executed – is it within the addr space of 6173 (the
> UML kernel process) or 6188 (my_prog running in UML ??)

Within the kernel Process.
See arch/um/kernel/skas/syscall.c

-- 
Thanks,
//richard

--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] how to find out which functions have been record in exception table?

2014-05-30 Thread Richard Weinberger
On Fri, May 30, 2014 at 9:29 AM, enjoy mindful  wrote:
> Hi, all
>   I build linux-3.12.6 uml with default configure.
>
> tar -jxf linux-3.12.6.tar.bz2
> cd linux-3.12.6
> make ARCH=um defconfig
> make ARCH=um linux
>
> I'm confused about the exception table of the uml kernel.
>
>
> $ objdump --full-contents --section=__ex_table linux
>
> linux: file format elf32-i386
>
> Contents of section __ex_table:
>  82a5048 3e6fdcff bcbaf6ff 396fdcff b4baf6ff  >o..9o..
>  82a5058 336fdcff acbaf6ff 306fdcff bfbaf6ff  3o..0o..
>  82a5068 2b6fdcff 9cbaf6ff 286fdcff afbaf6ff  +o..(o..
>  82a5078 236fdcff 8cbaf6ff 206fdcff 9fbaf6ff  #o.. o..
>  82a5088 1b6fdcff 7cbaf6ff 186fdcff 8fbaf6ff  .o..|o..
>  82a5098 136fdcff 6cbaf6ff 106fdcff 7fbaf6ff  .o..lo..
>  82a50a8 0b6fdcff 5cbaf6ff 086fdcff 6fbaf6ff  .o..\o..o...
>  82a50b8 036fdcff 4cbaf6ff 006fdcff 5fbaf6ff  .o..Lo.._...
>  82a50c8 fb6edcff 3cbaf6ff f86edcff 4fbaf6ff  .n..  82a50d8 f36edcff 2cbaf6ff f06edcff 3fbaf6ff  .n..,n..?...
>  82a50e8 eb6edcff 1cbaf6ff e86edcff 2fbaf6ff  .n...n../...
>  82a50f8 e36edcff 0cbaf6ff e06edcff 1fbaf6ff  .n...n..
>  82a5108 db6edcff fcb9f6ff d86edcff 0fbaf6ff  .n...n..
>  82a5118 d36edcff ecb9f6ff d06edcff ffb9f6ff  .n...n..
>  82a5128 cb6edcff dcb9f6ff c86edcff efb9f6ff  .n...n..
>  82a5138 c36edcff ccb9f6ff c06edcff dfb9f6ff  .n...n..
>  82a5148 bb6edcff bcb9f6ff b86edcff cfb9f6ff  .n...n..
>  82a5158 ce6edcff acb9f6ff cc6edcff bfb9f6ff  .n...n..
>  82a5168 cf6edcff 9cb9f6ff c96edcff afb9f6ff  .n...n..
>
> Let pick the first instruction location '3e6fdcff' (in human readable
> is 0xffdc6f3e). My question is how to find which function in UML
> kernel has an instruction in location 0xffdc6f3e?

Not sure whether I understand your question correctly.
Isn't addr2line what you need?

>
> In i386 platform, the kernel address greater than the __PAGE_OFFSET
> (0xC000). However, as skas0 sperate the uml kernel and user
> process address space, it dose work by search address greater than the
> __PAGE_OFFSET for UML.
>
> thanks
>
> --
> Time is money. Stop wasting it! Get your web API in 5 minutes.
> www.restlet.com/download
> http://p.sf.net/sfu/restlet
> ___
> User-mode-linux-user mailing list
> User-mode-linux-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user



-- 
Thanks,
//richard

--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] how to find out which functions have been record in exception table?

2014-05-30 Thread Richard Weinberger
Am 30.05.2014 10:08, schrieb enjoy mindful:
> Sorry. I know how to use addr2line. But it is not what I'm looking for.
> 
> For example, with i386 kernel, it is easy to find c017e7a5 belong to
> function get_user.
> 
> x86]$ vi /hack/linux-3.12.6/Documentation/x86/exception-tables.txt
> .
> 217 or in human readable byte order:
> 218
> 219  >  c01aa7c4 c017c093 c0199fe0 c017c097 c017c099  
> 220  >  c01aa7d4 c017c2f6 c0199fe9 c017e7a5 c0199ff5  
> 221   ^
> 222this is the interesting part!
> 223  >  c01aa7e4 c0180a08 c019a001 c0180a0a c019a004  
> 
> my question is how to find 0xffdc6eb8 belong to which uml kernel function.

Ah ok.
I'd decode it from the source side.
I.e. start in arch/x86/um/fault.c

Thanks,
//richard

--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] invalid /proc/PID/exe in UML processes

2014-06-02 Thread Richard Weinberger
On Mon, Jun 2, 2014 at 7:55 PM, Nalli, Sanketh  wrote:
> Thanks a lot.
>
> Do you know why my /proc is empty in the guest

Did you mount procfs?

> And why does the /proc/PID/exe NOT point to anything in
>
> The host ? (PID is the pid of a dummy program running in UML)

Host PID != Guest PID

>
>
> From: enjoy mindful [mailto:enjoymind...@gmail.com]
> Sent: Friday, May 30, 2014 12:06 AM
> To: Nalli, Sanketh
> Cc: user-mode-linux-user@lists.sourceforge.net
> Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes
>
>
>
> let me answer your second question.
>
> I did this analysis with kernel linux-3.12.6:
>
> 1) make ARCH=um cscope
> 2) search functions which called 'clone'
>   File   FunctionLine
> 0 ubd_user.c start_io_thread   43 pid = clone(io_thread, (void *) sp,
> CLONE_FILES |
>   CLONE_VM, NULL);
> 1 helper.c   start_io_thread   74 pid = clone(helper_child, (void *) sp,
> CLONE_VM, &data);
> 2 helper.c   start_io_thread  124 pid = clone(proc, (void *) sp, flags,
> arg);
> 3 process.c  start_userspace  300 pid = clone(userspace_tramp, (void *) sp,
> flags, (void *)
>   stub_stack);
> 4 lguest.c   create_thread   1048 vq->thread = clone(do_thread, stack +
> 32768, CLONE_VM |
>   SIGCHLD, vq);
>
> 3) insert some printk statement in those function
> 4) build and run, then watch the booting process output
> [root@localhost ~]# dmesg | grep 6436
> [0.19] run_helper_thread : clone success, pid = 6436
> [root@localhost ~]# dmesg | grep 6437
> [0.19] start_io_thread - clone success : pid = 6437
> [root@localhost ~]# dmesg | grep 6438
> [0.19] run_helper_thread : clone success, pid = 6438
>
> [real@real runuml]$ ps -ef | grep patch
> real 6423  1553  6 16:17 pts/000:00:02 ./linux_patched
> ubda=./Fedora20-x86-root_fs mem=256m
> real 6436  6423  0 16:17 pts/000:00:00 ./linux_patched
> ubda=./Fedora20-x86-root_fs mem=256m
> real 6437  6423  0 16:17 pts/000:00:00 ./linux_patched
> ubda=./Fedora20-x86-root_fs mem=256m
> real 6438  6423  0 16:17 pts/000:00:00 ./linux_patched
> ubda=./Fedora20-x86-root_fs mem=256m
> real 6439  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6459  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6479  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6492  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6565  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6567  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6572  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6573  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6576  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6605  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6619  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6621  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6707  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6715  6423  0 16:17 pts/000:00:00 [linux_patched]
> real 6765  6423  0 16:18 pts/000:00:00 [linux_patched]
>
> [root@localhost ~]# dmesg | grep proc
> [0.09] run_helper_thread : clone success, pid = 8387, proc=0806471d
> [0.10] run_helper_thread : clone success, pid = 8389, proc=080663a3
>
> [real@real linux-3.12.6]$ grep 0806471d System.map
> 0806471d t aio_thread
> [real@real linux-3.12.6]$ grep 080663a3 System.map
> 080663a3 t write_sigio_thread
>
> so, the four processes are:
> 1) uml kernel main thread
> 2) aio_thread
> 3) io_thread
> 4) write_sigio_thread
>
>
>
> On Fri, May 30, 2014 at 9:22 AM, Nalli, Sanketh 
> wrote:
>
> Hi,
>
> So I start UML with the cmdline
>
> ./linux rootfstype=hostfs rw mem=1G init=/bin/bash
>
>
>
> When the bash shell comes up, I run my prog : ./my_prog
>
>
>
> 6173 pts/800:00:00 linux
>
> 6180 pts/800:00:00 linux
>
> 6181 pts/800:00:00 linux
>
> 6182 pts/800:00:00 linux
>
> 6183 pts/800:00:00 linux
>
> 6188 pts/800:00:13 linux
>
>
>
>
>
> The last item in the list with PID is 6188 is my program.
>
> I can tell because my_prog increments a counter in an infinite loop
>
> And consumes CPU cycles. It shows up on “top” as the dominant process.
>
>
>
> My question:
>
> 1.   /proc/6188/exe is invalid. Why ??
>
> I mean, it doesn’t point to anything.
>
> Shouldn’t it point to my_prog or something ?
>
>
>
> 2.   What do the 4 UML processes 6173, 6180, 6181, 6182 do ? (6183 is
> /bin/bash whos “exe” symlink is also doesn’t point to anything !!)
>
> 3.   When a UML process, say my_prog (PID 6188) makes a system call,
> where is the system call executed – is it within the addr space of 6173 (the
> UML kernel process) or 6188 (my_prog running in UML ??)
>
>
>
> -Sanketh
>
>
>
>
>
>
> --
> Time is money. Stop wasting it! Get your web API in

Re: [uml-user] invalid /proc/PID/exe in UML processes

2014-06-02 Thread Richard Weinberger
Am 02.06.2014 20:53, schrieb Nalli, Sanketh:
>>> And why does the /proc/PID/exe NOT point to anything in
>>>
>>> The host ? (PID is the pid of a dummy program running in UML)
> 
>> Host PID != Guest PID
> 
> Yes I know that.
> That’s not what I meant.
> 
> What I am trying to say is this :
> 1.  When you run a program in side UML it shows up on HOST
> as "linux" in the ps -e listing
> 
> 2. the "exe" symlink of that "linux" process in the /proc of the HOST
> Is EMPTY !!!

Not here:
rw@sandpuppy:~> for i in `pidof linux` ; do ls -l /proc/$i/exe ; done
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/31270/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/31269/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/31266/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/31250/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/31248/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/31245/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/31244/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/31243/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/31237/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/30784/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/30783/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/30759/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/30686/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/30685/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/30684/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/30683/exe -> /home/rw/linux/linux
lrwxrwxrwx 1 rw users 0  2. Jun 21:05 /proc/30676/exe -> /home/rw/linux/linux

What host kernel are you using?

Thanks,
//richard

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] invalid /proc/PID/exe in UML processes

2014-06-02 Thread Richard Weinberger


Am 02.06.2014 21:16, schrieb Nalli, Sanketh:
> nalli@haris-crashnburn:~$ cd /proc/6188
> nalli@haris-crashnburn:/proc/6188$ ls -l exe

What does "ls -la /proc/6188" show?

Thanks,
//richard

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] invalid /proc/PID/exe in UML processes

2014-06-02 Thread Richard Weinberger
Am 02.06.2014 22:11, schrieb Nalli, Sanketh:
> Nothing..just lists all the contents including the hidden
> Ones in a long listing fashion.

Please show it verbatim.

Thanks,
//richard

> -Original Message-
> From: Richard Weinberger [mailto:rich...@nod.at] 
> Sent: Monday, June 02, 2014 12:20 PM
> To: Nalli, Sanketh
> Cc: user-mode-linux-user@lists.sourceforge.net
> Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes
> 
> 
> 
> Am 02.06.2014 21:16, schrieb Nalli, Sanketh:
>> nalli@haris-crashnburn:~$ cd /proc/6188 
>> nalli@haris-crashnburn:/proc/6188$ ls -l exe
> 
> What does "ls -la /proc/6188" show?
> 
> Thanks,
> //richard
> 

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] invalid /proc/PID/exe in UML processes

2014-06-02 Thread Richard Weinberger
Are you running UML under a debugger?

Thanks,
//richard

Am 02.06.2014 22:16, schrieb Nalli, Sanketh:
> -r--r--r-- 1 nalli nalli 0 Jun  2 13:07 wchan
> nalli@haris-crashnburn:/proc/4755$ ls -la
> ls: cannot read symbolic link exe: No such file or directory
> total 0
> dr-xr-xr-x   9 nalli nalli 0 Jun  2 13:07 .
> dr-xr-xr-x 346 root  root  0 May 23 10:18 ..
> dr-xr-xr-x   2 nalli nalli 0 Jun  2 13:07 attr
> -rw-r--r--   1 nalli nalli 0 Jun  2 13:07 autogroup
> -r   1 nalli nalli 0 Jun  2 13:07 auxv
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 cgroup
> --w---   1 nalli nalli 0 Jun  2 13:07 clear_refs
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 cmdline
> -rw-r--r--   1 nalli nalli 0 Jun  2 13:07 comm
> -rw-r--r--   1 nalli nalli 0 Jun  2 13:07 coredump_filter
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 cpuset
> lrwxrwxrwx   1 nalli nalli 0 Jun  2 13:07 cwd -> 
> /home/nalli/cache_cow/linux-3.5
> -r   1 nalli nalli 0 Jun  2 13:07 environ
> lrwxrwxrwx   1 nalli nalli 0 Jun  2 13:07 exe
> dr-x--   2 nalli nalli 0 Jun  2 13:07 fd
> dr-x--   2 nalli nalli 0 Jun  2 13:07 fdinfo
> -r   1 nalli nalli 0 Jun  2 13:07 io
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 latency
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 limits
> -rw-r--r--   1 nalli nalli 0 Jun  2 13:07 loginuid
> dr-x--   2 nalli nalli 0 Jun  2 13:07 map_files
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 maps
> -rw---   1 nalli nalli 0 Jun  2 13:07 mem
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 mountinfo
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 mounts
> -r   1 nalli nalli 0 Jun  2 13:07 mountstats
> dr-xr-xr-x   5 nalli nalli 0 Jun  2 13:07 net
> dr-x--x--x   2 nalli nalli 0 Jun  2 13:07 ns
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 numa_maps
> -rw-r--r--   1 nalli nalli 0 Jun  2 13:07 oom_adj
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 oom_score
> -rw-r--r--   1 nalli nalli 0 Jun  2 13:07 oom_score_adj
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 pagemap
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 personality
> lrwxrwxrwx   1 nalli nalli 0 Jun  2 13:07 root -> /
> -rw-r--r--   1 nalli nalli 0 Jun  2 13:07 sched
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 schedstat
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 sessionid
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 smaps
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 stack
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 stat
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 statm
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 status
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 syscall
> dr-xr-xr-x   3 nalli nalli 0 Jun  2 13:07 task
> -r--r--r--   1 nalli nalli 0 Jun  2 13:07 wchan
> nalli@haris-crashnburn:/proc/4755$ killall linux
> nalli@haris-crashnburn:/proc/4755$
> 
> -Original Message-
> From: Richard Weinberger [mailto:rich...@nod.at] 
> Sent: Monday, June 02, 2014 1:15 PM
> To: Nalli, Sanketh
> Cc: user-mode-linux-user@lists.sourceforge.net
> Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes
> 
> Am 02.06.2014 22:11, schrieb Nalli, Sanketh:
>> Nothing..just lists all the contents including the hidden Ones in a 
>> long listing fashion.
> 
> Please show it verbatim.
> 
> Thanks,
> //richard
> 
>> -Original Message-
>> From: Richard Weinberger [mailto:rich...@nod.at]
>> Sent: Monday, June 02, 2014 12:20 PM
>> To: Nalli, Sanketh
>> Cc: user-mode-linux-user@lists.sourceforge.net
>> Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes
>>
>>
>>
>> Am 02.06.2014 21:16, schrieb Nalli, Sanketh:
>>> nalli@haris-crashnburn:~$ cd /proc/6188 
>>> nalli@haris-crashnburn:/proc/6188$ ls -l exe
>>
>> What does "ls -la /proc/6188" show?
>>
>> Thanks,
>> //richard
>>

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] invalid /proc/PID/exe in UML processes

2014-06-02 Thread Richard Weinberger
Am 02.06.2014 22:42, schrieb Nalli, Sanketh:
> Nope, but here is some bootlog

Hmm, I have no idea so far.

Applications running under valgrind or other debuggers suffered from the issue
that /proc/pid/exe is empty.

> The host does not have skas3 patch
> Do you think that is the problem ?

Nope. SKAS0 works fine.

> Which host shd I use that already has this patch
> (I mean I cud patch the host myself but if there is one
> Already present, that is good !)
> 
> Core dump limits :
> soft - 0
> hard - NONE
> Checking that ptrace can change system call numbers...OK
> Checking syscall emulation patch for ptrace...OK
> Checking advanced syscall emulation patch for ptrace...OK
> Checking for tmpfs mount on /dev/shm...nothing mounted on /dev/shm
> Checking PROT_EXEC mmap in /tmp/...OK
> Checking for new_mm and switch_mm support in the host:
> /proc/self/mm ... Failed -
> No such file or directory
> Checking for the skas3 patch in the host:
>   - /proc/mm...not found: No such file or directory
>   - PTRACE_FAULTINFO...not found
>   - PTRACE_LDT...not found
> UML running in SKAS0 mode
> Adding 20606976 bytes to physical memory to account for exec-shield gap
> Linux version 2.6.24-g91525300-dirty (jd...@amd64.user-mode-linux.org) (gcc 
> version 4.1.1 20070105 (Red Hat 4.1.1-51)) #1 Mon Jan 28 12:03:41 EST 2008

Wow. This UML is horrible old.

Thanks,
//richard

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] invalid /proc/PID/exe in UML processes

2014-06-03 Thread Richard Weinberger
Am 03.06.2014 03:29, schrieb Nalli, Sanketh:
> I mean, there is only ONE thread in UML that intercepts
> The system calls and services them.
> Can we have more such threads in the kernel ?

UML has no SMP support.

Thanks,
//richard

> -Original Message-
> From: Nalli, Sanketh 
> Sent: Monday, June 02, 2014 6:29 PM
> To: user-mode-linux-user@lists.sourceforge.net; 'Richard Weinberger'
> Cc: Volos, Haris
> Subject: RE: [uml-user] invalid /proc/PID/exe in UML processes
> 
> Okay, so I've found a way around the invalid exe symlink.
> I don't need that anymore.
> The next challenge is concurrency in UML.
> 
> I wrote a simple program that launches 10 pthreads, Each of which makes some 
> system calls in an infinite loop.
> 
> I notice that even though there are 10 threads in my dummy program, There is 
> only ONE UML kernel thread. Is this correct ?
> If so, does this mean that UML kernel is serializing the execution ?
> Is there some way of making UML kernel multi-threaded ?
> 
> -Original Message-
> From: Richard Weinberger [mailto:rich...@nod.at]
> Sent: Monday, June 02, 2014 1:46 PM
> To: Nalli, Sanketh
> Cc: user-mode-linux-user@lists.sourceforge.net
> Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes
> 
> Am 02.06.2014 22:42, schrieb Nalli, Sanketh:
>> Nope, but here is some bootlog
> 
> Hmm, I have no idea so far.
> 
> Applications running under valgrind or other debuggers suffered from the 
> issue that /proc/pid/exe is empty.
> 
>> The host does not have skas3 patch
>> Do you think that is the problem ?
> 
> Nope. SKAS0 works fine.
> 
>> Which host shd I use that already has this patch (I mean I cud patch 
>> the host myself but if there is one Already present, that is good !)
>>
>> Core dump limits :
>> soft - 0
>> hard - NONE
>> Checking that ptrace can change system call numbers...OK Checking 
>> syscall emulation patch for ptrace...OK Checking advanced syscall 
>> emulation patch for ptrace...OK Checking for tmpfs mount on 
>> /dev/shm...nothing mounted on /dev/shm Checking PROT_EXEC mmap in 
>> /tmp/...OK Checking for new_mm and switch_mm support in the host:
>> /proc/self/mm ... Failed -
>> No such file or directory
>> Checking for the skas3 patch in the host:
>>   - /proc/mm...not found: No such file or directory
>>   - PTRACE_FAULTINFO...not found
>>   - PTRACE_LDT...not found
>> UML running in SKAS0 mode
>> Adding 20606976 bytes to physical memory to account for exec-shield 
>> gap Linux version 2.6.24-g91525300-dirty
>> (jd...@amd64.user-mode-linux.org) (gcc version 4.1.1 20070105 (Red Hat
>> 4.1.1-51)) #1 Mon Jan 28 12:03:41 EST 2008
> 
> Wow. This UML is horrible old.
> 
> Thanks,
> //richard
> 

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] How to run UML with valgrind and GDB?

2014-06-04 Thread Richard Weinberger
On Wed, Jun 4, 2014 at 10:26 AM, Real Name  wrote:
> Hi,
>   I tried to run UML (linux-3.12.6-x86) kernel with valgrind and GDB.
> But valgrind always terminated because SIGSEGV signal. I searched with
> google, just got some very old resource about run linux-2.6.xx with valgrind.

To run UML in GDB you have to tell GDB to ignore SIGSEGV.
UML uses it for page faults.

>  So, is it possible to run linux (>3.12) with valgrind? If yes, how to do it?

No.
A long time ago it was possible after applying a patch to both UML and valgrind.

-- 
Thanks,
//richard

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] how to find out which functions have been record in exception table?

2014-06-04 Thread Richard Weinberger


Am 04.06.2014 15:39, schrieb Real Name:
> On Fri, May 30, 2014 at 10:50:59AM +0200, Richard Weinberger wrote:
> 
> I find the function through checking which object file has the _ex_table 
> section.
> 
> tmp]$ cat find_ex_table.sh
> #!/bin/bash
> 
> (cd ~/uml/linux-3.12.6; find . -type f -name '*.o' > /tmp/xx.txt)
> 
> for file in `cat /tmp/xx.txt`; do
> readelf -S ~/uml/linux-3.12.6/$file | grep ex_table
>   if [ $? -eq 0 ]; then
>   echo $file;
>   echo;
>   fi
> done
> 
> All __extable entries belong to function csum_partial_copy_generic_i386 
> defined in file linux-3.12.6/arch/x86/um/checksum_32.S
> 

I'm sure this is just because of copy&pasting from i386.
I'd be surprised of exception tables actually work on UML.

Thanks,
//richard

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] remove csum_partial_copy_generic_i386 to clean up exception table

2014-06-05 Thread Richard Weinberger
Am 05.06.2014 06:15, schrieb Honggang Li:
> arch/x86/um/checksum_32.S had been copy & paste from x86. When build
> x86 uml, csum_partial_copy_generic_i386 mess up the exception table.
> In fact, exception table dose not work in uml kernel.

Are you sure that exception tables do not work on UML?
I said, I'm not sure. Can you please find out?

In arch/um/kernel/trap.c:segv() we have the mechanism for it:
else if (!is_user && arch_fixup(ip, regs))
goto out;

The interesting question is, is this by design or was it just copy&pasted from 
x86
many moons ago? :)

> And csum_partial_copy_generic_i386 never been called. So, delete it.

I like such clean ups. :-)

Thanks,
//richard

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] remove csum_partial_copy_generic_i386 to clean up exception table

2014-07-18 Thread Richard Weinberger
Am 18.07.2014 01:13, schrieb Real Name:
> On Sat, Jun 28, 2014 at 12:06:28PM +0800, Real Name wrote:
>> On Sat, Jun 21, 2014 at 03:28:52PM +0800, Real Name wrote:
>>> On Thu, Jun 05, 2014 at 11:49:49PM +0200, Richard Weinberger wrote:
>>>> Am 05.06.2014 06:15, schrieb Honggang Li:
>>>>> arch/x86/um/checksum_32.S had been copy & paste from x86. When build
>>>>> x86 uml, csum_partial_copy_generic_i386 mess up the exception table.
>>>>> In fact, exception table dose not work in uml kernel.
>>>>
>>>> Are you sure that exception tables do not work on UML?
>>>> I said, I'm not sure. Can you please find out?
>>>
>>> Hi,
>>>  After traced i386 uml kernel with gdb , I'm sure exception tables 
>>> do *not* work. When csum_partial_copy_generic_i386 read user space memory, 
>>> an access error exception arises, however, the segv function always
>>> return zero. So, the fixup nerver executed. The uml system hang (not
>>> kernel panic).
>>
>> The kernel hang because the SEGV signal handler can't modify the EIP
>> register in signal context. 
>>
>> Here is the summary why exception table dose not works for linux (>3.3):
>> 1) broken exception table (706276543b699d80f546e45f8b12574e7b18d952)
>> 2) arch_fixup modify the local copy of regs. 
> 
> hi, Richard
> ping? are you agree with what i said?
>

Yeah, I think we can merge both of your patches in 3.17. :)

Thanks,
//richard

>>>
>>> thanks.
>>>
>>>>
>>>> In arch/um/kernel/trap.c:segv() we have the mechanism for it:
>>>> else if (!is_user && arch_fixup(ip, regs))
>>>> goto out;
>> 0) access invalid memory address in kernel (no mm for the address. it is
>> easy to force invalid memory acess in kernel. I cast 0x1234 as a void
>> pointer, and pass it to csum_partial_copy_generic_i386)
>> 1) SEGV signal arise
>> 1.1) hard_handler (arch/um/os-Linux/signal.c)
>> The third argument of hard_handler point to signal context.
>> 1.2) call sig_handler 
>> 1.3) call sig_handler_common (dump the registers in signal context into
>>  local var struct uml_pt_regs r.). line 36 is the key point why
>> exception table dose not works in UML.
>>
>> 34 if (sig == SIGSEGV) {
>> 35 /* For segfaults, we want the data from the   
>> sigcontext. */
>> 36 get_regs_from_mc(&r, mc);
>> 37 GET_FAULTINFO_FROM_MC(r.faultinfo, mc);
>> 38 
>>
>> 1.4) call segv_handler (arch/um/kernel/trap.c)
>> 1.5) call segv
>> 1.6) call arch_fixup (arch/x86/um/fault.c)
>> 1.7) arch_fixup (UPT_IP(regs) = fixup->fixup;) set the EIP register of
>> local copy uml_pt_regs
>> 1.8) When function return to sig_handler, the EIP change lost
>> 1.9) When hard_handler signal handler return, it restore the EIP with
>> the address arise the SEGV in step 0. The fixup section never be
>> executed. If exception table works, UML kernel should run fixup code in
>> here.
>>
>> Then repeate step 0 to 1.9, kernel hang on.
>>
>> thanks
>>
>>>>
>>>> The interesting question is, is this by design or was it just copy&pasted 
>>>> from x86
>>>> many moons ago? :)
>>>>
>>>>> And csum_partial_copy_generic_i386 never been called. So, delete it.
>>>>
>>>> I like such clean ups. :-)
>>>>
>>>> Thanks,
>>>> //richard

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


[uml-user] [PATCH 21/43] um: Use get_signal() signal_setup_done()

2014-07-21 Thread Richard Weinberger
From: Richard Weinberger 

Use the more generic functions get_signal() signal_setup_done()
for signal delivery.

Signed-off-by: Richard Weinberger 
---
 arch/um/include/shared/frame_kern.h | 12 --
 arch/um/kernel/signal.c | 27 +-
 arch/x86/um/signal.c| 45 +
 3 files changed, 36 insertions(+), 48 deletions(-)

diff --git a/arch/um/include/shared/frame_kern.h 
b/arch/um/include/shared/frame_kern.h
index f2ca570..a5cde5c 100644
--- a/arch/um/include/shared/frame_kern.h
+++ b/arch/um/include/shared/frame_kern.h
@@ -6,14 +6,10 @@
 #ifndef __FRAME_KERN_H_
 #define __FRAME_KERN_H_
 
-extern int setup_signal_stack_sc(unsigned long stack_top, int sig,
-struct k_sigaction *ka,
-struct pt_regs *regs,
-sigset_t *mask);
-extern int setup_signal_stack_si(unsigned long stack_top, int sig,
-struct k_sigaction *ka,
-struct pt_regs *regs, struct siginfo *info,
-sigset_t *mask);
+extern int setup_signal_stack_sc(unsigned long stack_top, struct ksignal *ksig,
+struct pt_regs *regs, sigset_t *mask);
+extern int setup_signal_stack_si(unsigned long stack_top, struct ksignal *ksig,
+struct pt_regs *regs, sigset_t *mask);
 
 #endif
 
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c
index f57e02e..4f60e4a 100644
--- a/arch/um/kernel/signal.c
+++ b/arch/um/kernel/signal.c
@@ -18,8 +18,7 @@ EXPORT_SYMBOL(unblock_signals);
 /*
  * OK, we're invoking a handler
  */
-static void handle_signal(struct pt_regs *regs, unsigned long signr,
-struct k_sigaction *ka, struct siginfo *info)
+static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)
 {
sigset_t *oldset = sigmask_to_save();
int singlestep = 0;
@@ -39,7 +38,7 @@ static void handle_signal(struct pt_regs *regs, unsigned long 
signr,
break;
 
case -ERESTARTSYS:
-   if (!(ka->sa.sa_flags & SA_RESTART)) {
+   if (!(ksig->ka.sa.sa_flags & SA_RESTART)) {
PT_REGS_SYSCALL_RET(regs) = -EINTR;
break;
}
@@ -52,32 +51,28 @@ static void handle_signal(struct pt_regs *regs, unsigned 
long signr,
}
 
sp = PT_REGS_SP(regs);
-   if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0))
+   if ((ksig->ka.sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0))
sp = current->sas_ss_sp + current->sas_ss_size;
 
 #ifdef CONFIG_ARCH_HAS_SC_SIGNALS
-   if (!(ka->sa.sa_flags & SA_SIGINFO))
-   err = setup_signal_stack_sc(sp, signr, ka, regs, oldset);
+   if (!(ksig->ka.sa.sa_flags & SA_SIGINFO))
+   err = setup_signal_stack_sc(sp, ksig, regs, oldset);
else
 #endif
-   err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset);
+   err = setup_signal_stack_si(sp, ksig, regs, oldset);
 
-   if (err)
-   force_sigsegv(signr, current);
-   else
-   signal_delivered(signr, info, ka, regs, singlestep);
+   signal_setup_done(err, ksig, singlestep);
 }
 
 static int kern_do_signal(struct pt_regs *regs)
 {
-   struct k_sigaction ka_copy;
-   struct siginfo info;
-   int sig, handled_sig = 0;
+   struct ksignal ksig;
+   int handled_sig = 0;
 
-   while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) {
+   while (get_signal(&ksig)) {
handled_sig = 1;
/* Whee!  Actually deliver the signal.  */
-   handle_signal(regs, sig, &ka_copy, &info);
+   handle_signal(&ksig, regs);
}
 
/* Did we come from a system call? */
diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c
index 5e04a1c..79d8245 100644
--- a/arch/x86/um/signal.c
+++ b/arch/x86/um/signal.c
@@ -370,13 +370,12 @@ struct rt_sigframe
char retcode[8];
 };
 
-int setup_signal_stack_sc(unsigned long stack_top, int sig,
- struct k_sigaction *ka, struct pt_regs *regs,
- sigset_t *mask)
+int setup_signal_stack_sc(unsigned long stack_top, struct ksignal *ksig,
+ struct pt_regs *regs, sigset_t *mask)
 {
struct sigframe __user *frame;
void __user *restorer;
-   int err = 0;
+   int err = 0, sig = ksig->sig;
 
/* This is the same calculation as i386 - ((sp + 4) & 15) == 0 */
stack_top = ((stack_top + 4) & -16UL) - 4;
@@ -385,8 +384,8 @@ int setup_signal_stack_sc(unsigned long stack_top, int sig,
return 

Re: [uml-user] [PATCH] uml/net_kern: Eliminate NULL test after alloc_bootmem

2014-07-23 Thread Richard Weinberger
Himangi,

Am 19.07.2014 13:34, schrieb Himangi Saraogi:
> alloc_bootmem and related functions never return NULL. Thus a NULL
> test or memset after calls to these functions is unnecessary.
> 
> The following Coccinelle semantic patch was used for making the change:
> 
> @@
> expression E;
> statement S;
> @@
> 
> E = 
> \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
> ... when != E
> - if (E == NULL) S
> 
> Signed-off-by: Himangi Saraogi 
> Acked-by: Julia Lawall 

Thank you! All three patches are now queued for 3.17.

Thanks,
//richard

> ---
>  arch/um/drivers/net_kern.c | 4 
>  1 file changed, 4 deletions(-)
> 
> diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
> index 7d26d9c..f70dd54 100644
> --- a/arch/um/drivers/net_kern.c
> +++ b/arch/um/drivers/net_kern.c
> @@ -659,10 +659,6 @@ static int __init eth_setup(char *str)
>   }
>  
>   new = alloc_bootmem(sizeof(*new));
> - if (new == NULL) {
> - printk(KERN_ERR "eth_init : alloc_bootmem failed\n");
> - return 1;
> - }
>  
>   INIT_LIST_HEAD(&new->list);
>   new->index = n;
> 

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Is the ARM9-architecture supported by UML?

2014-09-01 Thread Richard Weinberger
On Mon, Sep 1, 2014 at 12:19 AM, Clemens Eisserer  wrote:
> Hi,
>
> I would like to use a current version of debian on my Nokia-770 (linux
> 2.6.16.27) in a chroot-environment, however everything past lenny (5.0,
> unsupported since mid 2012) requires a newer kernel - which can't be easily
> upgraded due to proprietary wlan drivers and other specific patches.
>
> Does user mode linux support the ARM9 architecture with 2.6.16.27 as host?

No, UML works only on x86 and x86_64.

-- 
Thanks,
//richard

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] um: always use the same type for __syscall_stub_start

2014-10-11 Thread Richard Weinberger
Am 11.10.2014 um 13:29 schrieb Nicolas Iooss:
> syscall_stub_start is declared with different types in C files:
> 
>   arch/um/kernel/physmem.c: extern int __syscall_stub_start;
>   arch/um/kernel/skas/mmu.c: extern int __syscall_stub_start;
>   arch/um/os-Linux/skas/mem.c: extern unsigned long __syscall_stub_start;
>   arch/um/os-Linux/skas/process.c: extern int __syscall_stub_start;
> 
> Fix this inconsistency by always using unsigned long.  This does not
> change anything in the compiled code because only the address of
> __syscall_stub_start is used, but it makes the static checker I use
> stop complaining about incompatible declarations.

While we're here, can you put these declarations into a single header file?

Thanks,
//richard

--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] um: always use the same type for __syscall_stub_start

2014-10-11 Thread Richard Weinberger
Am 11.10.2014 um 14:15 schrieb Nicolas Iooss:
> 2014-10-11 13:42 GMT+02:00 Richard Weinberger:
>> Am 11.10.2014 um 13:29 schrieb Nicolas Iooss:
>>> syscall_stub_start is declared with different types in C files:
>>>
>>>   arch/um/kernel/physmem.c: extern int __syscall_stub_start;
>>>   arch/um/kernel/skas/mmu.c: extern int __syscall_stub_start;
>>>   arch/um/os-Linux/skas/mem.c: extern unsigned long __syscall_stub_start;
>>>   arch/um/os-Linux/skas/process.c: extern int __syscall_stub_start;
>>>
>>> Fix this inconsistency by always using unsigned long.  This does not
>>> change anything in the compiled code because only the address of
>>> __syscall_stub_start is used, but it makes the static checker I use
>>> stop complaining about incompatible declarations.
>>
>> While we're here, can you put these declarations into a single header
> file?
> 
> Sure.  Do you have a specific header file in mind or shall I create
> arch/um/include/asm/sections.h with declarations for
> __syscall_stub_start, __syscall_stub_end and __binary_start (used in
> arch/um/kernel/um_arch.c)?

Not really. Maybe you can find a common header for all.
But I fear where is a reason why these declarations are not in a
common header. They are used in the kernel- and userspace part of
UML.
Anyway, please give it a try. :)

Thanks,
//richard

--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] um: Remove unused bp stack-frame pointer

2014-10-18 Thread Richard Weinberger
Am 18.10.2014 um 16:23 schrieb Manfred Schlaegl:
> The pointer to bp stack-frame is no longer used. Removed it.

Good catch!

> This also removes a corresponding compiler-warning.

Which warning exactly?

Thanks,
//richard

--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] um: Remove unused bp stack-frame pointer

2014-10-18 Thread Richard Weinberger
Am 18.10.2014 um 17:12 schrieb Manfred Schlaegl:
> On 2014-10-18 16:42, Richard Weinberger wrote:
>> Am 18.10.2014 um 16:23 schrieb Manfred Schlaegl:
>>> The pointer to bp stack-frame is no longer used. Removed it.
>>
>> Good catch!
> Thank you.
> 
>>
>>> This also removes a corresponding compiler-warning.
>>
>> Which warning exactly?
> 
> On "normal" (defconfig) builds the warning does not show up because 
> CONFIG_FRAME_POINTER is set.
> I've found the unused bp because CONFIG_FRAME_POINTER was not set in my 
> configuration.
> 
>   CC  arch/um/kernel/sysrq.o
> arch/um/kernel/sysrq.c: In function ‘show_stack’:
> arch/um/kernel/sysrq.c:32:29: warning: unused variable ‘bp’ 
> [-Wunused-variable]

Looks like my gcc need's an upgrade. :D

Thanks,
//richard

--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] um: Remove unused bp stack-frame pointer

2014-10-18 Thread Richard Weinberger
Am 18.10.2014 um 17:24 schrieb Manfred Schlaegl:
> On 2014-10-18 17:19, Richard Weinberger wrote:
>> Am 18.10.2014 um 17:12 schrieb Manfred Schlaegl:
>>> On 2014-10-18 16:42, Richard Weinberger wrote:
>>>> Am 18.10.2014 um 16:23 schrieb Manfred Schlaegl:
>>>>> The pointer to bp stack-frame is no longer used. Removed it.
>>>>
>>>> Good catch!
>>> Thank you.
>>>
>>>>
>>>>> This also removes a corresponding compiler-warning.
>>>>
>>>> Which warning exactly?
>>>
>>> On "normal" (defconfig) builds the warning does not show up because 
>>> CONFIG_FRAME_POINTER is set.
>>> I've found the unused bp because CONFIG_FRAME_POINTER was not set in my 
>>> configuration.
>>>
>>>   CC  arch/um/kernel/sysrq.o
>>> arch/um/kernel/sysrq.c: In function ‘show_stack’:
>>> arch/um/kernel/sysrq.c:32:29: warning: unused variable ‘bp’ 
>>> [-Wunused-variable]
>>
>> Looks like my gcc need's an upgrade. :D
>>
>> Thanks,
>> //richard
>>
> 
> I'm using gcc version 4.7.2 (Debian 4.7.2-5). -> not THAT new ;-)

With a cup of coffee applied I managed it to read your mail correctly.
The warning triggers only with CONFIG_FRAME_POINTER=n. Now it makes sense.

Thanks,
//richard

--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Run 2.6 kernel on 2.4 host

2015-02-09 Thread Richard Weinberger
On Sun, Feb 8, 2015 at 7:17 PM, Vladimir "Equidamoid" Shapranov
 wrote:
> Hi,
>
> I need to run some recent software on a legacy server running 2.4.18
> kernel. Sadly it is not possible to rebuild the sotware to run natively
> with that kernel (our code requires boost, boost requires gcc 4.5+,
> gcc4.5+ doesn't like old glibc and recent glibc doesnt build for 2.4
> kernel).
> So I'm trying to run UML 2.6 kernel on 2.4 system. I tried prebuilt
> 2.6.27 kernel from (http://uml.devloop.org.uk/kernels.html) but it
> refused to run on 2.4 ("ERROR: kernel too old"). Next, I tried to build
> it on the Debian Woody VM with gcc 2.95 & 3.4 and glibc 2.2 but got
> dozens of errors.
> Is it possible to build and run 2.6 on 2.4? What environment is
> required? What are the limitations if any?

Hmm, running 2.6/3 on 2.4 would be challenging.
I'd try to use qemu-system-XY.

-- 
Thanks,
//richard

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] start a xterm on con1 fails

2015-02-10 Thread Richard Weinberger
On Tue, Feb 10, 2015 at 3:53 PM, Julien Iguchi-Cartigny
 wrote:
> Hello,
>
> I'm maintaining Netkit-NG, a set of scripts to boot and configure small
> networks using UML machines for teaching purposes.
>
> 
>
> This set of scripts is based on Netkit
>
> 
>
> which was using kernel from Debian Lenny. Starting UML with con1=xterm
> was working at this time. But now, using the same configuration to boot
> Debian Wheezy UML kernel with a xterm on con1 fails.
>
> So far I'm stuck with the following command lines.
>
> This one works (starts a xterm with UML):
>
> xterm -e /home/kartoch/works/netkit/netkit-ng/kernel/netkit-kernel
> modules=/home/kartoch/works/netkit/netkit-ng/kernel/modules name=dummy
> title=dummy umid=dummy mem=36M
> ubd0=/home/kartoch/tmp/tmp/dummy.disk,/home/kartoch/works/netkit/netkit-ng/fs/netkit-fs
> root=98:0 uml_dir=/home/kartoch/.netkit/mconsole hosthome=/home/kartoch
> quiet con0=fd:0,fd:1 con1=null SELINUX_INIT=0
>
> But if I want to start UML with a second xterm on the con1, i.e.
> replacing con1= null by con1=xterm in the commad line, no second xterm
> is started. This was the expected behavior in the original netkit (and
> it worked).
>
> I'm looking for help, especially about how to debug this problem (so far
> no error messages in messages or dmesg in the host or the UML machine)
> and how port-helper works on this case.

Can you find the last working kernel version?
If we know that it worked in version X and was broken in X+1
we can start searching. :)

-- 
Thanks,
//richard

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] start a xterm on con1 fails

2015-02-15 Thread Richard Weinberger
On Thu, Feb 12, 2015 at 9:14 PM, Julien Iguchi-Cartigny
 wrote:
> On 02/10/2015 09:27 PM, Richard Weinberger wrote:
>> On Tue, Feb 10, 2015 at 3:53 PM, Julien Iguchi-Cartigny
>>  wrote:
>>> Hello,
>>>
>>> I'm maintaining Netkit-NG, a set of scripts to boot and configure small
>>> networks using UML machines for teaching purposes.
>>>
>>> <https://netkit-ng.github.io/>
>>>
>>> This set of scripts is based on Netkit
>>>
>>> <http://www.netkit.org/>
>>>
>>> which was using kernel from Debian Lenny. Starting UML with con1=xterm
>>> was working at this time. But now, using the same configuration to boot
>>> Debian Wheezy UML kernel with a xterm on con1 fails.
>>>
>>> So far I'm stuck with the following command lines.
>>>
>>> This one works (starts a xterm with UML):
>>>
>>> xterm -e /home/kartoch/works/netkit/netkit-ng/kernel/netkit-kernel
>>> modules=/home/kartoch/works/netkit/netkit-ng/kernel/modules name=dummy
>>> title=dummy umid=dummy mem=36M
>>> ubd0=/home/kartoch/tmp/tmp/dummy.disk,/home/kartoch/works/netkit/netkit-ng/fs/netkit-fs
>>> root=98:0 uml_dir=/home/kartoch/.netkit/mconsole hosthome=/home/kartoch
>>> quiet con0=fd:0,fd:1 con1=null SELINUX_INIT=0
>>>
>>> But if I want to start UML with a second xterm on the con1, i.e.
>>> replacing con1= null by con1=xterm in the commad line, no second xterm
>>> is started. This was the expected behavior in the original netkit (and
>>> it worked).
>>>
>>> I'm looking for help, especially about how to debug this problem (so far
>>> no error messages in messages or dmesg in the host or the UML machine)
>>> and how port-helper works on this case.
>>
>> Can you find the last working kernel version?
>> If we know that it worked in version X and was broken in X+1
>> we can start searching. :)
>>
>
> Hello,
>
> thank you for your feedback.
>
> At the present time I've only the "official" kernel from debian. So I've
> a working instance based on Lenny and a not-working one on Wheezy.
> testing by dichotomy every kernel between these two will require a lot
> of time. Is there any standard UML testbed to fastly evaluate it ?

You can build UML by your own. Pick a kernel and run:
make defconfig ARCH=um
make menuconfig ARCH=um
make linux ARCH=um

I tried Linus' tree today, having multiple xterms worked fine.
So, I'm not sure what the real issue is.

-- 
Thanks,
//richard

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH 1/2] mm: Introducing arch_remap hook

2015-03-21 Thread Richard Weinberger
Am 20.03.2015 um 16:53 schrieb Laurent Dufour:
> Some architecture would like to be triggered when a memory area is moved
> through the mremap system call.
> 
> This patch is introducing a new arch_remap mm hook which is placed in the
> path of mremap, and is called before the old area is unmapped (and the
> arch_unmap hook is called).
> 
> To no break the build, this patch adds the empty hook definition to the
> architectures that were not using the generic hook's definition.

Just wanted to point out that I like that new hook as UserModeLinux can benefit 
from it.
UML has the concept of stub pages where the UML host process can inject 
commands to guest processes.
Currently we play nasty games in the TLB code to make all this work.
arch_unmap() could make this stuff more clear and less error prone.

Thanks,
//richard

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] UML for mips

2015-05-13 Thread Richard Weinberger
On Mon, Apr 13, 2015 at 8:42 AM, kobabo kobabo  wrote:
> Hi,
>
> Is it possible to run UML on mips architecture?

No. So far UML was only ported to Linux/x86.

-- 
Thanks,
//richard

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] um: kernel: ksyms: Export symbol syscall() for fixing modpost issue

2015-05-31 Thread Richard Weinberger
Am 04.10.2014 um 15:11 schrieb Chen Gang:
> syscall() is implemented in libc.so/a (e.g. for glibc, in "syscall.o"),
> so for normal ".o" files, it is undefined, neither can be found within
> kernel wide, so will break modpost.
> 
> Since ".o" files is OK, can simply export 'syscall' symbol, let modpost
> know about that, then can fix this issue.
> 
> The related error (with allmodconfig under um):
> 
> MODPOST 1205 modules
>   ERROR: "syscall" [fs/hostfs/hostfs.ko] undefined!
> 
> Signed-off-by: Chen Gang 
> ---
>  arch/um/kernel/ksyms.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c
> index 543c047..e7780f3 100644
> --- a/arch/um/kernel/ksyms.c
> +++ b/arch/um/kernel/ksyms.c
> @@ -42,3 +42,6 @@ EXPORT_SYMBOL(os_makedev);
>  EXPORT_SYMBOL(add_sigio_fd);
>  EXPORT_SYMBOL(ignore_sigio_fd);
>  EXPORT_SYMBOL(sigio_broken);
> +
> +extern long int syscall (long int __sysno, ...);
> +EXPORT_SYMBOL(syscall);

Thanks Chen, applied to my 4.2 queue!

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH 3/3] um/os-Linux: Use char[] for syscall_stub declarations

2015-05-31 Thread Richard Weinberger
Am 12.10.2014 um 13:02 schrieb Nicolas Iooss:
> When declaring __syscall_stub_start, use the same type in UML userspace
> code as in arch/um/include/asm/sections.h.
> 
> While at it, also declare batch_syscall_stub as char[].
> 
> Signed-off-by: Nicolas Iooss 
> ---
>  arch/um/os-Linux/skas/mem.c |  6 +++---
>  arch/um/os-Linux/skas/process.c | 11 +--
>  2 files changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c
> index 689b18db798f..abb02becca80 100644
> --- a/arch/um/os-Linux/skas/mem.c
> +++ b/arch/um/os-Linux/skas/mem.c
> @@ -19,7 +19,7 @@
>  #include 
>  #include 
>  
> -extern unsigned long batch_syscall_stub, __syscall_stub_start;
> +extern char batch_syscall_stub[], __syscall_stub_start[];
>  
>  extern void wait_stub_done(int pid);
>  
> @@ -39,8 +39,8 @@ static int __init init_syscall_regs(void)
>  {
>   get_safe_registers(syscall_regs, NULL);
>   syscall_regs[REGS_IP_INDEX] = STUB_CODE +
> - ((unsigned long) &batch_syscall_stub -
> -  (unsigned long) &__syscall_stub_start);
> + ((unsigned long) batch_syscall_stub -
> +  (unsigned long) __syscall_stub_start);
>   return 0;
>  }
>  
> diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
> index 908579f2b0ab..fa934d0c8932 100644
> --- a/arch/um/os-Linux/skas/process.c
> +++ b/arch/um/os-Linux/skas/process.c
> @@ -193,7 +193,7 @@ static void handle_trap(int pid, struct uml_pt_regs *regs,
>   handle_syscall(regs);
>  }
>  
> -extern int __syscall_stub_start;
> +extern char __syscall_stub_start[];
>  
>  static int userspace_tramp(void *stack)
>  {
> @@ -218,7 +218,7 @@ static int userspace_tramp(void *stack)
>*/
>   int fd;
>   unsigned long long offset;
> - fd = phys_mapping(to_phys(&__syscall_stub_start), &offset);
> + fd = phys_mapping(to_phys(__syscall_stub_start), &offset);
>   addr = mmap64((void *) STUB_CODE, UM_KERN_PAGE_SIZE,
> PROT_EXEC, MAP_FIXED | MAP_PRIVATE, fd, offset);
>   if (addr == MAP_FAILED) {
> @@ -245,7 +245,7 @@ static int userspace_tramp(void *stack)
>  
>   unsigned long v = STUB_CODE +
> (unsigned long) stub_segv_handler -
> -   (unsigned long) &__syscall_stub_start;
> +   (unsigned long) __syscall_stub_start;
>  
>   set_sigstack((void *) STUB_DATA, UM_KERN_PAGE_SIZE);
>   sigemptyset(&sa.sa_mask);
> @@ -474,7 +474,7 @@ static int __init init_thread_regs(void)
>   /* Set parent's instruction pointer to start of clone-stub */
>   thread_regs[REGS_IP_INDEX] = STUB_CODE +
>   (unsigned long) stub_clone_handler -
> - (unsigned long) &__syscall_stub_start;
> + (unsigned long) __syscall_stub_start;
>   thread_regs[REGS_SP_INDEX] = STUB_DATA + UM_KERN_PAGE_SIZE -
>   sizeof(void *);
>  #ifdef __SIGNAL_FRAMESIZE
> @@ -582,8 +582,7 @@ int map_stub_pages(int fd, unsigned long code, unsigned 
> long data,
>   struct proc_mm_op mmop;
>   int n;
>   unsigned long long code_offset;
> - int code_fd = phys_mapping(to_phys((void *) &__syscall_stub_start),
> -&code_offset);
> + int code_fd = phys_mapping(to_phys(__syscall_stub_start), &code_offset);
>  
>   mmop = ((struct proc_mm_op) { .op= MM_MMAP,
> .u =

Thank you Nicoals, all three patches are now in my 4.2 queue!
Special thanks to Thomas Meyer for exhuming this patches. :-)

Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH] um: Fix a build error

2015-06-15 Thread Richard Weinberger
Am 15.06.2015 um 16:43 schrieb Firo Yang:
> Gcc5 failed to build uml.
> Update codes to test __GNUC__ with 5 will be happier.
> 
> Signed-off-by: Firo Yang 

The issue got already addressed by patches:
[PATCH 2/5] um: Stop abusing __KERNEL__
[PATCH 3/5] um: Remove copy&paste code from init.h

They will appear soon in Linus' tree.

Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] BTRFS : starting an uml using BTRFS gives

2015-06-15 Thread Richard Weinberger
On Sun, May 31, 2015 at 7:13 PM, Toralf Förster  wrote:
> I don't get it in moment, at a 64 bit Gentoo Linux (host is Linux t44 
> 4.0.4-hardened-r3) I get :
>
>
> $ /home/tfoerste/devel/linux/linux earlyprintk ubda=t44uml 
> ubdb=/mnt/ramdisk/t44uml_swap 
> eth0=tuntap,tap0,72:ef:3d:b6:67:0c,192.168.1.254 mem=2000M con0=fd:0,fd:1 
> con=pts umid=uml_t44uml softlockup_all_cpu_backtrace=1
> Core dump limits :
> soft - 0
> hard - NONE
> Checking that ptrace can change system call numbers...OK
> Checking syscall emulation patch for ptrace...OK
> Checking advanced syscall emulation patch for ptrace...OK
> Checking environment variables for a tempdir...none found
> Checking if /dev/shm is on tmpfs...OK
> Checking PROT_EXEC mmap in /dev/shm...OK
> bootconsole [earlycon0] enabled
> PID hash table entries: 4096 (order: 3, 32768 bytes)
> Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
> Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
> Memory: 2009296K/2048000K available (3008K kernel code, 673K rwdata, 892K 
> rodata, 113K init, 173K bss, 38704K reserved, 0K cma-reserved)
> NR_IRQS:15
> clocksource itimer: mask: 0x max_cycles: 0x1d854df40, 
> max_idle_ns: 3526361616960 ns
> Calibrating delay loop... 5746.68 BogoMIPS (lpj=28733440)
> pid_max: default: 32768 minimum: 301
> Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
> Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
> Initializing cgroup subsys blkio
> Initializing cgroup subsys devices
> Initializing cgroup subsys freezer
> Checking that host ptys support output SIGIO...Yes
> Checking that host ptys support SIGIO on close...No, enabling workaround
> devtmpfs: initialized
> Using 2.6 host AIO
> clocksource jiffies: mask: 0x max_cycles: 0x, max_idle_ns: 
> 1911260446275 ns
> xor: measuring software checksum speed
>8regs : 20528.400 MB/sec
>8regs_prefetch: 17211.600 MB/sec
>32regs: 19893.600 MB/sec
>32regs_prefetch: 16321.600 MB/sec
> xor: using function: 8regs (20528.400 MB/sec)
> NET: Registered protocol family 16
> raid6: int64x1  gen()  3012 MB/s
> raid6: int64x1  xor()  1664 MB/s
> raid6: int64x2  gen()  3137 MB/s
> raid6: int64x2  xor()  2110 MB/s
> raid6: int64x4  gen()  2882 MB/s
> raid6: int64x4  xor()  1801 MB/s
> raid6: int64x8  gen()  2464 MB/s
> raid6: int64x8  xor()  1423 MB/s
> raid6: using algorithm int64x2 gen() 3137 MB/s
> raid6:  xor() 2110 MB/s, rmw enabled
> raid6: using intx1 recovery algorithm
> Switched to clocksource itimer
> NET: Registered protocol family 2
> TCP established hash table entries: 16384 (order: 5, 131072 bytes)
> TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
> TCP: Hash tables configured (established 16384 bind 16384)
> UDP hash table entries: 1024 (order: 3, 32768 bytes)
> UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
> NET: Registered protocol family 1
> console [stderr0] disabled
> mconsole (version 2) initialized on /home/tfoerste/.uml/uml_t44uml/mconsole
> Checking host MADV_REMOVE support...OK
> futex hash table entries: 256 (order: 0, 6144 bytes)
> VFS: Disk quotas dquot_6.6.0
> VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
> io scheduler noop registered
> io scheduler deadline registered (default)
> NET: Registered protocol family 17
> Initialized stdio console driver
> Console initialized on /dev/tty0
> console [tty0] enabled
> console [tty0] enabled
>   bootconsole [earlycon0] disabled
> bootconsole [earlycon0] disabled
> Initializing software serial port version 1
> console [mc-1] enabled
> Failed to initialize ubd device 1 :Couldn't determine size of device's file
> Netdevice 0 (72:ef:3d:b6:67:0c) :
> TUN/TAP backend - IP = 192.168.1.254
> Btrfs loaded
> BTRFS: device fsid 3342a6f8-d944-44df-bffb-f64ac9f0bdc8 devid 1 transid 51 
> /dev/root
> BTRFS info (device ubda): disk space caching is enabled
> BTRFS: has skinny extents
> VFS: Mounted root (btrfs filesystem) readonly on device 0:13.
> devtmpfs: mounted
>
> Modules linked in:
> Pid: 1, comm: swapper Not tainted 4.1.0-rc5-00161-gaaa20fc
> RIP: 0033:[<602a150d>]
> RSP: 032dff262ef8  EFLAGS: 00010212
> RAX: 602a14f9 RBX: 60706da8 RCX: 032dfeb94f19
> RDX: 60286650 RSI: 032dff263fe8 RDI: dcede000
> RBP: 032dff263fe8 R08:  R09: 
> R10: dc81fbd0 R11: 0246 R12: dcede000
> R13: 032dff263000 R14: 60286b60 R15: 603277f8
> Kernel panic - not syncing: Segfault with no mm
> CPU: 0 PID: 1 Comm: swapper Not tainted 4.1.0-rc5-00161-gaaa20fc #2
> Stack:
>
> Modules linked in:
> Pid: 1, comm: swapper Not tainted 4.1.0-rc5-00161-gaaa20fc
> RIP: 0033:[<602898cc>]
> RSP: 60665450  EFLAGS: 00010202
> RAX: 0006 RBX: 6057088f RCX: 60706da8

Re: [uml-user] Why it doesn't work on Ubuntu 14.04?

2015-06-21 Thread Richard Weinberger
On Sun, Jun 21, 2015 at 4:21 AM, Balaco Baco  wrote:
> I'm remotely accessing an Ubuntu 14.04.2 machine. And now I'm trying to
> run an UML in it, but it is always giving me some errors, and it
> finishes with segfaults or coredumps.
>
> For example, the end of output is:
>
> =
> request_module: runaway loop modprobe binfmt-464c
> Starting init: /sbin/init exists but couldn't execute it (error -8)

8 is ENOEXEC.
Are you trying to use a 64bit userspace with a 32bit kernel?

> Starting init: /etc/init exists but couldn't execute it (error -13)
> request_module: runaway loop modprobe binfmt-464c
> Starting init: /bin/sh exists but couldn't execute it (error -8)
> Kernel panic - not syncing: No working init found.  Try passing init=
> option to kernel. See Linux Documentation/init.txt for guidance.
> CPU: 0 PID: 1 Comm: swapper Not tainted 3.13.11-ckt20 #1
> Stack:
>  69037e90 602e26cd 60260fa9 
>  69037e90 601b0c71 60260fa9 
>  60260fa9  69037ea0 60263274
> Call Trace:
>  [<60260fa9>] ? printk+0x0/0xa0
>  [<601b0c71>] ? bust_spinlocks+0x0/0x4f
>  [<60260fa9>] ? printk+0x0/0xa0
>  [<60260fa9>] ? printk+0x0/0xa0
>  [<60263274>] dump_stack+0x2a/0x2c
>  [<6026071d>] panic+0x141/0x290
>  [<602605dc>] ? panic+0x0/0x290
>  [<600b7e82>] ? copy_strings+0x0/0x2b9
>  [<600b93ec>] ? do_execve+0x53c/0x5a7
>  [<600185ed>] ? try_to_run_init_process+0x0/0x66
>  [<600185ed>] ? try_to_run_init_process+0x0/0x66
>  [<6025ff3b>] kernel_init+0x17e/0x184
>  [<60019c86>] new_thread_handler+0x81/0xa3
>
> Aborted (core dumped)
> =
>
> I get the same error with the 32bit kernel, the 64 bit kernel and with a
> kernel I compiled from source. The "init=" option didn't help either. I
> don't know what else I should do.

Is the error really *exactly* the same when you build a 64bit UML?

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Why it doesn't work on Ubuntu 14.04?

2015-06-24 Thread Richard Weinberger
On Tue, Jun 23, 2015 at 1:41 PM, Balaco Baco  wrote:
> Before, I tried with 32b and 64b downloaded kernels. Both gave the same
> error. I have even compiled the kernel, imagining some weird problems of
> config or the lastest Ubuntu "tricks an and trouble" I have been seeing
> for some time! No solution. The problem was in the images itself,
> probably for same kind of reason.
>
> Couldn't we make this have a more meaninful error message? Like what
> you've said, that would make the problem clear to me. Coredump/segfaults
> and such are not really helpful.

At first please show me both outputs of the 64bit and 32bit kernel.

-- 
Thanks,
//richard

--
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] per-instance tmpfs backed memory file

2015-08-15 Thread Richard Weinberger
On Fri, Aug 14, 2015 at 8:35 PM, Jon Foster
 wrote:
> I'm kind of new to the UML thing. I've read that every instance of UML
> creates a temp file that represents the RAM of that instance. Its
> obvious that putting that in a "tmpfs" would be very good, but I don't
> want to mount a tmpfs on "/tmp", its used by too many other things and
> the size restriction would cause problems.
>
> I've read a "per-instance" tmpfs can be setup... but nowhere have I seen
> how that's done. There doesn't appear to be any CLI switches for telling
> UML where to put the temp file and $TMPDIR doesn't seem to do anything
> for it.
>
> I'm running stock Debian 7 64bit on Intel Xeons, with their supplied UML
> packages. The UML kernel version is 3.2.54.
>
> How can I tell UML to put its temp file somewhere else?

UML checks the environment variables TMP, TEMP and TEMPDIR.
Recent UML kernels use /dev/shm.

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] UML randomly hanging

2015-08-15 Thread Richard Weinberger
On Fri, Aug 14, 2015 at 8:25 PM, Jon Foster
 wrote:
> I'm using a stock Debian 7 AMD-64 SMP install on a 8 core Intel Xeon
> server, with 24GB of RAM. I'm using Debian's supplied UML kernel and
> tools. "uname -a", from within the UML returns: "Linux lamp1 3.2.54 #2
> Thu Feb 6 22:33:28 UTC 2014 x86_64 GNU/Linux". Using a command like:
>
> linux.uml "umid=$MACHNAME" con0=null,fd:2 con1=fd:0,fd:1 \
>  con=null ssl=null "mem=4096m" "eth0=tuntap,tap0" \
>  hostfs=/var/local/umlhostfs "ubd0=$ROOT" "ubd1=$SWAP"
>
> Obviosuly the environment variables are filled with appropriate values.
>
> I'm running a Debian 5 LAMP stack inside the UML. "/tmp" is a regular
> disk backed filesystem. It runs ok if its not doing anything. But even
> then from time to time you'll get a second or two pause. If it gets  a
> modest amount of traffic it will hang for a few minutes, and things just
> get worse and worse from there.
>
> While its idle I've seen "hrtimer" warnings with 9 or 10 digit
> nanosecond counts. I think this is at the heart of my problem.
>
> Anybody have any advice?

Can you please give a more recent kernel a try?
3.2. is really old.

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] 64-bit UML with 32-bit root

2015-09-12 Thread Richard Weinberger
On Tue, Sep 1, 2015 at 8:32 AM, Antoine Martin  wrote:
> On 27/08/15 20:14, Mark Morgan Lloyd wrote:
>> The (unofficial?) FAQ at http://uml.devloop.org.uk/faq.html implies that
>> it is possible to build UML on a 64-bit system to run a 32-bit guest.
> You can build a 32-bit *kernel* from a 64-bit host.
>> The best that I can manage on e.g. Debian "Jessie" x86-64 is to use
>> make ARCH=um SUBARCH=i386  which results in a 32-bit ELF to presumably
>> run a 32-bit guest. Prerequisites appear to be the multiarch-support
>>   and gcc-multiarch packages.
>>
>> Is it possible to build UML as a 64-bit binary, but to run a 32-bit
>> guest?
> AFAIK, no.
>>  What I'd like to be able to do is to put it on a system which has
>> no multiarch stuff, i.e. to completely sequester the 32-bit libraries
>> etc. within the guest filesystem.
>>
>> [Background: I used UML fairly heavily in the 2.4 era, but I'm a
>> comparative newcomer to x86-64. I'm trying to avoid overuse of
>> multi-arch stuff.]
> AFAIK, there is no multiarch support in in the UML *kernel*.

Yes. 64bit UML has no ia32 emulation like x86_64 has.

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Creating Wheezy filesystem from scratch

2015-10-09 Thread Richard Weinberger
On Fri, Oct 9, 2015 at 5:11 PM, Ricardo Nunes
 wrote:
> I'm trying to create a Debian Wheezy filesystem to use in User Mode Linux.
> right now I'm following this tutorial. The commands after # Remove the other
> terminal events don't work here and I can't find the equivalent operations
> in Wheezy.
>
> When I try to boot all of the system gets frozen and ends up with this (full
> log here):
>
> INIT: Entering runlevel: 2
>
> [[36minfo[39;49m] Using makefile-style concurrent boot in runlevel 2.
> [   12.69] Virtual console 5 assigned device '/dev/pts/12'
> [   12.69] Virtual console 6 assigned device '/dev/pts/19'
> [   12.69] Virtual console 4 assigned device '/dev/pts/20'
> [   12.69] Virtual console 3 assigned device '/dev/pts/26'
> [   12.69] Virtual console 2 assigned device '/dev/pts/27'
> [   12.69] Virtual console 1 assigned device '/dev/pts/28'
>
> I would use a already prepared filesystem, or even rootstrap, but both of
> them forces me to have internet inside the UML machine and, for security
> reasons in this environment, I cannot create bridges to my own network.
>
> Do you know how can I pass this until I get a login message?

Assign a getty to /dev/tty0.
Your debian spawned 6 gettys on serial devices, try "screen /dev/pts/28".

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] UML <-> host communication

2015-10-12 Thread Richard Weinberger
On Mon, Oct 12, 2015 at 6:21 PM, Ricardo Nunes
 wrote:
> Right now I'm just finding for a way to make it work, so slow communications
> will also be acceptable for now. This is for device emulation, so a lot of
> memory reads and writes. Better slower then non existent.
>
> If I use a tuntap, a socket or something like that, what API can I use to
> communicate straight from the kernel to the host?
>
> I just tried to implement netpoll sockets, but it doesn't seem to be
> supported inside UML.

What is missing?

Anyway, you can create a debugfs file within UML which opens a fd on
the host side and wrapps
this fd into a file visible to UML guest processes.

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] IRQ support?

2015-10-22 Thread Richard Weinberger
Hi!

CC'ing -devel list.

On Thu, Oct 22, 2015 at 1:29 PM, Ricardo Nunes
 wrote:
> I'm trying to use a real hardware driver inside UML and I,ve come to the IRQ
> suppor part.

How do you map the hardware into UML?

> Right now it's failing on request_irq call, so my question is if there is
> any manual on how to support this method calls in UML or if it's supposed to
> work as it is.
>
> I need to register IRQs and raise them. After a few searches I saw SIGIO
> module and everything, but it didn't help enough.

UML is using SIGIO for interrupts.

> What's the best way to support this?

Well, it depends how you map the hardware.
Maybe you can use vfio.

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Any reason for a kernel thread not run after calling schedule()?

2015-10-28 Thread Richard Weinberger
On Wed, Oct 28, 2015 at 5:36 PM, Ricardo Nunes
 wrote:
> Hi,
>
> I'm making a UML driver to adapt a real driver to UML and hardware
> emulation.
>
> In this case I have a kernel thread trying to read a register, which is now
> done through a netlink channel to a userspace application (asynchronous
> response) but inside a synchronous function (the function that I'm
> implementing returns the register value). The first attempt was done doing:
>
> Kernel thread
>
> sleeping_task = current;
> set_current_state(TASK_INTERRUPTIBLE);
> schedule();
>
> Netlink new message callback
>
> wake_up_process(sleeping_task);
>
> But the kernel thread never runs again, unless I call schedule() in netlink
> callback function after wake_up_process, which will make that callback being
> blocked. I also tried using wait_queue but after the same result I saw the
> functions and realised that they also use schedule for putting the process
> to sleep.
>
> This worked in a "real" linux module (not with netlink callback, but between
> 2 kernel threads), I don't understand why shouldn't in UML. Any reason you
> might remember?

Can you please share your code?

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH v2] um: net: replace GFP_KERNEL with GFP_ATOMIC when spinlock is held

2015-10-29 Thread Richard Weinberger
Am 29.10.2015 um 08:27 schrieb Saurabh Sengar:
> replace GFP_KERNEL with GFP_ATOMIC while spinlock is held,
> as code while holding a spinlock should be atomic.
> GFP_KERNEL may sleep and can cause deadlock,
> where as GFP_ATOMIC may fail but certainly avoids deadlock

As UML does not support SMP nor PREEMPT this is a non issue,
spinlocks are a NOP.
But for the sake of completeness you are right, the code needs
fixing.

> Signed-off-by: Saurabh Sengar 
> ---
> v2: correcting the subject
> 
>  arch/um/drivers/net_kern.c | 31 +++
>  1 file changed, 23 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
> index f70dd54..7d4b709 100644
> --- a/arch/um/drivers/net_kern.c
> +++ b/arch/um/drivers/net_kern.c
> @@ -388,16 +388,22 @@ static const struct net_device_ops uml_netdev_ops = {
>  static int driver_registered;
>  
>  static void eth_configure(int n, void *init, char *mac,
> -   struct transport *transport)
> +   struct transport *transport, bool atomic)

Why do you need this atomic variable? Can't you just pass gfp_mask around?

Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Possible ways to execute

2015-10-29 Thread Richard Weinberger
On Thu, Oct 29, 2015 at 12:28 PM, Balaco Baco  wrote:
> A few weeks ago, after more struggling than I expected, I was abble to
> run UML. I recompiled the linux kernel from source; I did not use the
> root fs files available in the website, and found a Debian that seems to
> suit my needs.
>
> But yesterday I tried to execute it again, it did not work. The fact
> that yesterday I tried it through SSH makes a difference?
>
> Most of the command lines I had in my Bash history (long enough to have
> almost everything I did in the previous session with this problem). None
> of them worked. Most of them just seg fault in the beginning of
> execution. Error related to root fs (surprise for me!). Just two of the
> commands I tried did not seg fault immediatelly; but they also give no
> output, and I had to start another SSH session, at the same time, to be
> able to kill it (since ctrl+c and any other keyboard shortcuts) would be
> "processed" my uml. I'm not sure what to do now.
>
> This command line I executed right now:
>
> ./linux-2.6.24-x86_64 ubda=Debian-Wheezy-x86-root_fs  mem=128M

You cannot use i386 userspace on a x86_64 kernel.

> Execute in the folder where the root fs file exists, gives ONLY this
> output (almost immediatelly). It is through SSH. Is there a problem
> here? I expected an user/password "screen" or anything similar.
>
> The whole output I have for the above command, and I will let it waiting
> for several minutes, is:
>
> ===
> Core dump limits :
> soft - 0
> hard - NONE
> Checking that ptrace can change system call numbers...OK
> Checking syscall emulation patch for ptrace...OK
> Checking advanced syscall emulation patch for ptrace...OK
> Checking for tmpfs mount on /dev/shm...nothing mounted on /dev/shm
> Checking PROT_EXEC mmap in /tmp/...OK
> Checking for new_mm and switch_mm support in the host:
> /proc/self/mm ... Failed -
> No such file or directory
> Checking for the skas3 patch in the host:
>   - /proc/mm...not found: No such file or directory
>   - PTRACE_FAULTINFO...not found
>   - PTRACE_LDT...not found
> UML running in SKAS0 mode
> Adding 29876224 bytes to physical memory to account for exec-shield gap
> Linux version 2.6.24-g91525300-dirty (jd...@amd64.user-mode-linux.org)
> (gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)) #1 Mon Jan 28 12:03:41
> EST 2008
> Built 1 zonelists in Zone order, mobility grouping on.  Total pages:
> 39515
> Kernel command line: ubda=Debian-Wheezy-x86-root_fs mem=128M root=98:0
> PID hash table entries: 1024 (order: 10, 8192 bytes)
> Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
> Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
> Memory: 122164k available
> Mount-cache hash table entries: 256
> Checking that host ptys support output SIGIO...Yes
> Checking that host ptys support SIGIO on close...No, enabling workaround
> net_namespace: 120 bytes
> Using 2.6 host AIO
> NET: Registered protocol family 16
> NET: Registered protocol family 2
> Time: itimer clocksource has been installed.
> IP route cache hash table entries: 2048 (order: 2, 16384 bytes)
> TCP established hash table entries: 8192 (order: 5, 131072 bytes)
> TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
> TCP: Hash tables configured (established 8192 bind 8192)
> TCP reno registered
> Checking host MADV_REMOVE support...OK
> mconsole (version 2) initialized on
> /home/folder/path/.uml/1DZd7v/mconsole
> ((! the above line was manually changed for this message; and the
> working folder is a subfolder in my home folder !))
> VFS: Disk quotas dquot_6.5.1
> Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
> io scheduler noop registered
> io scheduler anticipatory registered (default)
> io scheduler deadline registered
> io scheduler cfq registered
> TCP cubic registered
> NET: Registered protocol family 1
> NET: Registered protocol family 17
> Initialized stdio console driver
> Console initialized on /dev/tty0
> console [tty0] enabled
> Initializing software serial port version 1
> console [mc-1] enabled
>  ubda: unknown partition table
> kjournald starting.  Commit interval 5 seconds
> EXT3-fs: mounted filesystem with ordered data mode.
> VFS: Mounted root (ext3 filesystem) readonly.
> request_module: runaway loop modprobe binfmt-464c
> request_module: runaway loop modprobe binfmt-464c
> request_module: runaway loop modprobe binfmt-464c
> request_module: runaway loop modprobe binfmt-464c
> request_module: runaway loop modprobe binfmt-464c
>
> ===
>
> What do you suggest to try?
>
> --
>   Balaco
>
>
> --
> http://www.fastmail.com - A fast, anti-spam email service.
>
>
> --
> ___
> User-mode-linux-user mailing list
> User-mode-linux-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux

Re: [uml-user] Possible ways to execute

2015-10-29 Thread Richard Weinberger
Am 29.10.2015 um 14:14 schrieb Balaco Baco:
> Really!? I wish I had read that somewhere. Well, just retried with
> another option that is there for me. It is one of the cases I detailed
> before that end with error.
> 
> The full execution, right now, is:
> 
> ==
> $./linux-2.6.24-x86_64 ubda=Debian-Wheezy-AMD64-root_fs mem=128M

Linux 2.6.24?! SRSLY?

Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Possible ways to execute

2015-10-29 Thread Richard Weinberger
On Thu, Oct 29, 2015 at 2:21 PM, Balaco Baco  wrote:
>
> On Thu, Oct 29, 2015, at 10:18, Richard Weinberger wrote:
>> Am 29.10.2015 um 14:14 schrieb Balaco Baco:
>> > Really!? I wish I had read that somewhere. Well, just retried with
>> > another option that is there for me. It is one of the cases I detailed
>> > before that end with error.
>> >
>> > The full execution, right now, is:
>> >
>> > ==
>> > $./linux-2.6.24-x86_64 ubda=Debian-Wheezy-AMD64-root_fs mem=128M
>>
>> Linux 2.6.24?! SRSLY?

If you want me to help, please use a recent/supported kernel.
Ready-to-use root filesystems can be found everywhere.
For example: http://fs.devloop.org.uk/

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH v3] um: net: replace GFP_KERNEL with GFP_ATOMIC when spinlock is held

2015-10-29 Thread Richard Weinberger
Am 29.10.2015 um 15:50 schrieb Joe Perches:
> On Thu, 2015-10-29 at 14:46 +0530, Saurabh Sengar wrote:
>> replace GFP_KERNEL with GFP_ATOMIC while spinlock is held,
>> as code while holding a spinlock should be atomic.
>> GFP_KERNEL may sleep and can cause deadlock,
>> where as GFP_ATOMIC may fail but certainly avoids deadlock
>>
>> Signed-off-by: Saurabh Sengar 
>> ---
>> v3: removed the atomic variable, as per Richard comment
> 
> Trivia: You could remove the gfp_mask variables too
>   and just use GFP_KERNEL and GFP_ATOMIC directly.

Yep.
And "int gfp_mask" does also not make sense, GFP_* is of type
gfp_t.

Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Possible ways to execute

2015-10-29 Thread Richard Weinberger
On Thu, Oct 29, 2015 at 4:26 PM, Balaco Baco  wrote:
> What is your definition of recent and your definition of supported? This
> may be useful for many other users of UML I guess. The fact that the
> kernels offered in the UML website didn't work, and then I tried to
> compile from source should be pointed here. I don't think I have done
> something so weird or uncommon here - mainly because I don't need much
> as long as I have flexibility to execute it.

Everything that gets -stable updates.

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Website is in need of many small changes and updates?

2015-10-29 Thread Richard Weinberger
On Thu, Oct 29, 2015 at 8:46 PM, Balaco Baco  wrote:
>> > > >> > Really!? I wish I had read that somewhere. Well, just retried with
>> > > >> > another option that is there for me. It is one of the cases I 
>> > > >> > detailed
>> > > >> > before that end with error.
>> > > >> >
>> > > >>
>> > > >> Linux 2.6.24?! SRSLY?
>> > >
>> > > If you want me to help, please use a recent/supported kernel.
>> > > Ready-to-use root filesystems can be found everywhere.
>> > > For example: http://fs.devloop.org.uk/
>> > >
>> >
>> > I'm not sure now, but the two Debian root fs I'm using were downloaded
>> > from the site you point here. Later I'll check their sums, and PS this
>> > in a next message. Kernels 2.6.* were recent and assumed to be supported
>> > in most places I could need - or so I assumed.
>>
>> > What is your definition of recent and your definition of supported? This
>> > may be useful for many other users of UML I guess. The fact that the
>> > kernels offered in the UML website didn't work, and then I tried to
>> > compile from source should be pointed here. I don't think I have done
>> > something so weird or uncommon here - mainly because I don't need much
>> > as long as I have flexibility to execute it.
>>
>> Everything that gets -stable updates.
>
> Website: UML's, http://user-mode-linux.sourceforge.net/, accessed right
> now.
>
> "Getting started" seemed like a good place for me a few weeks ago (and
> still does, but...). And I think it will make many users feel and think
> the same way I did. Except that it gives us wrong directions - but gives
> bad directions for users that will surely follow them without knowing
> the wrong details since they're expecting to see something working to
> get more familiar with UML. "Download THIS ( pointing to
> http://user-mode-linux.sourceforge.net/linux-2.6.24-rc7.bz2) or THIS
> (pointing to
> http://user-mode-linux.sourceforge.net/linux-2.6.24-x86_64.bz2 )". Are
> these kernel versions familiar to you in the list? They are for me, now
> I just understood a few more details, and the possible path to solution,
> to execution without unexpected problems - or so I hope.
>
> The thread I started today, quickly skimmed in the above quotes, shows
> this. The website needs to be fixed. And more than that, needs to be
> updated more frequently (or so I must guess) or write about how users
> can be sure their setup is good enough.
>
> I downloaded both suggested kernels, following the official (and assumed
> best, for that) instructions. Both did not work (and still don't). And
> the one that worked back then is probably needing something I've
> forgotten in these days or stopped to work today. But that one I
> compiled from source - and now I need to do it again, from the very
> start.
>
> Everything that gets stable updates... but this should not exclude the
> UML website, right?

The website is very old and from the pre-mainline time.
If you volunteer to update and maintain it it would be wonderful.

I'm not a web designer nor do I have the time for this.

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Website is in need of many small changes and updates?

2015-10-30 Thread Richard Weinberger
On Fri, Oct 30, 2015 at 7:29 AM, Balaco Baco  wrote:
>
> On Thu, Oct 29, 2015, at 16:55, Richard Weinberger wrote:
>> On Thu, Oct 29, 2015 at 8:46 PM, Balaco Baco  wrote:
>> >> > > >> > Really!? I wish I had read that somewhere. Well, just retried 
>> >> > > >> > with
>> >> > > >> > another option that is there for me. It is one of the cases I 
>> >> > > >> > detailed
>> >> > > >> > before that end with error.
>> >> > > >> >
>> >> > > >>
>> >> > > >> Linux 2.6.24?! SRSLY?
>> >> > >
>> >> > > If you want me to help, please use a recent/supported kernel.
>> >> > > Ready-to-use root filesystems can be found everywhere.
>> >> > > For example: http://fs.devloop.org.uk/
>> >> > >
>> >> >
>> >> > I'm not sure now, but the two Debian root fs I'm using were downloaded
>> >> > from the site you point here. Later I'll check their sums, and PS this
>> >> > in a next message. Kernels 2.6.* were recent and assumed to be supported
>> >> > in most places I could need - or so I assumed.
>> >>
>> >> > What is your definition of recent and your definition of supported? This
>> >> > may be useful for many other users of UML I guess. The fact that the
>> >> > kernels offered in the UML website didn't work, and then I tried to
>> >> > compile from source should be pointed here. I don't think I have done
>> >> > something so weird or uncommon here - mainly because I don't need much
>> >> > as long as I have flexibility to execute it.
>> >>
>> >> Everything that gets -stable updates.
>> >
>> > Website: UML's, http://user-mode-linux.sourceforge.net/, accessed right
>> > now.
>> >
>> > "Getting started" seemed like a good place for me a few weeks ago (and
>> > still does, but...). And I think it will make many users feel and think
>> > the same way I did. Except that it gives us wrong directions - but gives
>> > bad directions for users that will surely follow them without knowing
>> > the wrong details since they're expecting to see something working to
>> > get more familiar with UML. "Download THIS ( pointing to
>> > http://user-mode-linux.sourceforge.net/linux-2.6.24-rc7.bz2) or THIS
>> > (pointing to
>> > http://user-mode-linux.sourceforge.net/linux-2.6.24-x86_64.bz2 )". Are
>> > these kernel versions familiar to you in the list? They are for me, now
>> > I just understood a few more details, and the possible path to solution,
>> > to execution without unexpected problems - or so I hope.
>> >
>> > The thread I started today, quickly skimmed in the above quotes, shows
>> > this. The website needs to be fixed. And more than that, needs to be
>> > updated more frequently (or so I must guess) or write about how users
>> > can be sure their setup is good enough.
>> >
>> > I downloaded both suggested kernels, following the official (and assumed
>> > best, for that) instructions. Both did not work (and still don't). And
>> > the one that worked back then is probably needing something I've
>> > forgotten in these days or stopped to work today. But that one I
>> > compiled from source - and now I need to do it again, from the very
>> > start.
>> >
>> > Everything that gets stable updates... but this should not exclude the
>> > UML website, right?
>>
>> The website is very old and from the pre-mainline time.
>> If you volunteer to update and maintain it it would be wonderful.
>>
>> I'm not a web designer nor do I have the time for this.
>>
>
> Really?! I would never bet that it was that old.
>
> I can update it. And I also have a little bit of web design knowledge
> and practices that may be eventually useful. On the other hand, I would
> need directions and thumbs up to guarantee that the contents are kept
> correct (which would be my main objetive when changing texts). I have
> not programmed that much kernel code and "related or almost so" things,
> although I have a solid C background - and this is something that UML
> seems to have a broad contact surface, from the messages I have read
> here.
>
> At most a month of medium site changes are good as expectations?
> Although most of the time I can give a few hours per week, so that month
> should not look too bad.
>
> What would be the process? If only with you directly, I guess we
> continue to talk about it between us.

Create a concept and share it. :-)

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Building from source problems and possibilities

2015-10-30 Thread Richard Weinberger
On Fri, Oct 30, 2015 at 5:02 PM, Balaco Baco  wrote:
> I restarted, now I've got another kernel source (2.6.32.68), knowing
> that it may be old, but it's the "newer old" for 2.6, and I hoped that
> it would work.

Are you an archeologist? ;-)
Is there a particular reason why you can't use something recent?

> Steps done:
>
> 1. downloaded https://cdn. kernel
> .org/pub/linux/kernel/v2.6/longterm/v2.6.32/linux-2.6.32.68.tar.xz
> 2. extract with tar cJf (whatever)
> 3. A few commands:
> make defconfig ARCH=um
> # config is saved on a file, to be restarted from a known point
> whenever needed
> make menuconfig ARCH=um
> make mrproper# zero start guarantee when
> repeating these steps
> make mrproper ARCH=um   #  "
> make ARCH=uml
>
> 4. It stops a few seconds after, with a few errors that may be simple to
> fix:
>
> ===
> arch/um/os-Linux/start_up.c: In function 'check_coredump_limit':
> arch/um/os-Linux/start_up.c:340:16: error: storage size of 'lim' isn't
> known
>   struct rlimit lim;
> ^
> arch/um/os-Linux/start_up.c:341:2: error: implicit declaration of
> function 'getrlimit' [-Werror=implicit-function-declaration]
>   int err = getrlimit(RLIMIT_CORE, &lim);
>   ^
> arch/um/os-Linux/start_up.c:341:22: error: 'RLIMIT_CORE' undeclared
> (first use in this function)
>   int err = getrlimit(RLIMIT_CORE, &lim);
>   ^
> arch/um/os-Linux/start_up.c:341:22: note: each undeclared identifier is
> reported only once for each function it appears in
> arch/um/os-Linux/start_up.c:349:22: error: 'RLIM_INFINITY' undeclared
> (first use in this function)
>   if (lim.rlim_cur == RLIM_INFINITY)
>   ^
> arch/um/os-Linux/start_up.c:340:16: warning: unused variable 'lim'
> [-Wunused-variable]
>   struct rlimit lim;
> ^
> cc1: some warnings being treated as errors
> make[1]: *** [arch/um/os-Linux/start_up.o] Error 1
> make: *** [arch/um/os-Linux] Error 2
>
> ===
>
> Do you know the reason for these two errors? And how I should fix them?

It depends what libc you're using. AFAICT libc moved a header file to
a new location.

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Building from source problems and possibilities

2015-10-30 Thread Richard Weinberger
On Fri, Oct 30, 2015 at 8:30 PM, Richard Weinberger
 wrote:
> On Fri, Oct 30, 2015 at 5:02 PM, Balaco Baco  wrote:
>> I restarted, now I've got another kernel source (2.6.32.68), knowing
>> that it may be old, but it's the "newer old" for 2.6, and I hoped that
>> it would work.
>
> Are you an archeologist? ;-)
> Is there a particular reason why you can't use something recent?
>
>> Steps done:
>>
>> 1. downloaded https://cdn. kernel
>> .org/pub/linux/kernel/v2.6/longterm/v2.6.32/linux-2.6.32.68.tar.xz
>> 2. extract with tar cJf (whatever)
>> 3. A few commands:
>> make defconfig ARCH=um
>> # config is saved on a file, to be restarted from a known point
>> whenever needed
>> make menuconfig ARCH=um
>> make mrproper# zero start guarantee when
>> repeating these steps
>> make mrproper ARCH=um   #  "
>> make ARCH=uml
>>
>> 4. It stops a few seconds after, with a few errors that may be simple to
>> fix:
>>
>> ===
>> arch/um/os-Linux/start_up.c: In function 'check_coredump_limit':
>> arch/um/os-Linux/start_up.c:340:16: error: storage size of 'lim' isn't
>> known
>>   struct rlimit lim;
>> ^
>> arch/um/os-Linux/start_up.c:341:2: error: implicit declaration of
>> function 'getrlimit' [-Werror=implicit-function-declaration]
>>   int err = getrlimit(RLIMIT_CORE, &lim);
>>   ^
>> arch/um/os-Linux/start_up.c:341:22: error: 'RLIMIT_CORE' undeclared
>> (first use in this function)
>>   int err = getrlimit(RLIMIT_CORE, &lim);
>>   ^
>> arch/um/os-Linux/start_up.c:341:22: note: each undeclared identifier is
>> reported only once for each function it appears in
>> arch/um/os-Linux/start_up.c:349:22: error: 'RLIM_INFINITY' undeclared
>> (first use in this function)
>>   if (lim.rlim_cur == RLIM_INFINITY)
>>   ^
>> arch/um/os-Linux/start_up.c:340:16: warning: unused variable 'lim'
>> [-Wunused-variable]
>>   struct rlimit lim;
>> ^
>> cc1: some warnings being treated as errors
>> make[1]: *** [arch/um/os-Linux/start_up.o] Error 1
>> make: *** [arch/um/os-Linux] Error 2
>>
>> ===
>>
>> Do you know the reason for these two errors? And how I should fix them?
>
> It depends what libc you're using. AFAICT libc moved a header file to
> a new location.

Can you please verify whether this commit fixes the issue?
commit fdfa4c952844fce881df8c76de9c7180cbe913ab
Author: Sergei Trofimovich 
Date:   Sun Dec 30 01:37:30 2012 +0300

um: add missing declaration of 'getrlimit()' and friends

If so, we only need to figure why it wasn't backported.

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] [PATCH v4] um: net: replace GFP_KERNEL with GFP_ATOMIC when spinlock is held

2015-11-06 Thread Richard Weinberger
Am 29.10.2015 um 16:30 schrieb Saurabh Sengar:
> since GFP_KERNEL with GFP_ATOMIC while spinlock is held,
> as code while holding a spinlock should be atomic.
> GFP_KERNEL may sleep and can cause deadlock,
> where as GFP_ATOMIC may fail but certainly avoids deadlockdex 
> f70dd54..d898f6c 100644
> 
> Signed-off-by: Saurabh Sengar 

Applied!

Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Detail with one config warning

2015-11-11 Thread Richard Weinberger
On Wed, Nov 11, 2015 at 5:13 PM, Balaco Baco  wrote:
> There is one details that did not work for me, but it was easy to "fix"
> (quotes because I'm not sure it is the best fix). But someone else may
> find it useful.
>
> Detailed steps so everyone can compare doing it, if needed:
>
>>  1. get one kernel source package from https://cdn.kernel.org/
>>  (I tried these steps with more than one option, searching for the older and 
>> more stable
>>  version; if the results are different for you, try another one; below I 
>> copied my 4.2.6 try; 3.18 does not have this problem)
>
>>  2. extract it.
> $ tar xJf ...
> $ cd lin
>
>>  3. first step...
> $ make defconfig ARCH=um #uml1
>
> *** Default configuration is based on 'x86_64_defconfig'
> kernel/time/Kconfig:157:warning: range is invalid
> #
> # configuration written to .config
> #
>
>> That warning is strange. I did not like it. So I just edited that file, and 
>> changed it! :D hehehe
>
> $ vim kernel/time/Kconfig  # if it spitted a diff for line 157:
> -range 1 NR_CPUS
> +   range 1 1
>
>> So, again...
> # make defconfig ARCH=um #uml1
> *** Default configuration is based on 'x86_64_defconfig'
> #
> # configuration written to .config
> #
>
>> So, assume the next steps have no problem, except that I don't know
>> how to make my UML access the Internet... this is in another
>> discussion, though
>
>> ... ?
> $ make menuconfig ARCH=um #uml2
>
>> Build it
> $ make ARCH=um #uml3 uml4 uml5
>
>> Run it now... but where is my Internet? :( hehehehe

You did not configure a connection.
tuntap is a common method.

> $ ./vmlinux # the output name changed!? :P

You can use both "linux" and "vmlinux". They are hard linked.

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Detail with one config warning

2015-11-11 Thread Richard Weinberger
On Wed, Nov 11, 2015 at 6:04 PM, Balaco Baco  wrote:
> On Wed, Nov 11, 2015, at 13:39, Richard Weinberger wrote:
>> On Wed, Nov 11, 2015 at 5:13 PM, Balaco Baco  wrote:
>> > There is one details that did not work for me, but it was easy to "fix"
>> > (quotes because I'm not sure it is the best fix). But someone else may
>> > find it useful.
>> >
>> > Detailed steps so everyone can compare doing it, if needed:
>> >
>> >>  1. get one kernel source package from https://cdn.kernel.org/
>> >>  (I tried these steps with more than one option, searching for the older 
>> >> and more stable
>> >>  version; if the results are different for you, try another one; below I 
>> >> copied my 4.2.6 try; 3.18 does not have this problem)
>> >
>> >>  2. extract it.
>> > $ tar xJf ...
>> > $ cd lin
>> >
>> >>  3. first step...
>> > $ make defconfig ARCH=um #uml1
>> >
>> > *** Default configuration is based on 'x86_64_defconfig'
>> > kernel/time/Kconfig:157:warning: range is invalid
>> > #
>> > # configuration written to .config
>> > #
>> >
>> >> That warning is strange. I did not like it. So I just edited that file, 
>> >> and changed it! :D hehehe
>> >
>> > $ vim kernel/time/Kconfig  # if it spitted a diff for line 157:
>> > -range 1 NR_CPUS
>> > +   range 1 1
>> >
>> >> So, again...
>> > # make defconfig ARCH=um #uml1
>> > *** Default configuration is based on 'x86_64_defconfig'
>> > #
>> > # configuration written to .config
>> > #
>> >
>> >> So, assume the next steps have no problem, except that I don't know
>> >> how to make my UML access the Internet... this is in another
>> >> discussion, though
>> >
>> >> ... ?
>> > $ make menuconfig ARCH=um #uml2
>> >
>> >> Build it
>> > $ make ARCH=um #uml3 uml4 uml5
>> >
>> >> Run it now... but where is my Internet? :( hehehehe
>>
>> You did not configure a connection.
>> tuntap is a common method.
>>
>
> To add something like 'eth0=tuntap,,,192.168.1.100' to the command line
> is enough? Or I must change some config step that is not the default?

Depends on your setup.
A common setup is " eth0=tuntap,tap0".
i.e. create a tap0 in your host and setup routing/ips.

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Detail with one config warning

2015-11-11 Thread Richard Weinberger
Am 11.11.2015 um 18:21 schrieb Balaco Baco:
> On Wed, Nov 11, 2015, at 14:07, Richard Weinberger wrote:
>> On Wed, Nov 11, 2015 at 6:04 PM, Balaco Baco  wrote:
>>> On Wed, Nov 11, 2015, at 13:39, Richard Weinberger wrote:
>>>> On Wed, Nov 11, 2015 at 5:13 PM, Balaco Baco  wrote:
>>>>> There is one details that did not work for me, but it was easy to "fix"
>>>>> (quotes because I'm not sure it is the best fix). But someone else may
>>>>> find it useful.
>>>>>
>>>>> Detailed steps so everyone can compare doing it, if needed:
>>>>>
>>>>>>  1. get one kernel source package from https://cdn.kernel.org/
>>>>>>  (I tried these steps with more than one option, searching for the older 
>>>>>> and more stable
>>>>>>  version; if the results are different for you, try another one; below I 
>>>>>> copied my 4.2.6 try; 3.18 does not have this problem)
>>>>>
>>>>>>  2. extract it.
>>>>> $ tar xJf ...
>>>>> $ cd lin
>>>>>
>>>>>>  3. first step...
>>>>> $ make defconfig ARCH=um #uml1
>>>>>
>>>>> *** Default configuration is based on 'x86_64_defconfig'
>>>>> kernel/time/Kconfig:157:warning: range is invalid
>>>>> #
>>>>> # configuration written to .config
>>>>> #
>>>>>
>>>>>> That warning is strange. I did not like it. So I just edited that file, 
>>>>>> and changed it! :D hehehe
>>>>>
>>>>> $ vim kernel/time/Kconfig  # if it spitted a diff for line 157:
>>>>> -range 1 NR_CPUS
>>>>> +   range 1 1
>>>>>
>>>>>> So, again...
>>>>> # make defconfig ARCH=um #uml1
>>>>> *** Default configuration is based on 'x86_64_defconfig'
>>>>> #
>>>>> # configuration written to .config
>>>>> #
>>>>>
>>>>>> So, assume the next steps have no problem, except that I don't know
>>>>>> how to make my UML access the Internet... this is in another
>>>>>> discussion, though
>>>>>
>>>>>> ... ?
>>>>> $ make menuconfig ARCH=um #uml2
>>>>>
>>>>>> Build it
>>>>> $ make ARCH=um #uml3 uml4 uml5
>>>>>
>>>>>> Run it now... but where is my Internet? :( hehehehe
>>>>
>>>> You did not configure a connection.
>>>> tuntap is a common method.
>>>>
>>>
>>> To add something like 'eth0=tuntap,,,192.168.1.100' to the command line
>>> is enough? Or I must change some config step that is not the default?
>>
>> Depends on your setup.
>> A common setup is " eth0=tuntap,tap0".
>> i.e. create a tap0 in your host and setup routing/ips.
>>
> 
> I (yet) have no clue what a tap is. Searches¹ did not ring many clear
> bells for me.
> 
> ¹https://duckduckgo.com/html/?q=uml+user+mode+linux+tuntap
> 
> My setup is what I have showed here. I have a AMD64 Debian image
> (Debian-Wheezy-AMD64-root_fs). The compile config I have showed here (I
> did not change anything besides a few options of the given default, and
> most of the tries I did not do these changes).
> 
> 

http://user-mode-linux.sourceforge.net/old/networking.html
https://en.wikipedia.org/wiki/TUN/TAP

Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Detail with one config warning

2015-11-11 Thread Richard Weinberger
Am 11.11.2015 um 18:57 schrieb Balaco Baco:
> Since I have no root access in the host machine, I must use 'slirp'.
> Right? Now I'll install it (https://en.wikipedia.org/wiki/Slirp) from
> source and pass the full path to UML in the command line, e.g.:

Yes.

> eth0=slirp,,/home/me/bin/

Documentation says: ethn=slirp,ethernet address,slirp path

That said, the slirp tool is old and AFIAK unmaintained.
qemu forked it a long time ago and has it integrated into its
source.

Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Detail with one config warning

2015-11-12 Thread Richard Weinberger
Am 12.11.2015 um 02:57 schrieb Balaco Baco:
> On Wed, Nov 11, 2015, at 17:34, Richard Weinberger wrote:
>> Am 11.11.2015 um 18:57 schrieb Balaco Baco:
>>> Since I have no root access in the host machine, I must use 'slirp'.
>>> Right? Now I'll install it (https://en.wikipedia.org/wiki/Slirp) from
>>> source and pass the full path to UML in the command line, e.g.:
>>
>> Yes.
>>
>>> eth0=slirp,,/home/me/bin/
>>
>> Documentation says: ethn=slirp,ethernet address,slirp path
>>
>> That said, the slirp tool is old and AFIAK unmaintained.
>> qemu forked it a long time ago and has it integrated into its
>> source.
>>
> 
> Documentation of UML also said that ethernet address is optional. I did
> both ways, none worked (and it took me a few minutes and tries to find
> out that not all MAC addresses are possible to use for a virtual machine
> like UML; is this at least mentioned in some UML doc? It shouls, IMHO).
> 
> So, is it possible that I run an UML with full Internet access, and
> without having root access in the host machine? Or am I trying something
> that from the start was not possible?
> 
> If it is not possible, is it easy to set up some form of file sharing
> between the host and UML machine? (again, this must *not* depend on host
> root access!)

As I said, if you don't have root on the host, you have to use slirp.

Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Detail with one config warning

2015-11-13 Thread Richard Weinberger
Am 12.11.2015 um 14:22 schrieb Balaco Baco:
> 
> On Thu, Nov 12, 2015, at 10:00, Richard Weinberger wrote:
>> Am 12.11.2015 um 02:57 schrieb Balaco Baco:
>>> On Wed, Nov 11, 2015, at 17:34, Richard Weinberger wrote:
>>>> Am 11.11.2015 um 18:57 schrieb Balaco Baco:
>>>>> Since I have no root access in the host machine, I must use 'slirp'.
>>>>> Right? Now I'll install it (https://en.wikipedia.org/wiki/Slirp) from
>>>>> source and pass the full path to UML in the command line, e.g.:
>>>>
>>>> Yes.
>>>>
>>>>> eth0=slirp,,/home/me/bin/
>>>>
>>>> Documentation says: ethn=slirp,ethernet address,slirp path
>>>>
>>>> That said, the slirp tool is old and AFIAK unmaintained.
>>>> qemu forked it a long time ago and has it integrated into its
>>>> source.
>>>>
>>>
>>> Documentation of UML also said that ethernet address is optional. I did
>>> both ways, none worked (and it took me a few minutes and tries to find
>>> out that not all MAC addresses are possible to use for a virtual machine
>>> like UML; is this at least mentioned in some UML doc? It shouls, IMHO).
>>>
>>> So, is it possible that I run an UML with full Internet access, and
>>> without having root access in the host machine? Or am I trying something
>>> that from the start was not possible?
>>>
>>> If it is not possible, is it easy to set up some form of file sharing
>>> between the host and UML machine? (again, this must *not* depend on host
>>> root access!)
>>
>> As I said, if you don't have root on the host, you have to use slirp.
>>
> 
> And I am using slirp. But it do not work yet. I'm not sure what is
> wrong. May you help me?

Just gave it a try. Works here.

./linux ubda=../Downloads/Debian-Squeeze-AMD64-root_fs mem=1G 
eth0=slirp,FE:FD:01:02:03:04,/home/rw/work/slirp/slirp-1.0.17/src/slirp

root@uml:~# ifconfig eth0 10.0.2.15 up
root@uml:~# route add default gw 10.0.2.15

Then you can use networking. Please not that slirp does not have a performance.
Depending on your slirp package you can tweak it.

Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Detail with one config warning

2015-11-23 Thread Richard Weinberger
Am 22.11.2015 um 16:39 schrieb Balaco Baco:
> 
> On Fri, Nov 13, 2015, at 18:15, Richard Weinberger wrote:
>> Am 12.11.2015 um 14:22 schrieb Balaco Baco:
>>> On Thu, Nov 12, 2015, at 10:00, Richard Weinberger wrote:
>>>> Am 12.11.2015 um 02:57 schrieb Balaco Baco:
>>>>> On Wed, Nov 11, 2015, at 17:34, Richard Weinberger wrote:
>>>>>> Am 11.11.2015 um 18:57 schrieb Balaco Baco:
>>>>>>> Since I have no root access in the host machine, I must use 'slirp'.
>>>>>>> Right? Now I'll install it (https://en.wikipedia.org/wiki/Slirp) from
>>>>>>> source and pass the full path to UML in the command line, e.g.:
>>>>>>
>>>>>> Yes.
>>>>>>
>>>>>>> eth0=slirp,,/home/me/bin/
>>>>>>
>>>>>> Documentation says: ethn=slirp,ethernet address,slirp path
>>>>>>
>>>>>> That said, the slirp tool is old and AFIAK unmaintained.
>>>>>> qemu forked it a long time ago and has it integrated into its
>>>>>> source.
>>>>>>
>>>>>
>>>>> Documentation of UML also said that ethernet address is optional. I did
>>>>> both ways, none worked (and it took me a few minutes and tries to find
>>>>> out that not all MAC addresses are possible to use for a virtual machine
>>>>> like UML; is this at least mentioned in some UML doc? It shouls, IMHO).
>>>>>
>>>>> So, is it possible that I run an UML with full Internet access, and
>>>>> without having root access in the host machine? Or am I trying something
>>>>> that from the start was not possible?
>>>>>
>>>>> If it is not possible, is it easy to set up some form of file sharing
>>>>> between the host and UML machine? (again, this must *not* depend on host
>>>>> root access!)
>>>>
>>>> As I said, if you don't have root on the host, you have to use slirp.
>>>>
>>>
>>> And I am using slirp. But it do not work yet. I'm not sure what is
>>> wrong. May you help me?
>>
>> Just gave it a try. Works here.
>>
>> ./linux ubda=../Downloads/Debian-Squeeze-AMD64-root_fs mem=1G
>> eth0=slirp,FE:FD:01:02:03:04,/home/rw/work/slirp/slirp-1.0.17/src/slirp
>>
>> root@uml:~# ifconfig eth0 10.0.2.15 up
>> root@uml:~# route add default gw 10.0.2.15
> 
> Do not work for me. And to point directly to the slirp program instead
> of its folder (which is understood by many as the *path* for anything,
> not the things themselves, with full path) is news for me, and something
> that should be pointed in the docs. I think many others will understand
> it as I did before you said this.

"Does not work" is not a valid error description.
Please find out what exactly does not work.

> Now there is a few lines about slirt and ETH0:
> 
> ===
> [autodetect SLIP/CSLIP, MTU 1500, MRU 1500, 115200 baud]
> 
> SLiRP Ready ...
> Unsupported device type 256 for "eth0"
> Failed to bring up eth0.
> done.
> 
> 

DHCP cannot work on SLIRP.
That's why you have to configure the interface manually.

> What can I do?
> 
>> Then you can use networking. Please not that slirp does not have a
>> performance.
>> Depending on your slirp package you can tweak it.
> 
> I have compiled it from source. Do you know exactly where and how I can
> tweak it? If so, please say how, so I don't have to search and find what
> is already known.

AFAIK Debian folks have some patches in their package.

Thanks,
//richard

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Detail with one config warning

2015-11-23 Thread Richard Weinberger
Am 23.11.2015 um 20:04 schrieb Balaco Baco:
> On Mon, Nov 23, 2015, at 13:35, Richard Weinberger wrote:
>> Am 22.11.2015 um 16:39 schrieb Balaco Baco:
>>>>>>>>> Since I have no root access in the host machine, I must use 'slirp'.
>>>>>>>>> Right? Now I'll install it (https://en.wikipedia.org/wiki/Slirp) from
>>>>>>>>> source and pass the full path to UML in the command line, e.g.:
>>>>>>>>
>>>>>>>> Yes.
>>>>>>>>
>>>>>>>>> eth0=slirp,,/home/me/bin/
>>>>>>>>
>>>>>>>> Documentation says: ethn=slirp,ethernet address,slirp path
>>>>>>>>
>>>>>>>> That said, the slirp tool is old and AFIAK unmaintained.
>>>>>>>> qemu forked it a long time ago and has it integrated into its
>>>>>>>> source.
>>>>>>>>
>>>>>>>
>>>>>>> Documentation of UML also said that ethernet address is optional. I did
>>>>>>> both ways, none worked (and it took me a few minutes and tries to find
>>>>>>> out that not all MAC addresses are possible to use for a virtual machine
>>>>>>> like UML; is this at least mentioned in some UML doc? It shouls, IMHO).
>>>>>>>
>>>>>>> So, is it possible that I run an UML with full Internet access, and
>>>>>>> without having root access in the host machine? Or am I trying something
>>>>>>> that from the start was not possible?
>>>>>>>
>>>>>>> If it is not possible, is it easy to set up some form of file sharing
>>>>>>> between the host and UML machine? (again, this must *not* depend on host
>>>>>>> root access!)
>>>>>>
>>>>>> As I said, if you don't have root on the host, you have to use slirp.
>>>>>>
>>>>>
>>>>> And I am using slirp. But it do not work yet. I'm not sure what is
>>>>> wrong. May you help me?
>>>>
>>>> Just gave it a try. Works here.
>>>>
>>>> ./linux ubda=../Downloads/Debian-Squeeze-AMD64-root_fs mem=1G
>>>> eth0=slirp,FE:FD:01:02:03:04,/home/rw/work/slirp/slirp-1.0.17/src/slirp
>>>>
>>>> root@uml:~# ifconfig eth0 10.0.2.15 up
>>>> root@uml:~# route add default gw 10.0.2.15
>>>
>>> Do not work for me. And to point directly to the slirp program instead
>>> of its folder (which is understood by many as the *path* for anything,
>>> not the things themselves, with full path) is news for me, and something
>>> that should be pointed in the docs. I think many others will understand
>>> it as I did before you said this.
>>
>> "Does not work" is not a valid error description.
>> Please find out what exactly does not work.
> 
> There is no clear error. In this paragraph I just pointed to something
> in the instructions that mislead me to give the path to the folder
> *where* slirp was, instead of the slip program itself, its file. The
> most I could see that did not work I said right after, below in the
> previous message. Please assume and try to see that I'm trying my best
> to follow your directions, but I still could not do it although you just
> said you did.
> 
> You may also ask me to directly do things or steps that you do (maybe
> it's something I don't know or do that make it don't work).
> 
> 
>>> Now there is a few lines about slirt and ETH0:
>>>
>>> ===
>>> [autodetect SLIP/CSLIP, MTU 1500, MRU 1500, 115200 baud]
>>>
>>> SLiRP Ready ...
>>> Unsupported device type 256 for "eth0"
>>> Failed to bring up eth0.
>>> done.
>>>
>>> 
>>
>> DHCP cannot work on SLIRP.
>> That's why you have to configure the interface manually.
>>
>>> What can I do?
>>>
> 
> If configure the interface manually is to type the commands (inside UML)
>  below, that I did before:
> 
> root@uml:~# ifconfig eth0 10.0.2.15 up
> root@uml:~# route add default gw 10.0.2.15
> 
> It did not work.
> 
> What information is useful for you? I don't know. So, since you seem to
> have thought I did not try enough before, now I'm sending the whole boot
> log, and each step I did before and repeated right now, after I read
&g

Re: [uml-user] Detail with one config warning

2015-11-23 Thread Richard Weinberger
Am 23.11.2015 um 21:04 schrieb Balaco Baco:
> On Mon, Nov 23, 2015, at 16:38, Richard Weinberger wrote:
>> Am 23.11.2015 um 20:04 schrieb Balaco Baco:
>>> On Mon, Nov 23, 2015, at 13:35, Richard Weinberger wrote:
>>>> Am 22.11.2015 um 16:39 schrieb Balaco Baco:
>>>>>>>>>>> Since I have no root access in the host machine, I must use 'slirp'.
>>>>>>>>>>> Right? Now I'll install it (https://en.wikipedia.org/wiki/Slirp) 
>>>>>>>>>>> from
>>>>>>>>>>> source and pass the full path to UML in the command line, e.g.:
>>>>>>>>>>
>>>>>>>>>> Yes.
>>>>>>>>>>
>>>>>>>>>>> eth0=slirp,,/home/me/bin/
>>>>>>>>>>
>>>>>>>>>> Documentation says: ethn=slirp,ethernet address,slirp path
>>>>>>>>>>
>>>>>>>>>> That said, the slirp tool is old and AFIAK unmaintained.
>>>>>>>>>> qemu forked it a long time ago and has it integrated into its
>>>>>>>>>> source.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Documentation of UML also said that ethernet address is optional. I 
>>>>>>>>> did
>>>>>>>>> both ways, none worked (and it took me a few minutes and tries to find
>>>>>>>>> out that not all MAC addresses are possible to use for a virtual 
>>>>>>>>> machine
>>>>>>>>> like UML; is this at least mentioned in some UML doc? It shouls, 
>>>>>>>>> IMHO).
>>>>>>>>>
>>>>>>>>> So, is it possible that I run an UML with full Internet access, and
>>>>>>>>> without having root access in the host machine? Or am I trying 
>>>>>>>>> something
>>>>>>>>> that from the start was not possible?
>>>>>>>>>
>>>>>>>>> If it is not possible, is it easy to set up some form of file sharing
>>>>>>>>> between the host and UML machine? (again, this must *not* depend on 
>>>>>>>>> host
>>>>>>>>> root access!)
>>>>>>>>
>>>>>>>> As I said, if you don't have root on the host, you have to use slirp.
>>>>>>>>
>>>>>>>
>>>>>>> And I am using slirp. But it do not work yet. I'm not sure what is
>>>>>>> wrong. May you help me?
>>>>>>
>>>>>> Just gave it a try. Works here.
>>>>>>
>>>>>> ./linux ubda=../Downloads/Debian-Squeeze-AMD64-root_fs mem=1G
>>>>>> eth0=slirp,FE:FD:01:02:03:04,/home/rw/work/slirp/slirp-1.0.17/src/slirp
>>>>>>
>>>>>> root@uml:~# ifconfig eth0 10.0.2.15 up
>>>>>> root@uml:~# route add default gw 10.0.2.15
>>>>>
>>>>> Do not work for me. And to point directly to the slirp program instead
>>>>> of its folder (which is understood by many as the *path* for anything,
>>>>> not the things themselves, with full path) is news for me, and something
>>>>> that should be pointed in the docs. I think many others will understand
>>>>> it as I did before you said this.
>>>>
>>>> "Does not work" is not a valid error description.
>>>> Please find out what exactly does not work.
>>>
>>> There is no clear error. In this paragraph I just pointed to something
>>> in the instructions that mislead me to give the path to the folder
>>> *where* slirp was, instead of the slip program itself, its file. The
>>> most I could see that did not work I said right after, below in the
>>> previous message. Please assume and try to see that I'm trying my best
>>> to follow your directions, but I still could not do it although you just
>>> said you did.
>>>
>>> You may also ask me to directly do things or steps that you do (maybe
>>> it's something I don't know or do that make it don't work).
>>>
>>>
>>>>> Now there is a few lines about slirt and ETH0:
>>>>>
>>>>> ===
>>>>> [autodetect SLIP/CSLIP, M

Re: [uml-user] Detail with one config warning

2015-11-23 Thread Richard Weinberger
Am 23.11.2015 um 21:31 schrieb Balaco Baco:
> On Mon, Nov 23, 2015, at 17:07, Richard Weinberger wrote:
>> Am 23.11.2015 um 21:04 schrieb Balaco Baco:
>>> On Mon, Nov 23, 2015, at 16:38, Richard Weinberger wrote:
>>>> Am 23.11.2015 um 20:04 schrieb Balaco Baco:
>>>>> On Mon, Nov 23, 2015, at 13:35, Richard Weinberger wrote:
>>>>>> Am 22.11.2015 um 16:39 schrieb Balaco Baco:
>>>>>>>>>>>>> Since I have no root access in the host machine, I must use 
>>>>>>>>>>>>> 'slirp'.
>>>>>>>>>>>>> Right? Now I'll install it (https://en.wikipedia.org/wiki/Slirp) 
>>>>>>>>>>>>> from
>>>>>>>>>>>>> source and pass the full path to UML in the command line, e.g.:
>>>>>>>>>>>>
>>>>>>>>>>>> Yes.
>>>>>>>>>>>>
>>>>>>>>>>>>> eth0=slirp,,/home/me/bin/
>>>>>>>>>>>>
>>>>>>>>>>>> Documentation says: ethn=slirp,ethernet address,slirp path
>>>>>>>>>>>>
>>>>>>>>>>>> That said, the slirp tool is old and AFIAK unmaintained.
>>>>>>>>>>>> qemu forked it a long time ago and has it integrated into its
>>>>>>>>>>>> source.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Documentation of UML also said that ethernet address is optional. I 
>>>>>>>>>>> did
>>>>>>>>>>> both ways, none worked (and it took me a few minutes and tries to 
>>>>>>>>>>> find
>>>>>>>>>>> out that not all MAC addresses are possible to use for a virtual 
>>>>>>>>>>> machine
>>>>>>>>>>> like UML; is this at least mentioned in some UML doc? It shouls, 
>>>>>>>>>>> IMHO).
>>>>>>>>>>>
>>>>>>>>>>> So, is it possible that I run an UML with full Internet access, and
>>>>>>>>>>> without having root access in the host machine? Or am I trying 
>>>>>>>>>>> something
>>>>>>>>>>> that from the start was not possible?
>>>>>>>>>>>
>>>>>>>>>>> If it is not possible, is it easy to set up some form of file 
>>>>>>>>>>> sharing
>>>>>>>>>>> between the host and UML machine? (again, this must *not* depend on 
>>>>>>>>>>> host
>>>>>>>>>>> root access!)
>>>>>>>>>>
>>>>>>>>>> As I said, if you don't have root on the host, you have to use slirp.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> And I am using slirp. But it do not work yet. I'm not sure what is
>>>>>>>>> wrong. May you help me?
>>>>>>>>
>>>>>>>> Just gave it a try. Works here.
>>>>>>>>
>>>>>>>> ./linux ubda=../Downloads/Debian-Squeeze-AMD64-root_fs mem=1G
>>>>>>>> eth0=slirp,FE:FD:01:02:03:04,/home/rw/work/slirp/slirp-1.0.17/src/slirp
>>>>>>>>
>>>>>>>> root@uml:~# ifconfig eth0 10.0.2.15 up
>>>>>>>> root@uml:~# route add default gw 10.0.2.15
>>>>>>>
>>>>>>> Do not work for me. And to point directly to the slirp program instead
>>>>>>> of its folder (which is understood by many as the *path* for anything,
>>>>>>> not the things themselves, with full path) is news for me, and something
>>>>>>> that should be pointed in the docs. I think many others will understand
>>>>>>> it as I did before you said this.
>>>>>>
>>>>>> "Does not work" is not a valid error description.
>>>>>> Please find out what exactly does not work.
>>>>>
>>>>> There is no clear error. In this paragraph I just pointed to something
>>>>> in the instructions that mislead me to give the path to 

Re: [uml-user] Detail with one config warning

2015-11-23 Thread Richard Weinberger
Am 23.11.2015 um 21:48 schrieb Balaco Baco:
> Please be clearer.
> 
> You said "you can also use the Internet". But after that you repeat "As
> I wrote ICMP is not supported on SLIRP." So what do I have here? What
> are the practical ways to use the Internet within UML machine? The
> things want to do is to download packages, open websites, and other
> common Internet uses from most computers.

Please read on ICMP. You don't need it to view porn.
TCP is what you need. :-)

Thanks,
//richard

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Detail with one config warning

2015-11-23 Thread Richard Weinberger
Am 23.11.2015 um 21:55 schrieb Balaco Baco:
> On Mon, Nov 23, 2015, at 17:50, Richard Weinberger wrote:
>> Am 23.11.2015 um 21:48 schrieb Balaco Baco:
>>> Please be clearer.
>>>
>>> You said "you can also use the Internet". But after that you repeat "As
>>> I wrote ICMP is not supported on SLIRP." So what do I have here? What
>>> are the practical ways to use the Internet within UML machine? The
>>> things want to do is to download packages, open websites, and other
>>> common Internet uses from most computers.
>>
>> Please read on ICMP. You don't need it to view porn.
>> TCP is what you need. :-)
>>
> 
> :-/
> 
> I really don't understand why you insist on repeating what I already
> showed that does not help me. I need more details.
> 
> https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol
> 
> So? What can I do with it? Can you make a drawing, please?

Did you read the article?

It will tell you that ping is using it. So, no ping for you.
But as TCP and UDP are fully supported the web will work.

Thanks,
//richard

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] Detail with one config warning

2015-11-23 Thread Richard Weinberger
Am 23.11.2015 um 22:31 schrieb Balaco Baco:
> I skimmed though it. To use ping to test if Internet connections are
> working or not is one the most basic things everybody does and learn.
> If, in some exotic setup (like UML's) makes this different, it should
> say so, clearly (and not "indirectly obvious"). There are more than 15
> years I have done and seen ping being used to test connections.
> 
> ... now I must do this! I'm barely believing it... BRB... - if it does
> not work only! :P hahaha
> 

Again, this has 0 to do with UML, with qemu's user networking, which is based
on SLIRP, it is the same...

Thanks,
//richard

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


  1   2   >