search for: check_magic

Displaying 11 results from an estimated 11 matches for "check_magic".

2013 Mar 15
0
[PATCH 4.1] Add DomU xz kernel decompression
...", + __FUNCTION__); + return -1; +} + static int xc_try_lzma_decode( struct xc_dom_image *dom, void **blob, size_t *size) { @@ -659,6 +686,17 @@ static int xc_dom_probe_bzimage_kernel(struct xc_dom_image *dom) return -EINVAL; } } + else if ( check_magic(dom, "\3757zXZ", 6) ) + { + ret = xc_try_xz_decode(dom, &dom->kernel_blob, &dom->kernel_size); + if ( ret < 0 ) + { + xc_dom_panic(dom->xch, XC_INVALID_KERNEL, + "%s unable to XZ decompress kernel", +...
2019 Sep 11
1
Re: [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.
...libnbd: debug: nbd5: nbd_connect_uri: poll start: events=1 nbdkit: debug: accepted connection nbdkit: full[1]: debug: newstyle negotiation: flags: global 0x3 libnbd: debug: nbd5: nbd_connect_uri: poll end: r=1 revents=1 libnbd: debug: nbd5: nbd_connect_uri: transition: MAGIC.RECV_MAGIC -> MAGIC.CHECK_MAGIC libnbd: debug: nbd5: nbd_connect_uri: transition: MAGIC.CHECK_MAGIC -> NEWSTYLE.START libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.START -> NEWSTYLE.RECV_GFLAGS libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.RECV_GFLAGS -> NEWSTYLE.CHECK_GFLAGS libnbd: debug: nbd5...
2019 Sep 25
0
[libnbd PATCH] lib: Synchronize nbd-protocol.h with nbdkit, again
.../* Request (client -> server). */ struct nbd_request { uint32_t magic; /* NBD_REQUEST_MAGIC. */ diff --git a/generator/states-magic.c b/generator/states-magic.c index de8d235..597620d 100644 --- a/generator/states-magic.c +++ b/generator/states-magic.c @@ -35,7 +35,7 @@ MAGIC.CHECK_MAGIC: uint64_t version; - if (strncmp (h->sbuf.new_handshake.nbdmagic, "NBDMAGIC", 8) != 0) { + if (be64toh (h->sbuf.new_handshake.nbdmagic) != NBD_MAGIC) { SET_NEXT_STATE (%.DEAD); set_error (0, "handshake: server did not send expected NBD magic"); return...
2019 Sep 11
4
[PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.
Very much a work in progress as there are still many tests using qemu-io which are candidates for conversion. You'll notice at the end of test-full.sh that the new test has some duplicated code which looks as if it ought to be refactored into a Python function. When I tried to do that, I got loads of strange Python problems which may indicate bugs in nbdsh itself or problems with my
2013 Sep 23
28
[PATCH 0/2] add LZ4 kernel decompression support
Linux 3.11 added respective support, so I think we should follow suit. 1: xen: add LZ4 decompression support 2: libxc: add LZ4 decompression support Signed-off-by: Jan Beulich <jbeulich@suse.com>
2005 Apr 25
0
Windows VBSscript and test.sh execution in /tmp/public in AIX 5.3
...12:21:36.369831, 3, pid=19888, effective(4294967294, 4294967294), real(0, 0)] smbd/open.c:fd_attempt_close(162) fd_attempt_close fd = 7, dev = a0007, inode = 8193, open_flags = 2, ref_count = 1. [2005/04/22 12:21:36.382572, 3, pid=19888, effective(4294967294, 4294967294), real(0, 0)] smbd/close.c:check_magic(60) Invoking magic command test.sh gave 127 [2005/04/22 12:21:36.384551, 2, pid=19888, effective(4294967294, 4294967294), real(0, 0)] smbd/close.c:close_normal_file(159) nobody closed file test.sh (numopen=0) [2005/04/22 12:21:36.385564, 3, pid=19888, effective(4294967294, 4294967294), real(0,...
2020 Aug 14
0
[libnbd PATCH v2 06/13] api: Add nbd_opt_abort and nbd_aio_opt_abort
.../states-newstyle.c index 8da4617..6613f9f 100644 --- a/generator/states-newstyle.c +++ b/generator/states-newstyle.c @@ -112,6 +112,26 @@ handle_reply_error (struct nbd_handle *h) STATE_MACHINE { NEWSTYLE.START: + if (h->opt_mode) { + /* NEWSTYLE can be entered multiple times, from MAGIC.CHECK_MAGIC and + * during various nbd_opt_* calls during NEGOTIATION. Each previous + * state has informed us what we still need to do. + */ + switch (h->current_opt) { + case NBD_OPT_ABORT: + if ((h->gflags & LIBNBD_HANDSHAKE_FLAG_FIXED_NEWSTYLE) == 0) { + SET_NEXT_ST...
2019 Jun 29
0
[libnbd PATCH 2/6] generator: Allow DEAD state actions to run
...tes-magic.c index 93c92fc..de8d235 100644 --- a/generator/states-magic.c +++ b/generator/states-magic.c @@ -27,7 +27,7 @@ MAGIC.RECV_MAGIC: switch (recv_into_rbuf (h)) { - case -1: SET_NEXT_STATE (%.DEAD); return -1; + case -1: SET_NEXT_STATE (%.DEAD); return 0; case 0: SET_NEXT_STATE (%CHECK_MAGIC); } return 0; @@ -38,7 +38,7 @@ if (strncmp (h->sbuf.new_handshake.nbdmagic, "NBDMAGIC", 8) != 0) { SET_NEXT_STATE (%.DEAD); set_error (0, "handshake: server did not send expected NBD magic"); - return -1; + return 0; } version = be64toh (h-&gt...
2019 May 23
2
[PATCH libnbd] api: Get rid of nbd_connection.
This isn't quite finished because not all of the tests or examples have been updated, but it demonstrates an idea: Should we forget about the concept of having multiple connections managed under a single handle? In this patch there is a single ‘struct nbd_handle *’ which manages a single state machine and connection (and therefore no nbd_connection). To connect to a multi-conn server you must
2019 Jun 29
19
[libnbd PATCH 0/6] new APIs: aio_in_flight, aio_FOO_notify
I still need to wire in the use of *_notify functions into nbdkit to prove whether it makes the code any faster or easier to maintain, but at least the added example shows one good use case for the new API. Eric Blake (6): api: Add nbd_aio_in_flight generator: Allow DEAD state actions to run generator: Allow Int64 in callbacks states: Prepare for aio notify callback api: Add new
2020 Aug 14
18
[libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo
Well, I'm not quite done (I still want to get nbdinfo to work on a single nbd connection for all cases when reading the heads of the file is not required), but I'm happy with patches 1-11, and 12-13 show where I'm headed for getting NBD_OPT_INFO to work. Posting now to see if some of the earlier patches are ready to commit while I continue working on the latter half. Eric Blake (13):