search for: block_len

Displaying 20 results from an estimated 32 matches for "block_len".

2003 Mar 23
1
[RFC] dynamic checksum size
...7 /* We refuse to interoperate with versions that are not in this range. * Note that we assume we'll work with later versions: the onus is on @@ -385,7 +385,8 @@ OFF_T flength; /**< total file length */ size_t count; /**< how many chunks */ size_t remainder; /**< flength % block_length */ - size_t n; /**< block_length */ + size_t blength; /**< block_length */ + size_t s2length; /**< csum_length */ struct sum_buf *sums; /**< points to info for each chunk */ }; --- generator.c Sat Mar 22 03:38:21 2003 +++ generator.c.dynsumlen Sat Mar 22 09:47:43 2003 @@ -10...
2002 Apr 23
1
patch: timeout problem solved
...ut, 0); + write_int(f_out, block_size); + write_int(f_out, 0); } @@ -162,57 +146,43 @@ generate approximately one checksum every n bytes */ -static struct sum_struct *generate_sums(struct map_struct *buf,OFF_T len,int n) +void generate_and_send_sums(struct map_struct *buf,OFF_T len,int block_len, int f_out) { - int i; - struct sum_struct *s; - int count; - int block_len = n; - int remainder = (len%block_len); + size_t i; + struct sum_struct sum; OFF_T offset = 0; - count = (len+(block_len-1))/block_len; - - s = (struct sum_struct *)malloc(sizeof(*s)); - if (!s) out_of_memory("gen...
2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
...ck-size will override this regardless of what block size is specified. The variable checksum size takes block size into account using an approximation of the formula provided by Donovan Baarda on this list (blocksum_bits includes the 32bit sum1). blocksum_bits = BIAS + 2*log2(file_len) - log2(block_len) This should result in increased efficiency as files grow, reduce the likelihood of file-redo and raise the ceiling on how large a file can be processed by rsync. The one case where efficiency could be decreased would be huge files with many tiny changes scattered throughout. The first table il...
2013 Jun 23
3
[PATCH] Add read support for "big data" blocks to hivex
...; +} __attribute__((__packed__)); + +struct ntreg_db_block { + int32_t seg_len; + char data[1]; +} __attribute__((__packed__)); + static uint32_t header_checksum (const hive_h *h) { @@ -1418,22 +1431,60 @@ hivex_value_value (hive_h *h, hive_value_h value, * instead. */ size_t blen = block_len (h, data_offset, NULL); - if (len > blen - 4 /* subtract 4 for block header */) { - if (h->msglvl >= 2) - fprintf (stderr, "hivex_value_value: warning: declared data length " - "is longer than the block it is in " - "(data 0x%zx...
2013 Jun 25
2
Re: [PATCH] Add read support for "big data" blocks to hivex
..." > "valid (db block 0x%zx, block list 0x%zx, data block 0x%zx)\ > - data_offset, blocklist_offset, subblock_offset); > + data_offset, blocklist_offset, (size_t) subblock_offset); > } > int32_t seg_len = block_len(h, subblock_offset, NULL); > struct ntreg_db_block *subblock = > > to make it compile without warnings. Yeah, so I'll just make subblock_offset a size_t, like all the other offset values. > With that addition, * ACK *. I'll post a slightly updated version, with better...
2013 Mar 04
56
GPU passthrough issue when VM is configured with 4G memory
Hi,all I have tried to passthrough GPU card(Nvidia quadro 4000) on the latest Xen unstable version (QEMU is using Qemu-upsteam-unstable, not traditional Qemu). This issue as below: Windows7 64-bit guest will blue screen when GPU passthrough configure 4g memory,blue screen code is 50, and SUSE 11 64-bit guest will always stay at the grub screen. I noticed that it will relocate RAM that
2013 Jun 25
0
Re: [PATCH] Add read support for "big data" blocks to hivex
...ock { > + int32_t seg_len; > + char data[1]; > +} __attribute__((__packed__)); > + > static uint32_t > header_checksum (const hive_h *h) > { > @@ -1418,22 +1431,60 @@ hivex_value_value (hive_h *h, hive_value_h value, > * instead. > */ > size_t blen = block_len (h, data_offset, NULL); > - if (len > blen - 4 /* subtract 4 for block header */) { > - if (h->msglvl >= 2) > - fprintf (stderr, "hivex_value_value: warning: declared data length " > - "is longer than the block it is in " > -...
2011 Apr 13
1
[PATCH hivex] maint: split long lines
...f (stderr, "hivex: %s: trailing garbage at end of file " + "(at 0x%zx, after %zu pages)\n", filename, off, pages); errno = ENOTSUP; goto error; @@ -453,7 +454,8 @@ hivex_open (const char *filename, int flags) int used; seg_len = block_len (h, blkoff, &used); if (seg_len <= 4 || (seg_len & 3) != 0) { - fprintf (stderr, "hivex: %s: block size %" PRIu32 " at 0x%zx, bad registry\n", + fprintf (stderr, "hivex: %s: block size %" PRIu32 " at 0x%zx," + " bad regi...
2010 Jul 26
6
[PATCH] Btrfs: compressed file size ioctl
Returns a file''s size on disk. Had been posted by Chris Ball over a year ago (http://article.gmane.org/gmane.comp.file-systems.btrfs/2873). Chris Mason suggested a couple of improvements back then, which I have implemented in this version: - use u64 to return the result - replaced the loop while (1) { struct btrfs_ordered_extent *ordered;
2014 Jan 13
1
[PATCH 2/7 take 2] lib: Use vk->len for string conversion
...- * necessary. However we do need to nul-terminate the string. - */ - errno = 0; - size_t len = hivex_value_key_len (h, value); - if (len == 0 && errno != 0) - return NULL; size_t flags = le16toh (vk->flags); + size_t len = le16toh (vk->name_len); + + size_t seg_len = block_len (h, value, NULL); + if (sizeof (struct ntreg_vk_record) + len - 1 > seg_len) { + SET_ERRNO (EFAULT, "key length is too long (%zu, %zu)", len, seg_len); + return 0; + } if (flags & 0x01) { return _hivex_windows_latin1_to_utf8 (vk->name, len); } else { -- 1.8.5...
2014 Jan 13
3
Re: [PATCH 2/7] lib: Use vk->len for string conversion
...= hivex_value_key_len (h, value); > - if (len == 0 && errno != 0) > - return NULL; > size_t flags = le16toh (vk->flags); > + size_t len = le16toh (vk->name_len); I think this effectively removes a check. hivex_value_key_len contains this code: size_t seg_len = block_len (h, value, NULL); if (sizeof (struct ntreg_vk_record) + len - 1 > seg_len) { SET_ERRNO (EFAULT, "key length is too long (%zu, %zu)", len, seg_len); return 0; } but after this change, this would no longer be run, so it would be possible to overrun the registry, or at least...
2013 Jun 25
0
[PATCH] Add read support for "big data" blocks to hivex
...; +} __attribute__((__packed__)); + +struct ntreg_db_block { + int32_t seg_len; + char data[1]; +} __attribute__((__packed__)); + static uint32_t header_checksum (const hive_h *h) { @@ -1418,22 +1431,70 @@ hivex_value_value (hive_h *h, hive_value_h value, * instead. */ size_t blen = block_len (h, data_offset, NULL); - if (len > blen - 4 /* subtract 4 for block header */) { - if (h->msglvl >= 2) - fprintf (stderr, "hivex_value_value: warning: declared data length " - "is longer than the block it is in " - "(data 0x%zx...
2011 Sep 02
1
[PATCH 4/7] hivex: Add metadata length functions for nodes and values
...rn 0; + } + + struct ntreg_nk_record *nk = (struct ntreg_nk_record *) (h->addr + node); + size_t name_len = le16toh (nk->name_len); + /* -1 to avoid double-counting the first name character */ + size_t ret = name_len + sizeof (struct ntreg_nk_record) - 1; + int used; + size_t seg_len = block_len (h, node, &used); + if (ret > seg_len) { + if (h->msglvl >= 2) + fprintf (stderr, "hivex_node_struct_length: returning EFAULT because" + " node name is too long (%zu, %zu)\n", name_len, seg_len); + errno = EFAULT; + return 0; + } + ret...
2017 Feb 14
2
Re: [PATCH 2/2] lib: allow to walk registry with corrupted blocks
...files changed, 14 insertions(+), 10 deletions(-) > > diff --git a/lib/handle.c b/lib/handle.c > index 1e122ea..9be3b5f 100644 > --- a/lib/handle.c > +++ b/lib/handle.c > @@ -300,10 +300,15 @@ hivex_open (const char *filename, int flags) > int used; > seg_len = block_len (h, blkoff, &used); > if (seg_len <= 4 || (seg_len & 3) != 0) { > - SET_ERRNO (ENOTSUP, > - "%s: block size %" PRIi32 " at 0x%zx, bad registry", > - filename, le32toh (block->seg_len), blkoff); > -...
2013 Jul 25
19
[PATCH hivex 00/19] Fix read/write handling of li-records.
This is, hopefully, a full fix for handling of li-records. See: https://bugzilla.redhat.com/show_bug.cgi?id=717583 https://bugzilla.redhat.com/show_bug.cgi?id=987463 Rich.
2011 Sep 18
5
Inefficient storing of ISO images with compress=lzo
I''ve noticed that: - with x86-64 Fedora 15 DVD install images: - du -sh <ROOT VOLUME> was 36 GB - btrfs df | grep -i data have shown over 40 GB used - without - du -sh <ROOT VOLUME> is 34 GB - btrfs df | grep -i data have shown less then 34 GB used It seems that iso files are considered compressable while they may not be (and penalty is severe - 3x). Regards
2017 Feb 08
4
[PATCH 0/2] hivex: handle corrupted hives better
Hello, The following patches address issues when dealing with hives that have corrupted data in them but are otherwise readable/writable. Those were found on some rather rare Windows installations that seem to work fine but current hivex fails to even open. Those patches change hivex to simply log and ignore such "corrupted" regions instead of aborting because the caller might be
2017 Feb 08
0
[PATCH 2/2] lib: allow to walk registry with corrupted blocks
...+---- lib/node.c | 11 +++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/handle.c b/lib/handle.c index 1e122ea..9be3b5f 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -300,10 +300,15 @@ hivex_open (const char *filename, int flags) int used; seg_len = block_len (h, blkoff, &used); if (seg_len <= 4 || (seg_len & 3) != 0) { - SET_ERRNO (ENOTSUP, - "%s: block size %" PRIi32 " at 0x%zx, bad registry", - filename, le32toh (block->seg_len), blkoff); - goto error; +...
2004 Jul 12
1
Core dump - Can not sync big data folders of size 800 GB
Hi, I was trying to synchronize data sitting on our Sun Solaris 8 server with data size of about 800 GB to a remote Linux server in our LAN. Either the rsync process hangs for ever else I get "core dump" after about 15 minutes of time on the source host (solaris 8 server). I used rsync 2.6.2 using the basic command options as shown below # rsync -avz -e rsh <source folder
2018 Jul 23
3
[hivex PATCH] Re-allocating unused blocks before assigning new blocks
Hello Richard As discussed in the IRC channel, when merging a moderately large reg file (~35MB) to a hiv file (~118 MB); hivex generates a huge hiv file (~580 MB). These changes address that by creating a list of unallocated blocks and reassigning unused blocks. I used https://github.com/msuhanov/regf/blob/master/Windows%20registry%20file%20format%20specification.md as a reference for the