Skip to content

{bp-19854} fs/vfs/fs_read.c: Allow NULL iov_base when CONFIG_ARCH_TEXT_VBASE == 0 - #20068

Merged
xiaoxiang781216 merged 1 commit into
apache:releases/13.0from
jerpelea:bp-19854
Sep 7, 2026
Merged

{bp-19854} fs/vfs/fs_read.c: Allow NULL iov_base when CONFIG_ARCH_TEXT_VBASE == 0#20068
xiaoxiang781216 merged 1 commit into
apache:releases/13.0from
jerpelea:bp-19854

Conversation

@jerpelea

@jerpelea jerpelea commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

For kernel builds where CONFIG_ARCH_TEXT_VBASE is set to 0, allow a NULL buffer in file_readv() to prevent ELF binary loading failures for binaries located at address 0.

This fix was originally introduced in #18830, but was inadvertently reverted by someone unaware that platforms with CONFIG_ARCH_TEXT_VBASE equal to 0 cannot function at all without it. This commit restores the necessary check to prevent regressions in zero-based text kernel configurations. Most platforms remain completely unaffected since only about 5 boards utilize a text virtual base of zero.

Impact

RELEASE

Testing

CI

For kernel builds where CONFIG_ARCH_TEXT_VBASE is set to 0, allow a NULL
buffer in file_readv() to prevent ELF binary loading failures for
binaries located at address 0.

This fix was originally introduced in apache#18830, but was inadvertently
reverted by someone unaware that platforms with CONFIG_ARCH_TEXT_VBASE
equal to 0 cannot function at all without it. This commit restores the
necessary check to prevent regressions in zero-based text kernel
configurations. Most platforms remain completely unaffected since only
about 5 boards utilize a text virtual base of zero.

Signed-off-by: Lwazi Dube <lwazeh@gmail.com>
@github-actions github-actions Bot added Area: File System File System issues Size: XS The size of the change in this PR is very small labels Sep 7, 2026
@jerpelea

jerpelea commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

CI fix
apache/nuttx-apps#3775

@xiaoxiang781216
xiaoxiang781216 merged commit e32faab into apache:releases/13.0 Sep 7, 2026
23 of 41 checks passed
@jerpelea
jerpelea deleted the bp-19854 branch September 7, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: File System File System issues Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants