ligd
fcdb6444ad
mm: idle check heap use mm_trysemaphore
...
Change-Id: I92e1df572fa6cd801b10e5b06e7b04d450b3e3fb
Signed-off-by: ligd <liguiding1@xiaomi.com>
(cherry picked from commit bc9a5d1ca9656f6effd3a419cc2488586dfb1489)
2021-04-16 20:56:44 +08:00
ligd
e3b05bbd14
net/tcp: fix tcp crash when net meet popen syscall
...
tcp_close_monitor should free all the connevents which
belong to current psock
Change-Id: Ifc625d7bc44a02930921d75975cb9b5835c2deeb
Signed-off-by: ligd <liguiding1@xiaomi.com>
(cherry picked from commit 7134b1df4aa91fe4f2575cd9c2322d36710865dc)
2021-04-15 22:07:26 +08:00
ligd
1b2850b840
fs/procfs: fix heap overflow when snprintf meet long string
...
Change-Id: I90f2d9fab55b6e69f159855af3d6dbcb81142eb8
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-04-15 22:07:22 +08:00
liuhaitao
8809e13f8e
sim: correct miwear config symlink since project replaced
...
Change-Id: I3786d82710cf24de567fccf88ced9b4cb80703a9
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-04-14 22:14:59 +08:00
mage1
2a08dc1685
add #undef for some stdlibc api.
...
Change-Id: I6253a9231af8809e8362f4bc5a1bd67fb094c3b0
2021-04-14 15:46:28 +08:00
Jiuzhu Dong
09bdee7713
net/arp: Fix memory corruption in arp_send()
...
Summary:
- In arp_send(), arp_wait_setup() adds a notify object to g_arp_waiters
which is removed in arp_wait() in normal case.
- However, in timeout and error cases, the object was not removed and
caused memory corruption.
- This commit fixes this issue.
Impact:
- None
Testing:
- Tested with spresense:rndis_smp
Change-Id: I55e56661b7ff665171805af9106f3a04cc2c3cad
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-04-13 20:14:23 +08:00
Jiuzhu Dong
903d472f78
net/arp: Fix a potential bug in arp_notify()
...
Summary:
- In arp_wait_setup() and arp_wait_cancel(), g_arp_waiters
is protected by a critical section.
- However, I noticed that arp_notify() does not protect the
g_arp_waiters that would cause memory corruption
- This commit fixes the issue.
Impact:
- None
Testing:
- Tested with spresense:rndis_smp, spresense:rndis
Change-Id: I3e13d556dea0934f1d0edd6451ad2e51a86dfeed
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-04-13 20:13:59 +08:00
Jiuzhu Dong
8327f4b825
execinfo: add cplusplus support
...
N/A
Change-Id: Ided2e01c6dcc2d556fe8bccbe036601000d27552
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-04-13 15:39:35 +08:00
Huang Qi
e395bced19
net: Rename IP_TTL to IP_TTL_DEFAULT
...
Since a SOL option IP_TTL exist, we should rename this IP_TTL
in netconfig.h to avoid confusion.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Ib04c36553f23bce8d362e97294a8b83eaa050cf3
2021-04-13 13:58:12 +08:00
Huang Qi
6b60279aaf
include/netinet: Add missing IP_TTL definition
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Ic0c4bcb840952a4ccf7f262306ba0c3d43e01811
2021-04-13 12:53:26 +08:00
Jiuzhu Dong
d64d558adb
get/setsockopt: change break to return OK to fix bug
...
N/A
Change-Id: Ie5ecf640bcba6137904fcf3a0a465b2bc5d1cb92
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-04-09 23:17:48 +08:00
liuhaitao
97240b494d
libc/time: add strptime porting support
...
lib_strptime.c copies from android bionic/libc/tzcode.
Change-Id: Ia4fadacd8e92e97ef3606ee2017d3bdd83370180
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-04-09 18:27:08 +08:00
Xu Xingliang
f8c5fe24fb
net: Forward socket option only when the socket type is usrsock
...
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
Change-Id: I5e102c4c648936f96834120e2c508f7072436246
2021-04-09 16:58:55 +08:00
Jiuzhu Dong
d3843bf334
lirc: fix bug about lirc_raw_event
...
N/A
Change-Id: If00d0a7e4e4f9a0d9119b6a170cffd993f23f71a
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-04-09 12:28:54 +08:00
Peter Bee
487101234b
libc/sendfile: fix lib_sendfile() partial send
...
MIRTOS-482
Fixing the behavior of sending only a few bytes of a file
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
Change-Id: Ieae600028b79794ede3ac576c2cd015d8df58b05
2021-04-08 14:53:11 +08:00
chao.an
48b129f412
Revert "armv8-m: Fix EXC_RETURN for non-secure usage"
...
This reverts commit 2ecfddb430 .
Change-Id: I9c01dc9b6eada54642787c8a3395cb32c8c4f7d4
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-04-07 18:37:03 +08:00
Xiang Xiao
a2ac63996c
arch/arm: Remove g_irqtmp, g_undeftmp and g_aborttmp
...
to avoid multiple CPU access them concurrently in SMP case
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-06 22:51:12 +08:00
Xiang Xiao
da53ed53f9
arch/armv7-r: Add FIQ stack CONFIG_ARCH_INTERRUPTSTACK > 7
...
just like what has done on armv7-a
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-06 22:50:17 +08:00
Xiang Xiao
f7ce5bf264
arch/armv7-a: Remove the special process of the nest level
...
it shouldn't need anymore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-06 22:50:17 +08:00
Xiang Xiao
d4a6f5d2d4
arch/arm: Minor style fix
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-06 22:50:17 +08:00
Alin Jerpelea
5b1a004f96
arch: arm: armv7-r: fix nxstyle errors
...
Fix nxstyle errors to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Change-Id: I61034059d1299b93ca36f5ad06fa94a215ae9d7e
2021-04-06 22:48:46 +08:00
Alin Jerpelea
320d334d59
arch: arm: armv7-r: Author Gregory Nutt: update licenses to Apache
...
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-06 22:47:43 +08:00
chao.an
f3c1a530fe
fs/inode: correct the return value
...
Change-Id: I597c1eb5899eb8f933c50fdfa5abeeb0acf5f37f
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-04-06 18:18:49 +08:00
Xiang Xiao
bab1221108
arch/arm: Fix the style issue in assemble files
...
remove the unused header file and mimic the difference between sub arch
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-06 17:39:25 +08:00
Alin Jerpelea
aa2d97d356
arch: arm: armv8-m: fix nxstyle errors
...
Fix nxstyle errors to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-06 17:38:44 +08:00
Alin Jerpelea
005d8390e6
arch: arm: armv7-m: fix nxstyle errors
...
Fix nxstyle errors to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-06 17:38:44 +08:00
Alin Jerpelea
4d47f63047
arch: arm: armv7-a: fix nxstyle errors
...
Fix nxstyle errors to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Change-Id: Ic7a7ea8ebb666c44e848cc5e05caebde2b2dc09a
2021-04-06 17:36:09 +08:00
Alin Jerpelea
c56759f229
arch: arm: armv7-a: Author Gregory Nutt: update licenses to Apache
...
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-06 17:36:09 +08:00
Alin Jerpelea
832555e8f8
arch: arm: armv6-m: fix nxstyle errors
...
Fix nxstyle errors to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-06 17:36:09 +08:00
Michael Jung
2ecfddb430
armv8-m: Fix EXC_RETURN for non-secure usage
...
With TrustZone support in armv8-m the bit-fields in EXC_RETURN have been
extended. Bit 6 ('S') now specifies whether the interrupted program was
running in the Non-Secure (S=0) or Secure (S=1) security state.
Furthermore, Bit 0 ('ES' - Exception Secure) specifies the
security state athe exception is taken to (0: Non-Secure, 1: Secure).
When NuttX is run together with TrustedFirmware-M as the application in
the non-secure world both the S and the ES bits have to be set to '0'.
For armv8-m those are also the correct values if TrustZone is not
implemented on the respective MCU or if it is disabled.
Signed-off-by: Michael Jung <mijung@gmx.net>
2021-04-06 17:33:28 +08:00
Xiang Xiao
037dd2acf4
mm/tlfs: Remove the critical section
...
follow the mm heap change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic9700e7ab3629d755723ad8b1c5b1c5cc896a518
2021-04-06 15:37:55 +08:00
Xiang Xiao
0d12e8bae5
libc/assert: Reference the expression in all case
...
to avoid the warning "defined but not used"
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I55b7c092d0f2e5882fc1784987657c10cdf2d90b
2021-04-06 14:47:51 +08:00
Xiang Xiao
d7adcfd2b9
Refine UNUSED macro to avoid any side effect
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I35d858fc6fb2e0e24b993ab7dd2203c9dd35232a
2021-04-06 14:46:28 +08:00
Xiang Xiao
64cc68b588
vfs/lfs: Simplify the lookahead_size equation
...
the final result is same(keep 8 bytes alignment)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I664879960c898a7f1518236b24a2b3ee8a9998d0
2021-04-02 21:45:09 +08:00
Xiang Xiao
a616515585
fs/lfs: Update version to 2.4.0
...
And redirect assert and log to NuttX's version
which is possible after:
commit c0cc0a417e727764ccce6f1284e3570898d750e6
Author: Christopher Haster <chaster@utexas.edu>
Date: Mon Jan 18 14:01:53 2021 -0600
Enabled overriding of LFS_ASSERT/TRACE/DEBUG/etc
This is useful for testing the new erroring assert behavior in CI.
Asserts do not error by default, so this macro needs to be overriden.
It is possible to test this behavior using the existing option of
overriding lfs_util.h with a custom file, by using a small sed
one-line script. But this is much simpler.
This does raise the question if more of the configuration options in
lfs_util.h should be opened up for function-like macro overrides.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie70814e1a2777e19a7310358d3a94ff965287d7b
2021-04-02 21:45:09 +08:00
ligd
df648f72c8
sim: add setitimer to nuttx-names.in
...
Change-Id: Id6d91d81b3d67cbe9215eb94f4ef394d61156fe8
2021-04-02 12:59:43 +08:00
ligd
0dfe02e842
sim: fix host_sleep unit error
...
Change-Id: Iaddd6381eb9870b709147d33b36482ae2e37c04d
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-04-01 18:12:56 +08:00
ligd
f82d5787b6
sim/up_oneshot.c: take host time as current
...
Change-Id: I34625f3d3f9557a103017124388dba6104aba7cc
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-04-01 18:11:37 +08:00
ligd
099c919d2e
sim: remove CONFIG_SIM_WALLTIME fast timing maybe harmful for IOs
...
Change-Id: Ic4ff5ec0aa99d2d229a07c4d1a9a4dae738d3cd9
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-04-01 18:11:37 +08:00
chao.an
177635dda3
libc/execinfo: add dump_stack support
...
Change-Id: I8485bd36caf09341ce5a787ec8cce7883e46043d
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-31 17:57:15 +08:00
chao.an
3330b95042
libc/execinfo: add backtrace support
...
Change-Id: I2fa28fcfba359eb4e5118881f10cc194ebb6c298
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-31 17:17:07 +08:00
丁欣童
0e33818954
Add include header file <sys/types.h> to rpmsg.h.
...
N/A
When use netpacket/rpmsg.h,the compiler prompt that sa_family_t is not defined.
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: Id2a0c51f992cca43917587423201ab27b92ed54f
2021-03-31 14:07:39 +08:00
Huang Qi
66516a8a7e
sys/socket.h: Add "Socket"-level control message types
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: I05f8dd29501f6b06cdd278e0e416f210a98aa6b0
2021-03-31 12:08:25 +08:00
Xiang Xiao
0ec76c44ca
sched/signal: Implement SA_NODEFER and SA_RESETHAND
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I9baa72b272c8877022cd94722824f393c7087721
2021-03-29 12:35:58 +08:00
Xiang Xiao
fabe4d1d10
sys/stat.h: Add S_IREAD, S_IWRITE and S_IEXEC macro
...
to be more compatible with BSD libc
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I4067f8cac6c465a3f1b06906e2e274a660792d93
2021-03-29 12:35:58 +08:00
Xiang Xiao
a6d4a69e1f
serial: Don't comment out ws_[x|y]pixel field from winsize struct
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3d2435c3950e8f60b50d9af8a54c65bd0d16f2e0
2021-03-29 12:35:58 +08:00
Xiang Xiao
8087067199
arm/machine: Sync with the latest newlib(1debd4d635c291c6da90)
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic616d616d9fa62b6dc19233258ab3099a402bad0
2021-03-29 12:35:58 +08:00
chao.an
4a26e4a592
net/local: correct the send return length
...
Change-Id: I8446c44f9cbcbf11bac4fcc9defbdfc4d09bba98
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-27 12:33:47 +08:00
chao.an
dc02221828
libc/string: Use Byte-Shift algorithm for very long needles
...
Reference here:
https://github.com/taleinat/byteshift_strstr
Change-Id: I1ef0676e01bea75e40ac688dcd50ef8b37c9a7e6
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-26 23:39:23 +08:00
YAMAMOTO Takashi
31819fba12
netdb.h: Add NI_MAXHOST and NI_MAXSERV
...
* These are not parts of the standards as far as I know.
* These are provided by many platforms. (GLIBC, BSD, Windows, etc)
* These are convenient.
2021-03-26 22:01:13 +08:00