Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
97e7a14
u3: restages #6062 for release
joemfb Nov 18, 2022
622f86e
u3: misc cleanup of snapshot system
joemfb Nov 2, 2022
0959bb6
u3: coalesces memory protection when loading a snapshot
joemfb Nov 3, 2022
0682cc2
u3: refactors _ce_loom_blit_north(), replacing loop with a single read
joemfb Nov 3, 2022
a045215
u3: coalesces memory protection when saving a snapshot
joemfb Nov 3, 2022
1b5e808
u3: implements full demand paging for the home-road heap
joemfb Nov 3, 2022
b102cbb
u3: adds printf ("live: mapped ...") for demand paging
joemfb Nov 4, 2022
0f7feef
vere: adds --no-demand argument to disable demand paging
joemfb Nov 4, 2022
6c4b102
vere: supports --no-demand for all relevant subcommands
joemfb Nov 18, 2022
2e57625
Merge tag 'urbit-v1.13' into jb/restage/pread-all
joemfb Nov 23, 2022
ea6f239
Merge tag 'urbit-v1.13' into jb/restage/demand
joemfb Nov 23, 2022
a90c850
u3: add comment explaining willoc logic
philipcmonk Nov 28, 2022
50243ed
Merge branch 'jb/restage/pread-all' into jb/release/vere
joemfb Nov 30, 2022
7ca9eba
u3: updates memory protections and page metadata when moving guard page
joemfb Nov 30, 2022
d94d6d3
Merge branch 'jb/release/vere' into jb/restage/demand
joemfb Nov 30, 2022
775e371
vere: updates whereami dep to support OpenBSD
jamesacklin Dec 2, 2022
fee5037
u3: document snapshot system invariants
joemfb Dec 2, 2022
d1d1860
u3: cleanup comments about snapshot system limitations
joemfb Dec 2, 2022
c111129
u3: adds new, batch page tracking implementations + tests
joemfb Dec 2, 2022
a7022e7
u3: enforce snapshot invariants on segment truncation
joemfb Dec 2, 2022
62a575f
u3: switch page size constants to macros to avoid VLAs
joemfb Dec 2, 2022
9d34ff6
Merge pull request #6108 from urbit/philip/willoc-comment
joemfb Dec 2, 2022
331c20b
Merge pull request #6121 from urbit/ja/openbsd-7.2-fix
joemfb Dec 2, 2022
ff81dbc
Merge pull request #6125 from urbit/jb/ward-safely
joemfb Dec 2, 2022
cdd01ec
Merge pull request #6126 from urbit/jb/snapshot-invariants
joemfb Dec 2, 2022
e981901
Merge branch 'jb/restage/demand' into jb/release/vere
joemfb Dec 2, 2022
66c54ad
u3: protect guard page if necessary after remapping loom
joemfb Nov 14, 2022
5693c96
u3: protect guard page if necessary after reprotecting loom
joemfb Dec 2, 2022
867f062
Merge pull request #6127 from urbit/jb/guard-always-again
joemfb Dec 2, 2022
15c4ae7
u3: updates guard-page assertion to account for variable loom sizes
joemfb Dec 2, 2022
95a2e06
test: re-disables ames decryption test to avoid bail:evil in ci
joemfb Dec 2, 2022
7870024
test: re-disables failing grq test
joemfb Dec 2, 2022
1ac2264
test: renames nock-tests to meme-tests
joemfb Nov 10, 2022
4620212
u3: removes u3e_foul()
joemfb Dec 6, 2022
bceb9cd
u3: stop using u3P.dir_c outside of events.c
joemfb Dec 7, 2022
39d0250
u3: move directory creation out of events.c
joemfb Dec 7, 2022
f5fdaa2
u3: automatically place the guard page in u3e_live()
joemfb Dec 7, 2022
5726f08
u3: simplifies road stack adjustment after snapshot load
joemfb Dec 7, 2022
12229a5
u3: adds snapshot facade to manage.c
joemfb Dec 8, 2022
54e591b
u3: simplifies u3e_live() signature
joemfb Dec 8, 2022
e378b49
u3: fixes compile-time conditionals around guard page impl
joemfb Dec 10, 2022
9fe6f3d
u3: refactors loom protect-south page-length calculation
joemfb Dec 10, 2022
4659b92
u3: factors out individual page protections
joemfb Dec 13, 2022
d043a42
u3: reimplements guard page w/out posts
joemfb Dec 13, 2022
c3821c3
u3: adds facade for u3e_fault(), refactors error handling
joemfb Dec 13, 2022
973cea6
u3: refactors u3e_save() facade and watermark calculations
joemfb Dec 13, 2022
ebf0ab4
u3: adds facade for u3e_ward(), refactors watermarks
joemfb Dec 13, 2022
af8607f
u3: adds comments to road pave implementations
joemfb Dec 13, 2022
6cab63d
Merge pull request #6152 from urbit/jb/events-interface
joemfb Dec 13, 2022
a8daded
vere: bumps version
joemfb Dec 13, 2022
5d4142e
u3: ports minor noun/ cleanup
joemfb Dec 14, 2022
535c49d
u3: factors out |mass-style memory measurement
joemfb Dec 13, 2022
fdafdf1
u3: ports new arvo invocations for boot and +poke
joemfb Dec 13, 2022
5a775d1
u3: ports meld measurement printfs
joemfb Dec 13, 2022
91f7818
vere: factors out sift/etch functions event serialization
joemfb Dec 14, 2022
99a8ccd
vere: ports synchronous lmdb iterator
joemfb Dec 13, 2022
9daab2f
vere: ports synchronous event log iterator
joemfb Dec 14, 2022
a5362f2
vere: ports u3_disk_read_list()
joemfb Dec 14, 2022
c15b822
mars: adds replay implementation
joemfb Dec 14, 2022
67ef111
vere: updates command docs
joemfb Dec 14, 2022
82d5738
vere: adds dedicated replay command: play
joemfb Dec 14, 2022
3843c60
vere: adds full replay option to play subcommand
joemfb Dec 14, 2022
a788071
vere: adds --auto-meld for play subcommand
joemfb Dec 14, 2022
98aa6ee
Merge pull request #6159 from urbit/jb/mars/play
joemfb Dec 15, 2022
8e67753
mars: fix bail:meme retry counter
joemfb Dec 15, 2022
e0320dd
vere: bumps version
joemfb Dec 15, 2022
f8394b9
ci: only save version string and setup gcp if we're uploading binaries
joemfb Dec 15, 2022
967f600
ci: updates gcp integration for setting release version strings
joemfb Dec 15, 2022
0901538
ci: updates gcp integration for uploading tarballs
joemfb Dec 15, 2022
f4235eb
vere: handle ctrl-z like ctrl-c in play command
joemfb Dec 16, 2022
f7fd944
mars: cleanup event log on exit
joemfb Dec 16, 2022
8671d30
u3: make the fault handler robust against initialization reorder
joemfb Dec 16, 2022
124aec6
term: skip prompt refresh on ^c under -t
joemfb Nov 16, 2022
f095679
Merge pull request #6167 from joemfb/ctrl-z-replay
joemfb Dec 16, 2022
4d08d87
vere: make full replay (play -f) command bypass corruption
joemfb Dec 16, 2022
4b5494f
vere: fix "queu" command argument parsing
joemfb Dec 16, 2022
fb9037a
Merge pull request #6168 from urbit/jb/replay-tools
joemfb Dec 16, 2022
aa83de5
vere: bumps version
joemfb Dec 16, 2022
1f84fcf
vere: fix queu short-args parsing
joemfb Dec 16, 2022
4e9de85
vere: refactors http server init for better error messages
joemfb Dec 16, 2022
9a16d67
Merge branch 'master' into jb/release/vere
joemfb Dec 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/tarballs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ jobs:
name: ${{ secrets.CACHIX_NAME }}
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}

- uses: google-github-actions/[email protected]
- uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}

- uses: google-github-actions/setup-gcloud@v1
with:
version: '290.0.1'
service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}
project_id: ${{ secrets.GCS_PROJECT }}
export_default_credentials: true

- run: nix-build -A tarball --arg enableStatic true

Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/vere.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,14 @@ jobs:
echo -n "$version" > ./version-string

- name: upload version string artifact
if: matrix.type == 'linux'
if: inputs.upload && matrix.type == 'linux'
uses: actions/upload-artifact@v3
with:
name: version-string
path: version-string

- uses: google-github-actions/auth@v1
if: inputs.upload
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}

Expand Down Expand Up @@ -244,12 +245,13 @@ jobs:
needs: [urbit, mingw]
if: inputs.upload
steps:
- uses: google-github-actions/[email protected]
- uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}

- uses: google-github-actions/setup-gcloud@v1
with:
version: '290.0.1'
service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}
project_id: ${{ secrets.GCS_PROJECT }}
export_default_credentials: true

- name: download version-string
uses: actions/download-artifact@v3
Expand Down
3 changes: 2 additions & 1 deletion pkg/urbit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include config.mk
compat_mks := $(foreach dir,$(compat),$(wildcard compat/$(dir)/*.mk))
include $(compat_mks)

c = $(wildcard c/*.c)
jets = jets/tree.c $(wildcard jets/*/*.c)
noun = $(wildcard noun/*.c)
ur = $(wildcard ur/*.c)
Expand All @@ -13,7 +14,7 @@ bench = $(wildcard bench/*.c)

compat := $(foreach dir,$(compat),$(wildcard compat/$(dir)/*.c))

common = $(jets) $(noun) $(ur) $(vere) $(compat)
common = $(c) $(jets) $(noun) $(ur) $(vere) $(compat)
headers = $(shell find include -type f)

common_objs = $(shell echo $(common) | sed 's/\.c/.o/g')
Expand Down
4 changes: 1 addition & 3 deletions pkg/urbit/bench/ur_bench.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
static void
_setup(void)
{
u3m_init(1 << 24);
u3m_pave(c3y);
u3e_init();
u3m_boot_lite(1 << 24);
}

/* _ames_writ_ex(): |hi packet from fake ~zod to fake ~nec
Expand Down
96 changes: 96 additions & 0 deletions pkg/urbit/c/defs.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/// @file defs.c

#include "c/defs.h"

/* c3_pread(): full positioned read(), up to eof, retrying errors.
*/
ssize_t
c3_pread(c3_i fid_i, void* buf_v, size_t len_i, off_t off_i)
{
c3_w max_w = 128;
c3_w try_w = 0;
size_t rem_i = len_i;
ssize_t ret_i;

do {
if ( (0 > (ret_i = pread(fid_i, buf_v, rem_i, off_i)))
&& ( (++try_w == max_w)
|| ( (EINTR != errno)
&& (EAGAIN != errno)
&& (EWOULDBLOCK != errno) )))
{
return -1;
}
else if ( 0 == ret_i ) {
break;
}
else {
buf_v = (void*)((c3_c*)buf_v + ret_i);
rem_i -= ret_i;
off_i += ret_i;
}

}
while ( rem_i );

return len_i - rem_i;
}

/* c3_pwrite(): full positioned write(), retrying errors.
*/
ssize_t
c3_pwrite(c3_i fid_i, const void* buf_v, size_t len_i, off_t off_i)
{
c3_w max_w = 128;
c3_w try_w = 0;
size_t rem_i = len_i;
ssize_t ret_i;

do {
if ( (0 > (ret_i = pwrite(fid_i, buf_v, rem_i, off_i)))
&& ( (++try_w == max_w)
|| ( (EINTR != errno)
&& (EAGAIN != errno)
&& (EWOULDBLOCK != errno) )))
{
return -1;
}
else {
buf_v = (void*)((c3_c*)buf_v + ret_i);
rem_i -= ret_i;
off_i += ret_i;
}
}
while ( rem_i );

return len_i;
}

/* c3_write(): full write(), retrying errors.
*/
ssize_t
c3_write(c3_i fid_i, const void* buf_v, size_t len_i)
{
c3_w max_w = 128;
c3_w try_w = 0;
size_t rem_i = len_i;
ssize_t ret_i;

do {
if ( (0 > (ret_i = write(fid_i, buf_v, rem_i)))
&& ( (++try_w == max_w)
|| ( (EINTR != errno)
&& (EAGAIN != errno)
&& (EWOULDBLOCK != errno) )))
{
return -1;
}
else {
buf_v = (void*)((c3_c*)buf_v + ret_i);
rem_i -= ret_i;
}
}
while ( rem_i );

return len_i;
}
57 changes: 57 additions & 0 deletions pkg/urbit/compat/mingw/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,63 @@ int link(const char *path1, const char *path2)
return -1;
}

ssize_t pread(int fd, void *buf, size_t count, off_t offset)
{
DWORD len = 0;

OVERLAPPED overlapped = {0};

overlapped.OffsetHigh = (sizeof(off_t) <= sizeof(DWORD)) ?
(DWORD)0 : (DWORD)((offset >> 32) & 0xFFFFFFFFL);
overlapped.Offset = (sizeof(off_t) <= sizeof(DWORD)) ?
(DWORD)offset : (DWORD)(offset & 0xFFFFFFFFL);

HANDLE h = (HANDLE)_get_osfhandle(fd);

if ( INVALID_HANDLE_VALUE == h ) {
errno = EBADF;
return -1;
}

if ( !ReadFile(h, buf, count, &len, &overlapped) ) {
DWORD err = GetLastError();

if ( ERROR_HANDLE_EOF != err ) {
errno = err_win_to_posix(err);
return -1;
}
}

return (ssize_t)len;
}

ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset)
{
DWORD len = 0;

OVERLAPPED overlapped = {0};

overlapped.OffsetHigh = (sizeof(off_t) <= sizeof(DWORD)) ?
(DWORD)0 : (DWORD)((offset >> 32) & 0xFFFFFFFFL);
overlapped.Offset = (sizeof(off_t) <= sizeof(DWORD)) ?
(DWORD)offset : (DWORD)(offset & 0xFFFFFFFFL);

HANDLE h = (HANDLE)_get_osfhandle(fd);

if ( INVALID_HANDLE_VALUE == h ) {
errno = EBADF;
return -1;
}

if ( !WriteFile(h, buf, count, &len, &overlapped) ) {
errno = err_win_to_posix(GetLastError());
return -1;
}

return (ssize_t)len;
}


// from msys2 mingw-packages-dev patches
// -----------------------------------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions pkg/urbit/compat/mingw/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#define mkdir(A, B) mkdir(A)

int link(const char *path1, const char *path2);
ssize_t pread(int fd, void *buf, size_t count, off_t offset);
ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
char *realpath(const char *path, char *resolved_path);
int fdatasync(int fd);
int utimes(const char *path, const struct timeval times[2]);
Expand Down
2 changes: 1 addition & 1 deletion pkg/urbit/compat/mingw/seh_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ EXCEPTION_DISPOSITION _mingw_exception_filter(
{
if (ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION &&
ExceptionRecord->ExceptionInformation[0] == 1 &&
u3e_fault((void*)ExceptionRecord->ExceptionInformation[1], 1))
u3m_fault((void*)ExceptionRecord->ExceptionInformation[1], 1))
{
return ExceptionContinueExecution;
}
Expand Down
Loading