search for: dst_len

Displaying 20 results from an estimated 67 matches for "dst_len".

2007 Mar 19
9
[BUG?] ip ru flush && RTNETLINK answers: Numerical result out of range
After an: # ip ru flush I loose all my ip rules but the priority 0 one. root@sarasvati:~# ip ru 0: from all lookup 255 root@sarasvati:~# Ok with that, but now i''m not able to insert any new rule. This leads to a total loose of conectivity. root@sarasvati:~# ip ru add from all table default RTNETLINK answers: Numerical result out of range root@sarasvati:~# ip ru add from all
2019 Apr 10
1
[PATCH v2 2/3] drm: switch drm_fb_xrgb8888_to_rgb565_dstclip to accept __iomem dst
...struct drm_framebuffer *fb, - struct drm_rect *clip, bool swap) + struct drm_rect *clip, bool swab) { - unsigned int src_offset = (clip->y1 * fb->pitches[0]) - + (clip->x1 * sizeof(u32)); - size_t src_len = (clip->x2 - clip->x1) * sizeof(u32); - size_t dst_len = (clip->x2 - clip->x1) * sizeof(u16); + size_t linepixels = clip->x2 - clip->x1; + size_t src_len = linepixels * sizeof(u32); + size_t dst_len = linepixels * sizeof(u16); + unsigned y, lines = clip->y2 - clip->y1; + void *sbuf; - drm_fb_xrgb8888_to_rgb565_lines(dst, dst_len, -...
2011 Nov 11
0
[PATCH 9/9] Decompressors: check input size in unlzo.c
.../ + if (end - parse < l + 4) + return 0; parse += l + 4; *skip = parse - input; @@ -107,7 +129,8 @@ STATIC int INIT unlzo(u8 *input, unsigne u8 *output, unsigned int *posp, void (*error) (const char *x)) { - u8 skip = 0, r = 0; + u8 r = 0; + int skip = 0; u32 src_len, dst_len; size_t tmp; u8 *in_buf, *in_buf_save, *out_buf; @@ -149,19 +172,25 @@ STATIC int INIT unlzo(u8 *input, unsigne if (fill) fill(in_buf, lzo1x_worst_compress(LZO_BLOCK_SIZE)); - if (!parse_header(input, &skip)) { + if (!parse_header(input, &skip, in_len)) { error("invalid h...
2001 Mar 28
1
UTF-8 patch for Samba 2.0.7
...not supported\n",upper_unix_char_set)); + //return load_unicode_map(upper_unix_char_set, &unixcp_to_ucs2, &ucs2_to_unixcp); } /******************************************************************* @@ -653,7 +662,16 @@ char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len) { - return unicode_to_multibyte(dst, src, dst_len, ucs2_to_unixcp); + const char *ibuf=(char*)src; + char *obuf = dst; + size_t ilen=strlen((char*)src)+1,olen=dst_len; + + if(ucs2unix==(iconv_t)-1) + strncpy(dst,(char*)src,dst_len); + else + iconv(unix2ucs,&ibuf,&ilen,&obuf,&ol...
2020 Jun 16
0
[PATCH 5.4 088/134] crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req()
...vers/crypto/virtio/virtio_crypto_algs.c index 3b37d0150814..ac420b201dd8 100644 --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -410,6 +410,7 @@ __virtio_crypto_ablkcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req, goto free; } + dst_len = min_t(unsigned int, req->nbytes, dst_len); pr_debug("virtio_crypto: src_len: %u, dst_len: %llu\n", req->nbytes, dst_len); -- 2.25.1
2020 Jun 16
0
[PATCH 5.7 093/163] crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req()
...at linuxfoundation.org> --- drivers/crypto/virtio/virtio_crypto_algs.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -402,6 +402,7 @@ __virtio_crypto_skcipher_do_req(struct v goto free; } + dst_len = min_t(unsigned int, req->cryptlen, dst_len); pr_debug("virtio_crypto: src_len: %u, dst_len: %llu\n", req->cryptlen, dst_len);
2020 Jun 16
0
[PATCH 5.6 098/161] crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req()
...at linuxfoundation.org> --- drivers/crypto/virtio/virtio_crypto_algs.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -402,6 +402,7 @@ __virtio_crypto_skcipher_do_req(struct v goto free; } + dst_len = min_t(unsigned int, req->cryptlen, dst_len); pr_debug("virtio_crypto: src_len: %u, dst_len: %llu\n", req->cryptlen, dst_len);
2020 Jun 19
0
[PATCH 4.14 051/190] crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req()
...vers/crypto/virtio/virtio_crypto_algs.c index fee78ec46bae..e6b889ce395e 100644 --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -411,6 +411,7 @@ __virtio_crypto_ablkcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req, goto free; } + dst_len = min_t(unsigned int, req->nbytes, dst_len); pr_debug("virtio_crypto: src_len: %u, dst_len: %llu\n", req->nbytes, dst_len); -- 2.25.1
2020 Jun 19
0
[PATCH 4.19 066/267] crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req()
...vers/crypto/virtio/virtio_crypto_algs.c index e9a8485c4929..ab4700e4b409 100644 --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -424,6 +424,7 @@ __virtio_crypto_ablkcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req, goto free; } + dst_len = min_t(unsigned int, req->nbytes, dst_len); pr_debug("virtio_crypto: src_len: %u, dst_len: %llu\n", req->nbytes, dst_len); -- 2.25.1
2020 Jun 15
0
Patch "crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req()" has been added to the 5.7-stable tree
...at linuxfoundation.org> --- drivers/crypto/virtio/virtio_crypto_algs.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -402,6 +402,7 @@ __virtio_crypto_skcipher_do_req(struct v goto free; } + dst_len = min_t(unsigned int, req->cryptlen, dst_len); pr_debug("virtio_crypto: src_len: %u, dst_len: %llu\n", req->cryptlen, dst_len); Patches currently in stable-queue which might be from longpeng2 at huawei.com are queue-5.7/crypto-virtio-fix-src-dst-scatterlist-calculation-in...
2020 Jun 15
0
Patch "crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req()" has been added to the 5.6-stable tree
...at linuxfoundation.org> --- drivers/crypto/virtio/virtio_crypto_algs.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -402,6 +402,7 @@ __virtio_crypto_skcipher_do_req(struct v goto free; } + dst_len = min_t(unsigned int, req->cryptlen, dst_len); pr_debug("virtio_crypto: src_len: %u, dst_len: %llu\n", req->cryptlen, dst_len); Patches currently in stable-queue which might be from longpeng2 at huawei.com are queue-5.6/crypto-virtio-fix-src-dst-scatterlist-calculation-in...
2019 Oct 14
0
[PATCH 03/25] crypto: virtio - switch to skcipher API
...to_sym_request *vc_sym_req, req_data->u.sym_req.op_type = cpu_to_le32(VIRTIO_CRYPTO_SYM_OP_CIPHER); req_data->u.sym_req.u.cipher.para.iv_len = cpu_to_le32(ivsize); req_data->u.sym_req.u.cipher.para.src_data_len = - cpu_to_le32(req->nbytes); + cpu_to_le32(req->cryptlen); dst_len = virtio_crypto_alg_sg_nents_length(req->dst); if (unlikely(dst_len > U32_MAX)) { @@ -406,9 +407,9 @@ __virtio_crypto_ablkcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req, } pr_debug("virtio_crypto: src_len: %u, dst_len: %llu\n", - req->nbytes, dst_len); + r...
2019 Oct 24
0
[PATCH v2 03/27] crypto: virtio - switch to skcipher API
...to_sym_request *vc_sym_req, req_data->u.sym_req.op_type = cpu_to_le32(VIRTIO_CRYPTO_SYM_OP_CIPHER); req_data->u.sym_req.u.cipher.para.iv_len = cpu_to_le32(ivsize); req_data->u.sym_req.u.cipher.para.src_data_len = - cpu_to_le32(req->nbytes); + cpu_to_le32(req->cryptlen); dst_len = virtio_crypto_alg_sg_nents_length(req->dst); if (unlikely(dst_len > U32_MAX)) { @@ -406,9 +407,9 @@ __virtio_crypto_ablkcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req, } pr_debug("virtio_crypto: src_len: %u, dst_len: %llu\n", - req->nbytes, dst_len); + r...
2019 Apr 10
1
[PATCH v2 3/3] drm: switch drm_fb_xrgb8888_to_rgb888_dstclip to accept __iomem dst
...p) { - unsigned int src_offset = (clip->y1 * fb->pitches[0]) - + (clip->x1 * sizeof(u32)); - unsigned int dst_offset = (clip->y1 * dst_pitch) - + (clip->x1 * 3); - size_t src_len = (clip->x2 - clip->x1) * sizeof(u32); + size_t linepixels = clip->x2 - clip->x1; + size_t dst_len = linepixels * 3; + unsigned y, lines = clip->y2 - clip->y1; + void *dbuf; - drm_fb_xrgb8888_to_rgb888_lines(dst + dst_offset, dst_pitch, - vaddr + src_offset, fb->pitches[0], - src_len, clip->y2 - clip->y1); + dbuf = kmalloc(dst_len, GFP_KERNEL); + if (!dbuf) + return; +...
2019 Oct 21
0
[PATCH RFC 1/3] kcov: remote coverage support
...quence); > + > +} > + > +static void kcov_move_area(enum kcov_mode mode, void *dst_area, > + unsigned int dst_area_size, void *src_area) > +{ > + u64 word_size = sizeof(unsigned long); > + u64 count_size, entry_size; > + u64 dst_len, src_len; > + void *dst_entries, *src_entries; > + u64 dst_occupied, dst_free, bytes_to_move, entries_moved; > + > + kcov_debug("%px %u <= %px %lu\n", > + dst_area, dst_area_size, src_area, *(unsigned long *)src_area); > + > +...
2016 Nov 27
2
[PATCH v2 2/2] crypto: add virtio-crypto driver
...tx = vc_req->ablkcipher_ctx; > + struct virtio_crypto *vcrypto = ctx->vcrypto; > + struct virtio_crypto_op_data_req *req_data; > + int src_nents, dst_nents; > + int err; > + unsigned long flags; > + struct scatterlist outhdr, iv_sg, status_sg, **sgs; > + int i; > + u64 dst_len; > + unsigned int num_out = 0, num_in = 0; > + int sg_total; > + > + src_nents = sg_nents_for_len(req->src, req->nbytes); > + dst_nents = sg_nents(req->dst); > + > + pr_debug("virtio_crypto: Number of sgs (src_nents: %d, dst_nents: %d)\n", > + src_nents,...
2016 Nov 27
2
[PATCH v2 2/2] crypto: add virtio-crypto driver
...tx = vc_req->ablkcipher_ctx; > + struct virtio_crypto *vcrypto = ctx->vcrypto; > + struct virtio_crypto_op_data_req *req_data; > + int src_nents, dst_nents; > + int err; > + unsigned long flags; > + struct scatterlist outhdr, iv_sg, status_sg, **sgs; > + int i; > + u64 dst_len; > + unsigned int num_out = 0, num_in = 0; > + int sg_total; > + > + src_nents = sg_nents_for_len(req->src, req->nbytes); > + dst_nents = sg_nents(req->dst); > + > + pr_debug("virtio_crypto: Number of sgs (src_nents: %d, dst_nents: %d)\n", > + src_nents,...
2016 Nov 28
0
[virtio-dev] Re: [PATCH v2 2/2] crypto: add virtio-crypto driver
...; + struct virtio_crypto *vcrypto = ctx->vcrypto; > > + struct virtio_crypto_op_data_req *req_data; > > + int src_nents, dst_nents; > > + int err; > > + unsigned long flags; > > + struct scatterlist outhdr, iv_sg, status_sg, **sgs; > > + int i; > > + u64 dst_len; > > + unsigned int num_out = 0, num_in = 0; > > + int sg_total; > > + > > + src_nents = sg_nents_for_len(req->src, req->nbytes); > > + dst_nents = sg_nents(req->dst); > > + > > + pr_debug("virtio_crypto: Number of sgs (src_nents: %d, > dst...
2014 Nov 21
4
Bug#767295: [PATCH for-4.5 v2] libxc: don't leak buffer containing the uncompressed PV kernel
...eanup; >> + } >> + >> DOMPRINTF("%s: %s decompress OK, 0x%zx -> 0x%zx", >> __FUNCTION__, what, *size, (size_t)stream->total_out); >> >> @@ -464,7 +478,13 @@ static int xc_try_lzo1x_decode( >> >> dst_len = lzo_read_32(cur); >> if ( !dst_len ) >> + { >> + msg = "Error registering stream output"; >> + if ( xc_dom_register_external(dom, out_buf, out_len) ) >> + break; >> + >> return...
2016 Nov 22
0
[PATCH v2 2/2] crypto: add virtio-crypto driver
...+ struct virtio_crypto_ablkcipher_ctx *ctx = vc_req->ablkcipher_ctx; + struct virtio_crypto *vcrypto = ctx->vcrypto; + struct virtio_crypto_op_data_req *req_data; + int src_nents, dst_nents; + int err; + unsigned long flags; + struct scatterlist outhdr, iv_sg, status_sg, **sgs; + int i; + u64 dst_len; + unsigned int num_out = 0, num_in = 0; + int sg_total; + + src_nents = sg_nents_for_len(req->src, req->nbytes); + dst_nents = sg_nents(req->dst); + + pr_debug("virtio_crypto: Number of sgs (src_nents: %d, dst_nents: %d)\n", + src_nents, dst_nents); + + /* Why 3? outhdr + iv...