Commit Graph

47868 Commits

Author SHA1 Message Date
Zhe Weng
6222ad5764 Revert "net: downgrade iob priority of input/udp/icmp to avoid blocking devif"
This reverts commit d87620abc9.
2023-01-12 01:56:18 +08:00
zhanghongyu
4de3387eb2 getaddrinfo: add AI_NUMERICHOST flag handle
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-12 01:40:11 +08:00
Xuxingliang
431e31b6b2 libc/math: add simple implementation for sincos API
Signed-off-by: Xuxingliang <xuxingliang@xiaomi.com>
2023-01-12 00:07:44 +08:00
Xiang Xiao
ef65d443ad sem: Remove PRIOINHERIT_FLAGS_ENABLE and use SEM_PRIO_INHERIT instead
and refine the code to prepare the support of new flags

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-11 17:35:28 +02:00
zhanghongyu
48c9d10336 net_socket: add accept4 function
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-11 23:28:08 +08:00
chao an
47d628d22e net/mld: fix build break of mld router
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-11 22:58:21 +08:00
xinbingnan
1ce93a7d9a sensors/bmi160.c: fix i2C read and write behavior
There is a problem with the original driver reading and writing behavior, refer to the driver of mpu60x0 to make corresponding changes.

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-01-11 21:12:29 +08:00
Ville Juven
416e83d57e fs/poll: add missing FAR qualifier to poll()
Follow-up to #8072
2023-01-11 21:12:17 +08:00
xinbingnan
383458c64e sim/Kconfig: move some i2c,spi configs from board to arch
Move `SIM_I2CBUS_ID` and `SIM_SPIDEV_NAME` from board to arch.
This allows you not to rely on board configuration.

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-01-11 17:28:43 +08:00
梁超众
aca1a065a8 move usrsock to kernel space
Signed-off-by: 梁超众 <liangchaozhong@xiaomi.com>
2023-01-11 15:14:03 +08:00
Jukka Laitinen
0a885da434 syscall: Always add munmap into syscalls
Munmap interface is always enabled just like mmap is

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-11 03:11:11 +08:00
Lucas Saavedra Vaz
2b7d8981e2 arch/xtensa/esp32s3: Add initial support for touch pad polling 2023-01-11 02:00:41 +08:00
Lucas Saavedra Vaz
24995f6918 arch/xtensa/esp32s3: Add RTC GPIOs configuration functions 2023-01-11 02:00:41 +08:00
Lucas Saavedra Vaz
c8dd4b068d arch/xtensa/esp32s3: Add missing registers and definitions 2023-01-11 02:00:41 +08:00
Dong Heng
07342f7957 xtensa/esp32: SPI support to configure as R/W/RW mode 2023-01-11 01:54:36 +08:00
chao an
fdc3c44cc4 sched/group: fix task info heap-use-after-free
tg_info is still in use after task_uninit_info(), unifies
lib_stream_* with life cycle of task info to avoid this issue.

| ==1940861==ERROR: AddressSanitizer: heap-use-after-free on address 0xf47032e0 at pc 0x5676dc4f bp 0xf2f38c68 sp 0xf2f38c58
|
|#10 0xf7abec89 in __asan::__asan_report_load2 (addr=4100993760) at ../../../../src/libsanitizer/asan/asan_rtl.cpp:119
|#11 0x5677356a in nxsem_destroy (sem=0xf47032e0) at semaphore/sem_destroy.c:73
|#12 0x56773695 in sem_destroy (sem=0xf47032e0) at semaphore/sem_destroy.c:120
|#13 0x5676faa2 in nxmutex_destroy (mutex=0xf47032e0) at include/nuttx/mutex.h:126
|#14 0x567a3430 in lib_stream_release (group=0xf4901ba0) at stdio/lib_libstream.c:98
|#15 0x5676da75 in group_release (group=0xf4901ba0) at group/group_leave.c:162
|#16 0x5676e51c in group_leave (tcb=0xf5377740) at group/group_leave.c:360
|#17 0x569fe79b in nxtask_exithook (tcb=0xf5377740, status=0) at task/task_exithook.c:455
|#18 0x569f90b9 in _exit (status=0) at task/exit.c:82
|#19 0x56742680 in exit (status=0) at stdlib/lib_exit.c:61
|#20 0x56a69c78 in iperf_showusage (progname=0xf2f28838 "iperf", exitcode=0) at iperf_main.c:91
|#21 0x56a6a6ec in iperf_main (argc=1, argv=0xf2f28830) at iperf_main.c:140
|#22 0x5679c148 in nxtask_startup (entrypt=0x56a69c78 <iperf_main>, argc=1, argv=0xf2f28830) at sched/task_startup.c:70
|#23 0x56767f58 in nxtask_start () at task/task_start.c:134

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-11 01:53:59 +08:00
raiden00pl
88dd705d27 stm32/stm32f7 CANv1: protect TX buffer during CAN error frame generation
Follow up to eb240e0 (PR #8060)
2023-01-11 01:53:49 +08:00
Alin Jerpelea
904624d73b documentation: Add release notes for 12.0.0 release
This is a local copy taken from the confluence notes
https://cwiki.apache.org/confluence/display/NUTTX/NuttX+12.0.0

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2023-01-11 01:53:23 +08:00
Ville Juven
f730cf8ad8 fs/poll: Fix poll_notify for CONFIG_BUILD_KERNEL
With flat addressing the user pollfd list is given directly to the
drivers that perform the notification. This is fine when the addressing
is flat, as there is no ambiguity on who gets notified and the fds memory
is always mapped.

For kernel mode with MMU this does not work. The notification must be done
via a temporary buffer allocated from kernel memory.

Thus, create a copy of the user fds and pass the copy to the drivers.
Afterwards copy the output events back to the user.
2023-01-11 01:53:13 +08:00
Jukka Laitinen
3ea7a6fb77 mm/shm: Clean up the System-V shm driver
Move shmdt functionality into shm_unmap, and use shm_unmap as the common
detach function.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 23:24:50 +08:00
chao an
eef818e51f risc-v/esp32c3: correct receive buffer size
1. correct receive buffer size, d_len should keep the l2 header size
2. fix race condition issue of de/enqueue rx queue

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-10 11:28:06 -03:00
zhangyuan21
e34f79aa28 libc: don't redefined __ARM_ARCH_XXX when __ARM_ARCH defined
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-10 14:58:35 +02:00
Jukka Laitinen
b8f23fc3f7 Move rammaps to use mm_map list
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 18:34:25 +08:00
Jukka Laitinen
a5ed8014e8 Move anonymous mapping emulation into own module under fs/mmap
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 18:34:25 +08:00
Jukka Laitinen
dd97900221 fs/mmap: Add mappings to mm_map list if CONFIG_MM_MAP is defined
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 18:34:25 +08:00
Jukka Laitinen
5150979488 mm/shm: Remove gs_vaddr from task group and use dynamic vm_map instead
Replace static gs_vaddr with a new dynamic mapping list. Collecting all
this kind of virtual memory mappings into a single structure makes
things more consistent.

This still leaves the task group specific granule alloocator, gs_handle,
in the task group

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 18:34:25 +08:00
Jukka Laitinen
7f8bec7070 Add mm/mm_map virtual memory mapping list
The task_group specific list can be used to store information about
mmappings.

For a driver or filesystem performing mmap can also enable munmap by
adding an item to this list using mm_map_add(). The item is then
returned in the corresponding munmap call.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 18:34:25 +08:00
Jukka Laitinen
6e4ddf78bb include/nuttx/mm/map.h: Change mm_map_entry "priv" into union type
To be able to directly store also other than pointer types

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 18:34:25 +08:00
chengkai
f864e5f657 wireless/bluetooth: add interrupt_context hander for netsnoop
Signed-off-by: chengkai <chengkai@xiaomi.com>
2023-01-10 18:08:22 +08:00
Carlos Sanchez
eb240e014c stm32: protect TX buffer during CAN error frame generation. 2023-01-10 13:33:35 +08:00
田昕
587305723e drivers/pipe:add PIPEIOC_POLLTHRES to set POLLIN/POLLOUT threshold
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2023-01-10 13:33:13 +08:00
zhangyuan21
fae5aef4fe libc: add arm64 libc function
Porting memory and string optimize functions from newlib and bionic

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-10 11:31:26 +08:00
zhangyuan21
f8f29c8147 libc: add risc-v libc function
Porting memory and string optimize functions from newlib and bionic

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-10 11:31:26 +08:00
zhangyuan21
fc9aeb8c70 libc: add armv7-r libc function
Porting memory and string optimize functions from newlib and bionic

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-10 11:31:26 +08:00
zhangyuan21
650f17169a libc: add armv7-a armv7-m armv8-m libc function
Porting memory and string optimize functions from newlib and bionic

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-10 11:31:26 +08:00
Petro Karashchenko
5f92c62874 boards/cxd56xx/spresense: add fs automount driver for SD Card
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-10 10:39:23 +09:00
Carlos Sanchez
78248183aa s32k1xx: reserve MSG_DATA extra space only when needed by config. 2023-01-09 21:06:56 +02:00
Carlos Sanchez
3c6d45fa99 s32k1xx: avoid buffer overflow when CAN time is used for non-FD CAN.
s32k1xx: fix initialization of MAXMB field in MCR.
2023-01-09 21:06:56 +02:00
Dong Heng
67ccee2c4f xtensa/esp32: ESP32 SPI Flash encryption supports 16-bytes align writing 2023-01-10 01:10:10 +08:00
wangbowen6
a491d07061 sem_unlink: return ENOENT when the named semaphore does not exist.
Follow posix, return ENOENT when the named semaphore does not
exist to fix the ltp open posix sem_unlink 4-1.c test problem.

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-01-09 22:46:30 +08:00
Sergey Nikitenko
e0f99d93ac stm32wb: add i2c driver 2023-01-09 09:27:17 +08:00
Zhe Weng
5e42bd97cd virtio/net: Try fix virtnet logic
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-09 10:10:49 +09:00
Xiang Xiao
6214f3cde7 mm/heap: Fix the minor style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-08 01:25:18 +02:00
Xiang Xiao
54de894e52 mm/heap: Skip memset backtrace buffer
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-08 01:25:18 +02:00
Xiang Xiao
70ecb4ef26 mm/heap: Changee mmchunk_handler_t to mm_node_handler_t
to unify the term usage(chunk v.s. node and mm v.s. mm_)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-08 01:25:18 +02:00
Xiang Xiao
9aa835815f fs/timerfd: Reverse truncate and mmap field
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-07 14:27:42 +02:00
chenwen@espressif.com
eed2cce3f2 xtensa/esp32: Optimize WLAN device buffer 2023-01-07 13:46:37 +08:00
chenwen@espressif.com
933d1a0a80 xtensa/esp32: Add Wi-Fi softap event 2023-01-06 12:25:36 -03:00
zhanghongyu
ec28082e5d arp.h: add some ARPHRD definition
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-06 22:20:19 +08:00
zhanghongyu
725a1f1e20 netlink: add RTA_MAX definition
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-06 22:20:19 +08:00