Displaying 20 results from an estimated 20 matches for "ksize".
Did you mean:
size
2020 Jun 15
1
[PATCH 1/2] mm, treewide: Rename kzfree() to kfree_sensitive()
...in performance sensitive code.
> */
> -void kzfree(const void *p)
> +void kfree_sensitive(const void *p)
> {
> size_t ks;
> void *mem = (void *)p;
> @@ -1725,10 +1725,10 @@ void kzfree(const void *p)
> if (unlikely(ZERO_OR_NULL_PTR(mem)))
> return;
> ks = ksize(mem);
> - memset(mem, 0, ks);
> + memzero_explicit(mem, ks);
^^^^^^^^^^^^^^^^^^^^^^^^^
This is an unrelated bug fix. It really needs to be pulled into a
separate patch by itself and back ported to stable kernels.
> kfree(mem);
> }
> -EXPORT_SYMBOL(kzfree);
> +EXPORT_S...
2020 Jun 16
1
[PATCH v5 2/2] mm, treewide: Rename kzfree() to kfree_sensitive()
...gt; @@ -186,10 +186,12 @@ void memcg_deactivate_kmem_caches(struct mem_cgroup *, struct mem_cgroup *);
> */
> void * __must_check krealloc(const void *, size_t, gfp_t);
> void kfree(const void *);
> -void kzfree(const void *);
> +void kfree_sensitive(const void *);
> size_t __ksize(const void *);
> size_t ksize(const void *);
>
> +#define kzfree(x) kfree_sensitive(x) /* For backward compatibility */
> +
What was the thinking here? Is this really necessary?
I suppose we could keep this around for a while to ease migration. But
not for too long, please.
2009 Jul 13
0
[LLVMdev] [PATCH] Support asm comment output
...that an earlier pass
>> would. Again, it would be helpful if you included example output to
>> show what you're going for.
>
> Ok, here's an example:
>
> movl (%rsi), %ecx # LLVM
> Instruction: volatile store i32* %ksize, i32** %ksize3 ;
> [oox.4 : sln.5]
>
> #
> [result] Pattern
> 1367
Instead of printing 1367, why not print "MOV32rm" like -print-
machineinstr does? If you really want 1367, just print MI-
>getOpcode...
2009 Jul 13
5
[LLVMdev] [PATCH] Support asm comment output
...wouldn't know something that an earlier pass
> would. Again, it would be helpful if you included example output to
> show what you're going for.
Ok, here's an example:
movl (%rsi), %ecx # LLVM
Instruction: volatile store i32* %ksize, i32** %ksize3 ;
[oox.4 : sln.5]
# [result] Pattern
1367
I then hacked tblgen to output this in the generated isel file:
// Pattern 1367: (ld:i32 addr:iPTR:$src)<<P:Predicate_load>>
// Emits: (MOV32rm:i32 add...
2009 Jul 13
5
[LLVMdev] [PATCH] Support asm comment output
...on
> llvm::Instruction doesn't mean you don't get line numbers :).
You're right, it's not a big hurdle.
> > Ok, here's an example:
> >
> > movl (%rsi), %ecx # LLVM
> > Instruction: volatile store i32* %ksize, i32** %ksize3 ;
> > [oox.4 : sln.5]
> >
> > #
> > [result] Pattern
> > 1367
>
> Instead of printing 1367, why not print "MOV32rm" like -print-
> machineinstr does? If you really want...
2009 Jul 13
0
[LLVMdev] [PATCH] Support asm comment output
On Jul 13, 2009, at 1:58 PM, David Greene wrote:
>>> Ok, here's an example:
>>>
>>> movl (%rsi), %ecx # LLVM
>>> Instruction: volatile store i32* %ksize, i32**
>>> %ksize3 ;
>>> [oox.4 : sln.5]
>>>
>>> #
>>> [result] Pattern
>>> 1367
>>
>> Instead of printing 1367, why not print "MOV32rm" like -print-
>>...
2020 Jun 16
0
[PATCH v4 1/3] mm/slab: Use memzero_explicit() in kzfree()
...n.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 9e72ba224175..37d48a56431d 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -1726,7 +1726,7 @@ void kzfree(const void *p)
if (unlikely(ZERO_OR_NULL_PTR(mem)))
return;
ks = ksize(mem);
- memset(mem, 0, ks);
+ memzero_explicit(mem, ks);
kfree(mem);
}
EXPORT_SYMBOL(kzfree);
--
2.18.1
2020 Jun 16
1
[PATCH v4 1/3] mm/slab: Use memzero_explicit() in kzfree()
...deletion(-)
>
> diff --git a/mm/slab_common.c b/mm/slab_common.c
> index 9e72ba224175..37d48a56431d 100644
> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -1726,7 +1726,7 @@ void kzfree(const void *p)
> if (unlikely(ZERO_OR_NULL_PTR(mem)))
> return;
> ks = ksize(mem);
> - memset(mem, 0, ks);
> + memzero_explicit(mem, ks);
> kfree(mem);
> }
> EXPORT_SYMBOL(kzfree);
> --
> 2.18.1
>
--
Michal Hocko
SUSE Labs
2020 Jun 16
0
[PATCH v4 1/3] mm/slab: Use memzero_explicit() in kzfree()
...git a/mm/slab_common.c b/mm/slab_common.c
>> index 9e72ba224175..37d48a56431d 100644
>> --- a/mm/slab_common.c
>> +++ b/mm/slab_common.c
>> @@ -1726,7 +1726,7 @@ void kzfree(const void *p)
>> if (unlikely(ZERO_OR_NULL_PTR(mem)))
>> return;
>> ks = ksize(mem);
>> - memset(mem, 0, ks);
>> + memzero_explicit(mem, ks);
>> kfree(mem);
>> }
>> EXPORT_SYMBOL(kzfree);
> This is a good change, but the commit message isn't really accurate. AFAIK, no
> one has found any case where this memset() gets optimized o...
2013 Oct 08
1
OT: errors compiling kernel module as a rpm package
...c70 kernel(kernel_bind) = 0x957e225b
kernel(kfree) = 0x037a0cba kernel(kfree_skb) = 0x3d75cbcf
kernel(kmem_cache_alloc) = 0xee065ced kernel(kmem_cache_alloc_trace) =
0x2044fa9e kernel(kmem_cache_create) = 0xe4a639f8
kernel(kmem_cache_destroy) = 0x806e575f kernel(kmem_cache_free) =
0x7329e40d kernel(ksize) = 0xa0d3d560 kernel(kthread_create) =
0xc185e3ce kernel(kthread_should_stop) = 0xd2965f6f
kernel(kthread_stop) = 0xcf08c5b6 kernel(ktime_get_ts) = 0xefdd5a63
kernel(list_del) = 0x0521445b kernel(local_bh_disable) = 0x3ff62317
kernel(local_bh_enable) = 0x0799aca4 kernel(malloc_sizes) = 0xd691cba2
k...
2010 Sep 17
1
General protection fault
...8.826251] RSP <ffff8802ce981478>
Sep 17 15:26:18 box6 kernel: [ 1948.826253] ---[ end trace
b6ccf23d40727e98 ]---
Sep 17 15:26:18 box6 kernel: [ 1948.826334] ------------[ cut
here ]------------
Sep 17 15:26:18 box6 kernel: [ 1948.826344] WARNING:
at /build/buildd/linux-2.6.32/mm/slub.c:2929 ksize+0xc3/0xd0()
Sep 17 15:26:18 box6 kernel: [ 1948.826351] Hardware name: S5520HC
Sep 17 15:26:18 box6 kernel: [ 1948.826355] Modules linked in: ocfs2
quota_tree ocfs2_dlmfs ocfs2_stack_o2cb ocfs2_dlm ocfs2_nodemanager
ocfs2_stackglue configfs drbd fbcon tileblit font bitblit softcursor aoe
joydev vga...
2009 Jul 13
0
[LLVMdev] [PATCH] Support asm comment output
On Jul 13, 2009, at 10:02 AM, David Greene wrote:
>>> - Tag instructons with source line information (customers really
>>> want this).
>>
>> Right, that would be nice. This should be synthesizable from the
>> DebugLoc on the instruction in the asm printer, no need to
>> redundantly
>> encode it into the comment field.
>
> Except the DebugLoc
2009 Jul 13
2
[LLVMdev] [PATCH] Support asm comment output
On Monday 13 July 2009 11:40, Chris Lattner wrote:
> > I was attempting to reduce the number of files affected, but if you
> > want this change I'll go ahead and do it.
>
> Makes sense, thanks. Please do it as a separate patch from the other
> changes though since it will be large and mechanical.
Ok, no problem.
> > - Tag instructons with source line information
2020 Jun 16
14
[PATCH v4 0/3] mm, treewide: Rename kzfree() to kfree_sensitive()
v4:
- Break out the memzero_explicit() change as suggested by Dan Carpenter
so that it can be backported to stable.
- Drop the "crypto: Remove unnecessary memzero_explicit()" patch for
now as there can be a bit more discussion on what is best. It will be
introduced as a separate patch later on after this one is merged.
This patchset makes a global rename of the kzfree()
2020 Jun 16
14
[PATCH v4 0/3] mm, treewide: Rename kzfree() to kfree_sensitive()
v4:
- Break out the memzero_explicit() change as suggested by Dan Carpenter
so that it can be backported to stable.
- Drop the "crypto: Remove unnecessary memzero_explicit()" patch for
now as there can be a bit more discussion on what is best. It will be
introduced as a separate patch later on after this one is merged.
This patchset makes a global rename of the kzfree()
2020 Apr 13
10
[PATCH 0/2] mm, treewide: Rename kzfree() to kfree_sensitive()
This patchset makes a global rename of the kzfree() to kfree_sensitive()
to highlight the fact buffer clearing is only needed if the data objects
contain sensitive information like encrpytion key. The fact that kzfree()
uses memset() to do the clearing isn't totally safe either as compiler
may compile out the clearing in their optimizer. Instead, the new
kfree_sensitive() uses
2020 Jun 16
3
[PATCH v5 0/2] mm, treewide: Rename kzfree() to kfree_sensitive()
v5:
- Break the btrfs patch out as a separate patch to be processed
independently.
- Update the commit log of patch 1 to make it less scary.
- Add a kzfree backward compatibility macro in patch 2.
v4:
- Break out the memzero_explicit() change as suggested by Dan Carpenter
so that it can be backported to stable.
- Drop the "crypto: Remove unnecessary
2020 Apr 13
0
[PATCH 1/2] mm, treewide: Rename kzfree() to kfree_sensitive()
...nt cc_get_plain_hmac_key(struct crypto_aead *tfm, const u8 *authkey,
if (dma_mapping_error(dev, key_dma_addr)) {
dev_err(dev, "Mapping key va=0x%p len=%u for DMA failed\n",
key, keylen);
- kzfree(key);
+ kfree_sensitive(key);
return -ENOMEM;
}
if (keylen > blocksize) {
@@ -533,7 +533,7 @@ static int cc_get_plain_hmac_key(struct crypto_aead *tfm, const u8 *authkey,
if (key_dma_addr)
dma_unmap_single(dev, key_dma_addr, keylen, DMA_TO_DEVICE);
- kzfree(key);
+ kfree_sensitive(key);
return rc;
}
diff --git a/drivers/crypto/ccree/cc_buffer_mgr.c b/drive...
2020 Jun 16
0
[PATCH v5 2/2] mm, treewide: Rename kzfree() to kfree_sensitive()
...nt cc_get_plain_hmac_key(struct crypto_aead *tfm, const u8 *authkey,
if (dma_mapping_error(dev, key_dma_addr)) {
dev_err(dev, "Mapping key va=0x%p len=%u for DMA failed\n",
key, keylen);
- kzfree(key);
+ kfree_sensitive(key);
return -ENOMEM;
}
if (keylen > blocksize) {
@@ -533,7 +533,7 @@ static int cc_get_plain_hmac_key(struct crypto_aead *tfm, const u8 *authkey,
if (key_dma_addr)
dma_unmap_single(dev, key_dma_addr, keylen, DMA_TO_DEVICE);
- kzfree(key);
+ kfree_sensitive(key);
return rc;
}
diff --git a/drivers/crypto/ccree/cc_buffer_mgr.c b/drive...
2020 Jun 16
0
[PATCH v4 2/3] mm, treewide: Rename kzfree() to kfree_sensitive()
...nt cc_get_plain_hmac_key(struct crypto_aead *tfm, const u8 *authkey,
if (dma_mapping_error(dev, key_dma_addr)) {
dev_err(dev, "Mapping key va=0x%p len=%u for DMA failed\n",
key, keylen);
- kzfree(key);
+ kfree_sensitive(key);
return -ENOMEM;
}
if (keylen > blocksize) {
@@ -533,7 +533,7 @@ static int cc_get_plain_hmac_key(struct crypto_aead *tfm, const u8 *authkey,
if (key_dma_addr)
dma_unmap_single(dev, key_dma_addr, keylen, DMA_TO_DEVICE);
- kzfree(key);
+ kfree_sensitive(key);
return rc;
}
diff --git a/drivers/crypto/ccree/cc_buffer_mgr.c b/drive...