Re: how to build userspace for CONFIG_BUILD_KERNEL

2020-02-25 Thread Xiang Xiao
On Wed, Feb 26, 2020 at 12:57 PM Takashi Yamamoto wrote: > > hi, > > On Wed, Feb 26, 2020 at 1:36 PM Xiang Xiao wrote: > > > > For kernel build, all symbols need be resolved: > > 1.We need add libapps.a into LDLIBS to resolve nsh_*, which remove > > accidentally in commit 4ee39e208048f075860 > >

Re: how to build userspace for CONFIG_BUILD_KERNEL

2020-02-25 Thread Takashi Yamamoto
hi, On Wed, Feb 26, 2020 at 1:36 PM Xiang Xiao wrote: > > For kernel build, all symbols need be resolved: > 1.We need add libapps.a into LDLIBS to resolve nsh_*, which remove > accidentally in commit 4ee39e208048f075860 it removed only "ifneq ($(CONFIG_BUILD_KERNEL),y)" block. it should not affe

Re: how to build userspace for CONFIG_BUILD_KERNEL

2020-02-25 Thread Xiang Xiao
For kernel build, all symbols need be resolved: 1.We need add libapps.a into LDLIBS to resolve nsh_*, which remove accidentally in commit 4ee39e208048f075860 2.LDLIBS should contain libproxy.a to resolve sched_*, and libc.a for fprintf, but these library should in LDLIBS automatically. Thanks Xia

[GitHub] [incubator-nuttx-testing] liuguo09 opened a new pull request #9: fulllist: remove sim:mtdpart and sim:mtdrwb configs

2020-02-25 Thread GitBox
liuguo09 opened a new pull request #9: fulllist: remove sim:mtdpart and sim:mtdrwb configs URL: https://github.com/apache/incubator-nuttx-testing/pull/9 Remove sim:mtdpart and sim:mtdrwb configs since i386 libz not available now in Apache Jenkins slaves. Revert this change once i386 libz

Re: how to build userspace for CONFIG_BUILD_KERNEL

2020-02-25 Thread Gregory Nutt
Hi, There are some instructions for it used to be done here: https://github.com/apache/incubator-nuttx/blob/master/boards/arm/sama5/sama5d4-ek/README.txt#L4018 However, a lot has changed in the apps/ build so you will probably need to get updates from Xiao Xiang.  Those instructions were vali

how to build userspace for CONFIG_BUILD_KERNEL

2020-02-25 Thread Takashi Yamamoto
hi, how can i build userspace for CONFIG_BUILD_KERNEL? using sama5d4-ek:knsh config, i tried "make TOPDIR=$(pwd) APPDIR=$(pwd)/../apps -C ../apps install". it generated some binaries like the following. but i don't see how it will get nsh_consolemain etc. spacetanuki% nm ../apps/bin/init 00c

Podling Nuttx Report Reminder - March 2020

2020-02-25 Thread jmclean
Dear podling, This email was sent by an automated system on behalf of the Apache Incubator PMC. It is an initial reminder to give you plenty of time to prepare your quarterly board report. The board meeting is scheduled for Wed, 18 March 2020, 10:30 am PDT. The report for your podling will form a

Re: [PATCH] fix memset() implicit declaration warning

2020-02-25 Thread Nathan Hartman
On Tue, Feb 25, 2020 at 1:15 PM Gregory Nutt wrote: > > > > Commit 1f1356a2f5ee91ae077038c9e7b7a8fccc4180b8 introduces a compiler > > warning. > > > > The fix is simple: Include in net/icmp/icmp_input.c. > > > > Something is broken at GitHub (or my GitHub account, or my > > incubator-nuttx fork,

Re: [PATCH] fix memset() implicit declaration warning

2020-02-25 Thread Gregory Nutt
Commit 1f1356a2f5ee91ae077038c9e7b7a8fccc4180b8 introduces a compiler warning. The fix is simple: Include in net/icmp/icmp_input.c. Something is broken at GitHub (or my GitHub account, or my incubator-nuttx fork, or something). Therefore I am sending a patch instead of a pull request. Patch

[PATCH] fix memset() implicit declaration warning

2020-02-25 Thread Nathan Hartman
Commit 1f1356a2f5ee91ae077038c9e7b7a8fccc4180b8 introduces a compiler warning. The fix is simple: Include in net/icmp/icmp_input.c. Something is broken at GitHub (or my GitHub account, or my incubator-nuttx fork, or something). Therefore I am sending a patch instead of a pull request. Patch att

Re: userspace/kernel isolation question

2020-02-25 Thread Gregory Nutt
"During system calls, the user mode thread’s access to the system call and the *passed-in parameters are all validated*. I think this is a fine thing to do and would welcome such checks into the OS.  We would have to be careful.  In the case of read(), for example:     ssize_t read(int fd,

Re: userspace/kernel isolation question

2020-02-25 Thread Gregory Nutt
But stub call into the real and complex implementation and then the kernel stack will contain many return address point, the hack can command kernel write what he want into this region and modify some return address point to that region, then the kernel will jump to the code eventually. That is

Re: userspace/kernel isolation question

2020-02-25 Thread Xiang Xiao
On Wed, Feb 26, 2020 at 12:34 AM Gregory Nutt wrote: > > On 2/25/2020 10:26 AM, Xiang Xiao wrote: > > On Tue, Feb 25, 2020 at 11:59 PM Gregory Nutt wrote: > >> Hi, > > i meant that, if userspace wants to read some kernel memory, it can pass > > the kernel pointer to eg. write system call

Re: userspace/kernel isolation question

2020-02-25 Thread Miguel Ángel Herranz
On Tue, Feb 25, 2020 at 5:27 PM Gregory Nutt wrote: > > > ... How are syscalls dealt in other RTOS using MPU? > > For the case of the MPU, there is no general answer to that. I don't > think that there is any standard model for the use of the MPU in a > Unix-like system. > > NuttX uses the MPU t

Re: userspace/kernel isolation question

2020-02-25 Thread Gregory Nutt
On 2/25/2020 10:26 AM, Xiang Xiao wrote: On Tue, Feb 25, 2020 at 11:59 PM Gregory Nutt wrote: Hi, i meant that, if userspace wants to read some kernel memory, it can pass the kernel pointer to eg. write system call as the buffer argument, and then read the contents of the file. I guess I stil

Re: userspace/kernel isolation question

2020-02-25 Thread Gregory Nutt
... How are syscalls dealt in other RTOS using MPU? For the case of the MPU, there is no general answer to that.  I don't think that there is any standard model for the use of the MPU in a Unix-like system. NuttX uses the MPU to create a Kernel space with the OS and critical board logic

Re: userspace/kernel isolation question

2020-02-25 Thread Xiang Xiao
On Tue, Feb 25, 2020 at 11:59 PM Gregory Nutt wrote: > > Hi, > >> > >>> i meant that, if userspace wants to read some kernel memory, it can pass > >>> the kernel pointer to eg. write system call as the buffer argument, > >>> and then read the contents of the file. > >> I guess I still don't unders

Re: userspace/kernel isolation question

2020-02-25 Thread Miguel Ángel Herranz
On Tue, Feb 25, 2020 at 5:08 PM Nathan Hartman wrote: > ... > If you need the sort of "security" that makes it possible to run > totally untrusted code, then maybe you need a full blown operating > system, which also comes with a full blown computer and not an > embedded microcontroller. > Despi

Re: userspace/kernel isolation question

2020-02-25 Thread Gregory Nutt
On Tue, Feb 25, 2020 at 10:59 AM Gregory Nutt wrote: I think that most syscall which contain pointer has the security issue in PROTECTED/KERNEL mode. Certainly if high security is need, they all should be reviewed. Linux goes to a lot of trouble to access data pointed to by user-provided poi

Re: userspace/kernel isolation question

2020-02-25 Thread Sebastien Lorquet
Hello, I dont agree. A fundamental feature to avoid widespread developement of the so-called Internet of Shit is basic embedded security. Some thoughts: An embedded system can have a minimal security. Of course security has several levels from non-existent to ideal. Not having a full PKI

Re: userspace/kernel isolation question

2020-02-25 Thread Nathan Hartman
On Tue, Feb 25, 2020 at 10:59 AM Gregory Nutt wrote: > > I think that most syscall which contain pointer has the security issue > > in PROTECTED/KERNEL mode. > > Certainly if high security is need, they all should be reviewed. Linux > goes to a lot of trouble to access data pointed to by user-prov

Re: userspace/kernel isolation question

2020-02-25 Thread Gregory Nutt
Hi, i meant that, if userspace wants to read some kernel memory, it can pass the kernel pointer to eg. write system call as the buffer argument, and then read the contents of the file. I guess I still don't understand. Access is still via file descriptor. You could certainly clobber kernel me

Re: How (or where) does the enque function sends the data to hardware....

2020-02-25 Thread Phani Kumar
Or... Do I have to *write the data to corresponding hardware registers in the enque itself *and wait for the interrupt routine to receive the data and release the semaphore? Basically enque of Lpc17xxx (which I am using as reference) seems generic and not updating any hardware registers... With be

How (or where) does the enque function sends the data to hardware....

2020-02-25 Thread Phani Kumar
Hi Greg and all, I am developing the USB Host driver for RX65N, and using lpc17xxx port as my basic reference. Currently I can detect the device and initiate the standard "usbhost_enumerate()" function. This calls tballoc twice and prepares the buffer for (i) first setup packet request and (ii) for

Re: userspace/kernel isolation question

2020-02-25 Thread Xiang Xiao
On Tue, Feb 25, 2020 at 10:08 PM Gregory Nutt wrote: > > > > i meant that, if userspace wants to read some kernel memory, it can pass > > the kernel pointer to eg. write system call as the buffer argument, > > and then read the contents of the file. > I guess I still don't understand. Access is s

Re: userspace/kernel isolation question

2020-02-25 Thread Gregory Nutt
i meant that, if userspace wants to read some kernel memory, it can pass the kernel pointer to eg. write system call as the buffer argument, and then read the contents of the file. I guess I still don't understand.  Access is still via file descriptor.  You could certainly clobber kernel memor

Re: Usrsocktest app example fails

2020-02-25 Thread Xiang Xiao
I try the test on simulator, and all cases pass without exception, maybe you can try the simulator in your environment to ensure your modification don't affect the system. On Mon, Feb 24, 2020 at 7:31 PM Oleg Evseev wrote: > Hi Xiang, > > I've checked https://github.com/apache/incubator-nuttx/pu

Re: Build is broken

2020-02-25 Thread Xiang Xiao
David, patch is here: https://github.com/apache/incubator-nuttx-apps/pull/95 Thanks Xiang On Tue, Feb 25, 2020 at 8:26 PM David Sidrane wrote: > > Hi Takashi, > > Thanks for looking at this. > > Yes. Linux > > To test it should I revert the revert and then apply the commit or is there > a PR I s

RE: Build is broken

2020-02-25 Thread David Sidrane
Hi Takashi, Thanks for looking at this. Yes. Linux To test it should I revert the revert and then apply the commit or is there a PR I should test? David -Original Message- From: Takashi Yamamoto [mailto:yamam...@midokura.com.INVALID] Sent: Monday, February 24, 2020 10:46 PM To: dev@nut