Displaying 20 results from an estimated 271 matches for "max_size".
2023 May 10
3
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
Both split ring and packed ring use 32bits to describe the length of
a descriptor: see struct vring_desc and struct vring_packed_desc.
This means the max segment size supported by virtio is U32_MAX.
An example of virtio_max_dma_size in virtio_blk.c:
u32 v, max_size;
max_size = virtio_max_dma_size(vdev); -> implicit convert
err = virtio_cread_feature(vdev, VIRTIO_BLK_F_SIZE_MAX,
struct virtio_blk_config, size_max, &v);
max_size = min(max_size, v);
There is a risk during implicit convert here, once virtio_max_dma_siz...
2023 May 10
2
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
...gt; wrote:
> Both split ring and packed ring use 32bits to describe the length of
> a descriptor: see struct vring_desc and struct vring_packed_desc.
> This means the max segment size supported by virtio is U32_MAX.
>
> An example of virtio_max_dma_size in virtio_blk.c:
> u32 v, max_size;
>
> max_size = virtio_max_dma_size(vdev); -> implicit convert
> err = virtio_cread_feature(vdev, VIRTIO_BLK_F_SIZE_MAX,
> struct virtio_blk_config, size_max, &v);
> max_size = min(max_size, v);
>
> There is a risk during implicit conv...
2023 Jul 04
1
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
...pi wrote:
> Both split ring and packed ring use 32bits to describe the length of
> a descriptor: see struct vring_desc and struct vring_packed_desc.
> This means the max segment size supported by virtio is U32_MAX.
>
> An example of virtio_max_dma_size in virtio_blk.c:
> u32 v, max_size;
>
> max_size = virtio_max_dma_size(vdev); -> implicit convert
> err = virtio_cread_feature(vdev, VIRTIO_BLK_F_SIZE_MAX,
> struct virtio_blk_config, size_max, &v);
> max_size = min(max_size, v);
>
> There is a risk during implicit co...
2024 Feb 03
1
a little note on sshbuf_reset()
...IT,
1)) != NULL) {
buf->cd = buf->d = d;
buf->alloc = SSHBUF_SIZE_INIT;
}
}
explicit_bzero(buf->d, buf->alloc);
}
This function allocates a new buffer of size SSHBUF_SIZE_INIT if
buf->alloc != SSHBUF_SIZE_INIT, which can put buf in an inconsistent
state if buf->max_size < SSHBUF_SIZE_INIT, because it will make
buf->alloc > buf->max_size true, which will trigger an error with a
next call to sshbuf_check_sanity(). For example, struct sshbuf *buf =
sshbuf_new(); sshbuf_set_max_size(buf, 100); sshbuf_reset(buf); will
lead to SSH_ERR_INTERNAL_ERROR. This co...
2023 May 10
1
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
...pi wrote:
> Both split ring and packed ring use 32bits to describe the length of
> a descriptor: see struct vring_desc and struct vring_packed_desc.
> This means the max segment size supported by virtio is U32_MAX.
>
> An example of virtio_max_dma_size in virtio_blk.c:
> u32 v, max_size;
>
> max_size = virtio_max_dma_size(vdev); -> implicit convert
> err = virtio_cread_feature(vdev, VIRTIO_BLK_F_SIZE_MAX,
> struct virtio_blk_config, size_max, &v);
> max_size = min(max_size, v);
>
> There is a risk during implicit co...
2023 May 10
1
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
...t ring and packed ring use 32bits to describe the length of
> > a descriptor: see struct vring_desc and struct vring_packed_desc.
> > This means the max segment size supported by virtio is U32_MAX.
> >
> > An example of virtio_max_dma_size in virtio_blk.c:
> > u32 v, max_size;
> >
> > max_size = virtio_max_dma_size(vdev); -> implicit convert
> > err = virtio_cread_feature(vdev, VIRTIO_BLK_F_SIZE_MAX,
> > struct virtio_blk_config, size_max, &v);
> > max_size = min(max_size, v);
> >
> > T...
2023 May 10
1
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
...e 32bits to describe the length of
> > > a descriptor: see struct vring_desc and struct vring_packed_desc.
> > > This means the max segment size supported by virtio is U32_MAX.
> > >
> > > An example of virtio_max_dma_size in virtio_blk.c:
> > > u32 v, max_size;
> > >
> > > max_size = virtio_max_dma_size(vdev); -> implicit convert
> > > err = virtio_cread_feature(vdev, VIRTIO_BLK_F_SIZE_MAX,
> > > struct virtio_blk_config, size_max, &v);
> > > max_size = min(max_size,...
2005 Apr 25
2
How about a --min-size option, next to --max-size
There's a rather old bug report in Debian's bug tracking system
(see http://bugs.debian.org/27126) about wanting to be able to specify
the maximum file size, as well as the minimum file size. Here's the
text:
Sometimes, it's useful to specify a file size range one is
interested in.
For example, I'd like to keep an up-to-date mirror of Debian, but I
currently
2015 May 29
1
[PATCH] inspection: lift size limit for RHEL icons
...so have the same file with the
* same name, but containing their own logos. Sense prevails!
+ *
+ * Use a generic 100K limit for all the images, as logos in the
+ * RHEL clones have different sizes.
*/
static char *
icon_rhel (guestfs_h *g, struct inspect_fs *fs, size_t *size_r)
{
- size_t max_size = 0;
const char *shadowman;
- if (fs->major_version >= 5 && fs->major_version <= 6)
- max_size = 17000;
- else
- max_size = 66000;
-
if (fs->major_version <= 6)
shadowman = "/usr/share/pixmaps/redhat/shadowman-transparent.png";
else
s...
2006 Nov 04
0
Minimagick issue writing resized file
...mb(product_id)
# glob through images/books/thumbs dir to find thumb that matches isbn of book
p = Product.find(product_id).isbn
z = Dir["#{RAILS_ROOT}/public/images/books/#{p}.{gif,jpg,png}"]
i = MiniMagick::Image.new(z)
w = i[:width]
h = i[:height]
w = w.to_f
h = h.to_f
max_size = 60
if (w > max_size || h > max_size)
if (w > h)
h = (h*(max_size/w)).to_i
w = max_size
else
w = (w*(max_size/h)).to_i
h = max_size
end
t = z.map {|image| "books/thumbs/" + File.basename(image)}
i.resize "#{w}x#{h}"
i.w...
2018 Jul 04
0
[PATCH] drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()
This doesn't affect runtime because in the current code "idx" is always
valid.
First, we read from "vgdev->capsets[idx].max_size" before checking
whether "idx" is within bounds. And secondly the bounds check is off by
one so we could end up reading one element beyond the end of the
vgdev->capsets[] array.
Fixes: 62fb7a5e1096 ("virtio-gpu: add 3d/virgl support")
Signed-off-by: Dan Carpenter <d...
2014 Apr 15
1
[PATCH] Null terminate before printing the link name.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This fixes garbage I'm seeing consistently from readlink
/dev/disk/by-uuid/..... during boot.
Signed-off-by: Rafi Rubin <rafi at seas.upenn.edu>
- ---
usr/utils/readlink.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c
index 5ea4e41..75a0735 100644
- ---
2009 May 28
1
[PATCH] klibc-utils: add minils
...ude <stdlib.h>
+#include <dirent.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/sysmacros.h>
+#include <sys/types.h>
+
+#define STAT_ISSET(mode, mask) (((mode) & mask) == mask)
+
+static int max_nlinks = 1;
+static int max_size = 1;
+static int max_uid = 1;
+static int max_gid = 1;
+static int max_min = 1;
+static int max_maj = 1;
+
+static void do_preformat(const struct stat *st) {
+ int bytes;
+
+ if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_nlink)) > max_nlinks)
+ max_nlinks = bytes;
+
+ if...
2007 Feb 19
10
"dst cache overflow" messages and crash
...ith rtstat I see that the route cache size increases regularly without
never decreasing.
I have this parameters:
fw:/proc/sys/net/ipv4/route# grep . *
error_burst:1250
error_cost:250
gc_elasticity:15
gc_interval:60
gc_min_interval:0
gc_min_interval_ms:500
gc_thresh:4096
gc_timeout:300
max_delay:10
max_size:65536
min_adv_mss:256
min_delay:2
min_pmtu:552
mtu_expires:600
redirect_load:5
redirect_number:9
redirect_silence:5120
secret_interval:600
I can increase the maximum size of the cache, but that will do nothing
but delay the crash.
Can you help me?
Regards.
--
===================================...
2019 Feb 07
0
[PATCH v7 5/5] virtio-blk: Consider virtio_max_dma_size() for maximum segment size
...virtio_blk.c
index b16a887bbd02..4bc083b7c9b5 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -723,7 +723,7 @@ static int virtblk_probe(struct virtio_device *vdev)
struct request_queue *q;
int err, index;
- u32 v, blk_size, sg_elems, opt_io_size;
+ u32 v, blk_size, max_size, sg_elems, opt_io_size;
u16 min_io_size;
u8 physical_block_exp, alignment_offset;
@@ -826,14 +826,16 @@ static int virtblk_probe(struct virtio_device *vdev)
/* No real sector limit. */
blk_queue_max_hw_sectors(q, -1U);
+ max_size = virtio_max_dma_size(vdev);
+
/* Host can optionally s...
2017 Sep 20
7
[PATCH v2] 0/6] Various clean ups in lib/
v1 -> v2:
- Remove the unnecessary calls to guestfs_int_lazy_make_tmpdir
in the final patch.
Rich.
2017 Sep 19
7
[PATCH 0/6] Various clean ups in lib/
Miscellaneous small cleanups in lib/ directory.
Rich.
2024 Mar 18
0
[PATCH] add option to skip files based on age/mtime
...nerating the exclude file, so rsync would still
transfer it even though that wasn't what was wanted.
diff --git a/generator.c b/generator.c
index 110db28f..22f0973f 100644
--- a/generator.c
+++ b/generator.c
@@ -70,6 +70,8 @@ extern int ignore_times;
extern int size_only;
extern OFF_T max_size;
extern OFF_T min_size;
+extern int max_age;
+extern int min_age;
extern int io_error;
extern int flist_eof;
extern int allowed_lull;
@@ -1706,6 +1708,23 @@ static void recv_generator(char *fname, struct
file_struct *file, int ndx,
goto cleanup;
}
+ if (max_age > 0 && ti...
2011 Jul 07
5
[PATCH 0/5] checkpatch cleanups
It seems checkpatch errors krept in, this is a first go.
Next run will go into usr/kinit directory.
No code changes, just codingstyle fixes (verified with size(3)).
maximilian attems (5):
[klibc] sleep: have argument on next line
[klibc] readklink: remove unneeded braces
[klibc] mount: whitespace policy
[klibc] ls: fix various checkpatch complaints
[klibc] tests: checkpatch fixlets
2024 Feb 01
1
A couple of questions about OpenSSH codebase
...ne
allocation, two allocations if it is created with sshbuf_new(). There are a
lot of times when they are allocated and freed within the same function.
Same thing with bitmaps. What is the reason behind not allocating them on
the stack?
2. A lot of stuff in sshbuf's functions is checked against max_size. What
is the reason behind setting the max_size in the first place? If
sshbuf instance is not read-only and doesn't have children, why it cannot
allocate more memory than it's max_size?
3. There are a lot of very defensive checks in sshbuf code. A lot (if not
all) of sshbuf_* functions that...