similar to: [PATCH 05/30] crypto: Use kmemdup rather than duplicating its implementation

Displaying 20 results from an estimated 200 matches similar to: "[PATCH 05/30] crypto: Use kmemdup rather than duplicating its implementation"

2019 Jul 03
0
[PATCH v2 06/35] crypto: Use kmemdup rather than duplicating its implementation
On Thu, Jul 04, 2019 at 12:27:08AM +0800, Fuqian Huang wrote: > kmemdup is introduced to duplicate a region of memory in a neat way. > Rather than kmalloc/kzalloc + memcpy, which the programmer needs to > write the size twice (sometimes lead to mistakes), kmemdup improves > readability, leads to smaller code and also reduce the chances of mistakes. > Suggestion to use kmemdup rather
2019 Jul 03
3
[PATCH v2 06/35] crypto: Use kmemdup rather than duplicating its implementation
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang <huangfq.daxian
2019 Jul 03
3
[PATCH v2 06/35] crypto: Use kmemdup rather than duplicating its implementation
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang <huangfq.daxian
2020 Jun 16
0
[PATCH v5 2/2] mm, treewide: Rename kzfree() to kfree_sensitive()
As said by Linus: A symmetric naming is only helpful if it implies symmetries in use. Otherwise it's actively misleading. In "kzalloc()", the z is meaningful and an important part of what the caller wants. In "kzfree()", the z is actively detrimental, because maybe in the future we really _might_ want to use that "memfill(0xdeadbeef)" or
2020 Apr 13
0
[PATCH 1/2] mm, treewide: Rename kzfree() to kfree_sensitive()
As said by Linus: A symmetric naming is only helpful if it implies symmetries in use. Otherwise it's actively misleading. In "kzalloc()", the z is meaningful and an important part of what the caller wants. In "kzfree()", the z is actively detrimental, because maybe in the future we really _might_ want to use that "memfill(0xdeadbeef)" or
2020 Jun 16
0
[PATCH v4 2/3] mm, treewide: Rename kzfree() to kfree_sensitive()
As said by Linus: A symmetric naming is only helpful if it implies symmetries in use. Otherwise it's actively misleading. In "kzalloc()", the z is meaningful and an important part of what the caller wants. In "kzfree()", the z is actively detrimental, because maybe in the future we really _might_ want to use that "memfill(0xdeadbeef)" or
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 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
2012 Dec 27
3
[PATCH] hostfile: list known names (if any) for new hostkeys
When connecting to a host for which there's no known hostkey, check if the relevant key has been accepted for other hostnames. This is useful when connecting to a host with a dymamic IP address or multiple names. --- auth.c | 4 ++-- hostfile.c | 42 ++++++++++++++++++++++++++++-------------- hostfile.h | 8 ++++++-- sshconnect.c | 39 +++++++++++++++++++++++++++++++++------
2019 Oct 12
0
drm/nouveau: Checking a kmemdup() call in nouveau_connector_of_detect()
Hello, I tried another script for the semantic patch language out. This source code analysis approach points out that the implementation of the function ?nouveau_connector_of_detect? contains still an unchecked call of the function ?kmemdup?.
2016 Dec 28
0
[PATCH] net: Use kmemdup instead of kmalloc and memcpy
From: Shyam Saini <mayhs11saini at gmail.com> Date: Sat, 24 Dec 2016 00:44:58 +0530 > when some other buffer is immediately copied into allocated region. > Replace calls to kmalloc followed by a memcpy with a direct > call to kmemdup. > > Signed-off-by: Shyam Saini <mayhs11saini at gmail.com> Applied.
2016 Dec 23
1
[PATCH] net: Use kmemdup instead of kmalloc and memcpy
when some other buffer is immediately copied into allocated region. Replace calls to kmalloc followed by a memcpy with a direct call to kmemdup. Signed-off-by: Shyam Saini <mayhs11saini at gmail.com> --- drivers/net/virtio_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index ba1aa24..dde4bc4 100644 ---
2016 Dec 23
1
[PATCH] net: Use kmemdup instead of kmalloc and memcpy
when some other buffer is immediately copied into allocated region. Replace calls to kmalloc followed by a memcpy with a direct call to kmemdup. Signed-off-by: Shyam Saini <mayhs11saini at gmail.com> --- drivers/net/virtio_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index ba1aa24..dde4bc4 100644 ---
2023 Dec 14
0
[PATCH linux-next] drm/nouveau/disp: switch to use kmemdup() helper
On Thu, Dec 14, 2023 at 08:03:22PM +0800, yang.guang5 at zte.com.cn wrote: > From: Yang Guang <yang.guang5 at zte.com.cn> > > Use kmemdup() helper instead of open-coding to > simplify the code. > > Signed-off-by: Chen Haonan <chen.haonan2 at zte.com.cn> Sure, good cleanup. Reviewed-by: Kees Cook <keescook at chromium.org> -- Kees Cook
2024 Jan 10
0
[PATCH linux-next v2] drm/nouveau/disp: switch to use kmemdup() helper
On 1/9/24 07:24, yang.guang5 at zte.com.cn wrote: > From: Chen Haonan <chen.haonan2 at zte.com.cn> > > Use kmemdup() helper instead of open-coding to > simplify the code. > > Signed-off-by: Chen Haonan <chen.haonan2 at zte.com.cn> > Reviewed-by: Yang Guang <yang.guang5 at zte.com.cn> Applied to drm-misc-next, thanks! > --- >
2024 Jan 09
1
[PATCH linux-next v2] drm/nouveau/disp: switch to use kmemdup() helper
From: Chen Haonan <chen.haonan2 at zte.com.cn> Use kmemdup() helper instead of open-coding to simplify the code. Signed-off-by: Chen Haonan <chen.haonan2 at zte.com.cn> Reviewed-by: Yang Guang <yang.guang5 at zte.com.cn> --- drivers/gpu/drm/nouveau/nvif/outp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvif/outp.c
2013 Mar 10
1
[PATCH] fs: fs2fs: Replaced calls to kmalloc and memcpy with kmemdup
Replaced calls to kmalloc followd by memcpy with a single call to kmemdup. This patch was found using coccicheck. Signed-off-by: Alexandru Gheorghiu <gheorghiuandru at gmail.com> --- fs/ocfs2/localalloc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index aebeacd..839183f 100644 --- a/fs/ocfs2/localalloc.c +++
2023 Dec 14
2
[PATCH linux-next] drm/nouveau/disp: switch to use kmemdup() helper
From: Yang Guang <yang.guang5 at zte.com.cn> Use kmemdup() helper instead of open-coding to simplify the code. Signed-off-by: Chen Haonan <chen.haonan2 at zte.com.cn> --- drivers/gpu/drm/nouveau/nvif/outp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvif/outp.c b/drivers/gpu/drm/nouveau/nvif/outp.c index 5d3190c05250..6daeb7f0b09b