Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Markdown
* [#16926](https://github.com/apache/nuttx/pull/16926) include/net/if.h: Add mechanism for MMD access with SIOCxMIIREG ioctls
* [#16628](https://github.com/apache/nuttx/pull/16628) net: Enable TCP/IP backlog by default
* [#16684](https://github.com/apache/nuttx/pull/16684) net/arp: avoid unnecessary ARP requests
* [#16905](https://github.com/apache/nuttx/pull/16905) net/can: fixes and cleanups
* [#16682](https://github.com/apache/nuttx/pull/16682) net/local: correct shutdown state when use UDP mode (To fix issue: https://github.com/apache/nuttx/issues/16555)
* [#16494](https://github.com/apache/nuttx/pull/16494) net/utils: avoid unalign access g_tcp_connections_buffer
* [#16585](https://github.com/apache/nuttx/pull/16585) net/utils: avoid unalign access g_tcp_connections_buffer
* [#16599](https://github.com/apache/nuttx/pull/16599) netdb/lib_dnsquery.c: prevent file descriptor leakage
* [#16606](https://github.com/apache/nuttx/pull/16606) netdb/lib_dnsquery.c: In the IPv6 or IPv4 dns_query_callback() block,…

Unsorted contributions

Markdown
* [#16644](https://github.com/apache/nuttx/pull/16644) espressif: update lower-half drivers
* [#16467](https://github.com/apache/nuttx/pull/16467) audio/comp: fix build warning caused by invalid return value
* [#16469](https://github.com/apache/nuttx/pull/16469) mcx-nxxx: Add LPI2C driver for mcx-nxxx architecture
* [#16474](https://github.com/apache/nuttx/pull/16474) syslog/rpmsg: disable force put char to lower putc
* [#16479](https://github.com/apache/nuttx/pull/16479) sensors/nau7802: Fix format warning
* [#16482](https://github.com/apache/nuttx/pull/16482) Fix i.MX93 ENET1 (EMAC) TXC muxing and RGMII-ID setting
* [#16483](https://github.com/apache/nuttx/pull/16483) Segger sysview improvements
* [#16486](https://github.com/apache/nuttx/pull/16486) add spin_lock_irqsave_nopreempt rspin_lock_irqsave_noprempt implement.
* [#16487](https://github.com/apache/nuttx/pull/16487) Fix arch perf events ifdef in alarm
* [#16489](https://github.com/apache/nuttx/pull/16489) Added support obtaining the unique id for the stm32f0l0g0 family
* [#16491](https://github.com/apache/nuttx/pull/16491) espressif[risc-v|xtensa]: Check events when reading PCNT counter value
* [#16492](https://github.com/apache/nuttx/pull/16492) add FDCAN support for STM32C0
* [#16493](https://github.com/apache/nuttx/pull/16493) RFC 5424 implementation for SYSLOG
* [#16495](https://github.com/apache/nuttx/pull/16495) minor stream improvement
* [#16496](https://github.com/apache/nuttx/pull/16496) improve libc/stream subsystem
* [#16500](https://github.com/apache/nuttx/pull/16500) Add ADC support for STM32G0 (along with oversampling)
* [#16508](https://github.com/apache/nuttx/pull/16508) riscv qemu-rv: fix kernel mapping by enabling CONFIG_MM_KMAP in knsh
* [#16509](https://github.com/apache/nuttx/pull/16509) Update the ELF guides
* [#16511](https://github.com/apache/nuttx/pull/16511) nuttx/spinlock: Define empty macro for spin_unlock
* [#16519](https://github.com/apache/nuttx/pull/16519) imx9/smp: Add SMP support for imx93
* [#16527](https://github.com/apache/nuttx/pull/16527) nxgdb/fs: fix exception when failed to parse symbol
* [#16533](https://github.com/apache/nuttx/pull/16533) Update MCUBoot build process for Espressif devices
* [#16540](https://github.com/apache/nuttx/pull/16540) qemu/armv8a: fastboot tcp defconfig + documentation.
* [#16549](https://github.com/apache/nuttx/pull/16549) Minor improve to stream
* [#16550](https://github.com/apache/nuttx/pull/16550) gitignore: add more vim swap files
* [#16552](https://github.com/apache/nuttx/pull/16552) spinlock: Better recursive spinlock implementation.
* [#16556](https://github.com/apache/nuttx/pull/16556) risc-v/mmu: Fix map_region() for incorrect page table setup when vadd…
* [#16562](https://github.com/apache/nuttx/pull/16562) esp32s3: update config and doc for fastboot
* [#16567](https://github.com/apache/nuttx/pull/16567) Move assemble soure files out off gnu folder
* [#16569](https://github.com/apache/nuttx/pull/16569) Refine vfs source file layout
* [#16571](https://github.com/apache/nuttx/pull/16571) remove warnings
* [#16574](https://github.com/apache/nuttx/pull/16574) audio/comp: fix build warning caused by invalid return value
* [#16578](https://github.com/apache/nuttx/pull/16578) syslog/rpmsg: disable force put char to lower putc
* [#16580](https://github.com/apache/nuttx/pull/16580) mcx-nxxx: Add LPI2C driver for mcx-nxxx architecture
* [#16582](https://github.com/apache/nuttx/pull/16582) sensors/nau7802: Fix format warning
* [#16583](https://github.com/apache/nuttx/pull/16583) Fix i.MX93 ENET1 (EMAC) TXC muxing and RGMII-ID setting
* [#16588](https://github.com/apache/nuttx/pull/16588) riscv qemu-rv: fix kernel mapping by enabling CONFIG_MM_KMAP in knsh …
* [#16591](https://github.com/apache/nuttx/pull/16591) Update MCUBoot build process for Espressif devices
* [#16595](https://github.com/apache/nuttx/pull/16595) risc-v/mmu: Fix map_region() for incorrect page table setup when vadd…
* [#16596](https://github.com/apache/nuttx/pull/16596) Fix arch perf events ifdef in alarm 
* [#16597](https://github.com/apache/nuttx/pull/16597) fix framebuffer config resolution.
* [#16604](https://github.com/apache/nuttx/pull/16604) [ESP32S3] Add LCD defconfig
* [#16615](https://github.com/apache/nuttx/pull/16615) debug/0 address: Add 0 address access panic configuration
* [#16618](https://github.com/apache/nuttx/pull/16618) Enhanced Kasan
* [#16619](https://github.com/apache/nuttx/pull/16619) arm64/v8r: support clang compilation
* [#16629](https://github.com/apache/nuttx/pull/16629) bugfix: share kernel thread group should not dup files from caller group
* [#16635](https://github.com/apache/nuttx/pull/16635) Add a header file as a dependency
* [#16651](https://github.com/apache/nuttx/pull/16651) Refactored the btuart_rxwork function to improve data reception stability.
* [#16654](https://github.com/apache/nuttx/pull/16654) imx9/lpuart: Fix race condition / regression in imx9_txint
* [#16671](https://github.com/apache/nuttx/pull/16671) sem/trywait/atomic: Fix the try wait abort by interrupted caused false failure report.
* [#16674](https://github.com/apache/nuttx/pull/16674) xtensa/espressif: Change LEDC implementation to common one
* [#16690](https://github.com/apache/nuttx/pull/16690) coredump: Fix missing loglevel to logmask conversion
* [#16700](https://github.com/apache/nuttx/pull/16700) sensors/bmi160,270: Fix a bug sensor_time is truncated
* [#16718](https://github.com/apache/nuttx/pull/16718) arm64/qemu: decouple qemu board from chip
* [#16735](https://github.com/apache/nuttx/pull/16735) espressif: fix MCUBoot OTA on Espressif devices.
* [#16754](https://github.com/apache/nuttx/pull/16754) espressif: PCNT: add high and low limit Kconfig options
* [#16765](https://github.com/apache/nuttx/pull/16765) nucleo-h743zi: Add ADC2 support and expand ADC channel list
* [#16769](https://github.com/apache/nuttx/pull/16769) esp32s3_extraheaps.c: add a missing include for xtensa_imm_initialize
* [#16771](https://github.com/apache/nuttx/pull/16771) crypto/cryptosoft: fix aadlen used uninitialized warning
* [#16773](https://github.com/apache/nuttx/pull/16773) add esp32s3-devkit:mbedtls kconfig
* [#16798](https://github.com/apache/nuttx/pull/16798) arm64: porting mu drv and scmi from arm imx9
* [#16807](https://github.com/apache/nuttx/pull/16807) bugix/risc-v/esp32c6: Fix build error of LP_I2C
* [#16813](https://github.com/apache/nuttx/pull/16813) Fix compilation errors with c++
* [#16819](https://github.com/apache/nuttx/pull/16819) Increase buffer sizes for uORB devices
* [#16830](https://github.com/apache/nuttx/pull/16830) h743zi/capture: add doc, defconfig & update make pipeline
* [#16839](https://github.com/apache/nuttx/pull/16839) crypto/hmac: Fix typo in function implementation names
* [#16843](https://github.com/apache/nuttx/pull/16843) pci: epf test default a function
* [#16845](https://github.com/apache/nuttx/pull/16845) sys/socket.h: wrap the outer layer of struct sockaddr_storage with aligned(SS_ALIGNSIZE)
* [#16852](https://github.com/apache/nuttx/pull/16852) risc-v/mpfs: usb: don't try nonexistent ep int flags
* [#16853](https://github.com/apache/nuttx/pull/16853) Mpfs map mtime in userspace
* [#16874](https://github.com/apache/nuttx/pull/16874) Add missing PSE52 interfaces
* [#16879](https://github.com/apache/nuttx/pull/16879) include/nuttx/compiler.h:

Compatibility Concerns

Markdown
* [#16499](https://github.com/apache/nuttx/pull/16499) [BREAKING] fs/vfs: Separate file descriptors from file descriptions

This PR is a rework of the NuttX file descriptor implementation. The goal is two-fold:

Improve POSIX compliance. The old implementation tied file description
to inode only, not the file struct. POSIX however dictates otherwise.
Fix a bug with descriptor duplication (dup2() and dup3()). There is
an existing race condition with this POSIX API that currently results
in a kernel side crash.
The crash occurs when a partially open / closed file descriptor is
duplicated. The reason for the crash is that even if the descriptor is
closed, the file might still be in use by the kernel (due to e.g. ongoing
write to file). The open file data is changed by file_dup3() and this
causes a crash in the device / drivers themselves as they lose access to
the inode and private data.

The fix is done by separating struct file into file and file descriptor
structs. The file struct can live on even if the descriptor is closed,
fixing the crash. This also fixes the POSIX issue, as two descriptors
can now point to the same file.

The implementation of this PR is based on the modifications made in #16361.
Thank you @pussuw

DEPENDS ON: apache/nuttx-apps#3091

IMPACT

Remove the FS_REFCOUNT config because reference counting is a very necessary feature 
that is required in many scenarios to ensure stability.
Rename the functions fs_getfilep, fs_putfilep, and fs_reffilep to file_get, file_put, 
and file_ref respectively, to unify the naming convention to file_xxx, such as file_open,
 file_ioctl, etc. 
Introduce a new fd (file descriptor) structure. If multiple file descriptors (fds) are in
 a dup relationship, they can share the same file entity to implement the dup functionality.
Modify the functions nx_close_from_tcb, nx_open_from_tcb, nx_dup2_from_tcb, 
and nx_dup3_from_tcb to fdlist_open, fdlist_close, fdlist_dup2, and fdlist_dup3 respectively,
 to uniformly operate on file descriptors using fdlist.

...