<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/arch/sandbox/cpu/os.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>sandbox: use env_get() for time offset instead of getenv()</title>
<updated>2025-09-24T17:03:24+00:00</updated>
<author>
<name>Osama Abdelkader</name>
<email>osama.abdelkader@gmail.com</email>
</author>
<published>2025-09-14T15:27:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8558aaa3cf9065ab5ec9a0b241ce567e7393dbc3'/>
<id>8558aaa3cf9065ab5ec9a0b241ce567e7393dbc3</id>
<content type='text'>
The sandbox time offset is intended to be controlled via the U-Boot
environment, not the host process environment. Update os_get_time_offset()
to use env_get() instead of the libc getenv().

Leave other getenv() uses (e.g. U_BOOT_PERSISTENT_DATA_DIR,
UBOOT_SB_FUZZ_TEST) unchanged, since those refer to host environment
variables needed by sandbox tests.

Signed-off-by: Osama Abdelkader &lt;osama.abdelkader@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The sandbox time offset is intended to be controlled via the U-Boot
environment, not the host process environment. Update os_get_time_offset()
to use env_get() instead of the libc getenv().

Leave other getenv() uses (e.g. U_BOOT_PERSISTENT_DATA_DIR,
UBOOT_SB_FUZZ_TEST) unchanged, since those refer to host environment
variables needed by sandbox tests.

Signed-off-by: Osama Abdelkader &lt;osama.abdelkader@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "sandbox: replace deprecated getenv() with env_get()"</title>
<updated>2025-09-12T22:57:39+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-09-12T22:34:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f0c1704f56dba70da93f30131564af777c29c1bd'/>
<id>f0c1704f56dba70da93f30131564af777c29c1bd</id>
<content type='text'>
While testing changes, I missed that Gitlab had failed CI with pytest
failures due to this change.

This reverts commit 4c822970d366415e717730606734e815993a70bb.

Cc: Osama Abdelkader &lt;osama.abdelkader@gmail.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While testing changes, I missed that Gitlab had failed CI with pytest
failures due to this change.

This reverts commit 4c822970d366415e717730606734e815993a70bb.

Cc: Osama Abdelkader &lt;osama.abdelkader@gmail.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: replace deprecated getenv() with env_get()</title>
<updated>2025-09-12T20:35:46+00:00</updated>
<author>
<name>Osama Abdelkader</name>
<email>osama.abdelkader@gmail.com</email>
</author>
<published>2025-09-02T22:24:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4c822970d366415e717730606734e815993a70bb'/>
<id>4c822970d366415e717730606734e815993a70bb</id>
<content type='text'>
use env_get() instead of getenv() for consistency.

Signed-off-by: Osama Abdelkader &lt;osama.abdelkader@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
use env_get() instead of getenv() for consistency.

Signed-off-by: Osama Abdelkader &lt;osama.abdelkader@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: Return error code from read/write/seek</title>
<updated>2024-08-09T22:03:19+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-08-07T22:47:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b254a8359ecdc8ec85cd93e055c6bbeee259df1d'/>
<id>b254a8359ecdc8ec85cd93e055c6bbeee259df1d</id>
<content type='text'>
The existing API for these functions is different from the rest of
U-Boot, in that any error code must be obtained from the errno variable
on failure. This variable is part of the C library, so accessing it
outside of the special 'sandbox' shim-functions is not ideal.

Adjust the API to return an error code, to avoid this. Update existing
uses to check for any negative value, rather than just -1.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The existing API for these functions is different from the rest of
U-Boot, in that any error code must be obtained from the errno variable
on failure. This variable is part of the C library, so accessing it
outside of the special 'sandbox' shim-functions is not ideal.

Adjust the API to return an error code, to avoid this. Update existing
uses to check for any negative value, rather than just -1.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: Fix a comment in os_find_u_boot()</title>
<updated>2024-08-09T22:03:19+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-08-07T22:47:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d9f1b00bc7f6145dd9f2951dd2dc140a4b0a5472'/>
<id>d9f1b00bc7f6145dd9f2951dd2dc140a4b0a5472</id>
<content type='text'>
Fix a missing dot in a comment, since '..' is confusing.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a missing dot in a comment, since '..' is confusing.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: Use const in os_jump_to_file()</title>
<updated>2024-08-09T22:03:19+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-08-07T22:47:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=46ef4e82200fcfdf156fc2374ffd3c8aa19dee79'/>
<id>46ef4e82200fcfdf156fc2374ffd3c8aa19dee79</id>
<content type='text'>
The argument array is not changed by the callee, so mark it const.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The argument array is not changed by the callee, so mark it const.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: Remove duplicate newlines</title>
<updated>2024-07-15T18:12:18+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2024-07-13T13:19:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2cd9466bedec4950d7291efa95f228c5150ee421'/>
<id>2cd9466bedec4950d7291efa95f228c5150ee421</id>
<content type='text'>
Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: use sane access rights for files</title>
<updated>2024-07-03T06:36:32+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2024-04-10T08:38:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d1fffbe3c808a9012a05b048560e17ce43f8ef9e'/>
<id>d1fffbe3c808a9012a05b048560e17ce43f8ef9e</id>
<content type='text'>
When writing an executable, allowing other users to modify it introduces
a security issue.

Generally we should avoid giving other users write access to our files by
default.

Replace chmod(777) by chmod(755) and chmod(644).

Fixes: 47f5fcfb4169 ("sandbox: Add os_jump_to_image() to run another executable")
Fixes: d9165153caea ("sandbox: add flags for open() call")
Fixes: 5c2859cdc302 ("sandbox: Allow reading/writing of RAM buffer")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When writing an executable, allowing other users to modify it introduces
a security issue.

Generally we should avoid giving other users write access to our files by
default.

Replace chmod(777) by chmod(755) and chmod(644).

Fixes: 47f5fcfb4169 ("sandbox: Add os_jump_to_image() to run another executable")
Fixes: d9165153caea ("sandbox: add flags for open() call")
Fixes: 5c2859cdc302 ("sandbox: Allow reading/writing of RAM buffer")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: don't call os_close with invalid file descriptor</title>
<updated>2024-04-17T23:06:16+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2024-04-10T21:50:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2c3fa4b8add3cb6a440184ab67debc6867d383c0'/>
<id>2c3fa4b8add3cb6a440184ab67debc6867d383c0</id>
<content type='text'>
If open() fails it returns -1. Calling close() with this value
makes no sense. Return -EIO instead.

Addresses-Coverity-ID: 185828 Improper use of negative value
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Fixes: 566bf3a8698 ("sandbox: Add a function to read a host file")
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If open() fails it returns -1. Calling close() with this value
makes no sense. Return -EIO instead.

Addresses-Coverity-ID: 185828 Improper use of negative value
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Fixes: 566bf3a8698 ("sandbox: Add a function to read a host file")
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'v2024.01-rc3' into next</title>
<updated>2023-11-20T14:19:50+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2023-11-20T14:19:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dca7a8958f8d0dbd53072caa4353353e062d80ca'/>
<id>dca7a8958f8d0dbd53072caa4353353e062d80ca</id>
<content type='text'>
Prepare v2024.01-rc3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare v2024.01-rc3
</pre>
</div>
</content>
</entry>
</feed>
