Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
5c0f220e
K
Kernel
项目概览
openeuler
/
Kernel
大约 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
5c0f220e
编写于
2月 02, 2023
作者:
K
Kees Cook
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-linus/hardening' into for-next/hardening
上级
5a6b64ad
be0d8f48
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
27 addition
and
6 deletion
+27
-6
drivers/firmware/google/coreboot_table.c
drivers/firmware/google/coreboot_table.c
+7
-2
drivers/firmware/google/coreboot_table.h
drivers/firmware/google/coreboot_table.h
+1
-0
drivers/md/bcache/bcache_ondisk.h
drivers/md/bcache/bcache_ondisk.h
+2
-1
drivers/md/bcache/journal.c
drivers/md/bcache/journal.c
+2
-1
init/Makefile
init/Makefile
+1
-0
lib/Kconfig.debug
lib/Kconfig.debug
+9
-0
lib/memcpy_kunit.c
lib/memcpy_kunit.c
+2
-0
scripts/Makefile.vmlinux
scripts/Makefile.vmlinux
+1
-0
scripts/gcc-plugins/gcc-common.h
scripts/gcc-plugins/gcc-common.h
+2
-2
未找到文件。
drivers/firmware/google/coreboot_table.c
浏览文件 @
5c0f220e
...
@@ -93,14 +93,19 @@ static int coreboot_table_populate(struct device *dev, void *ptr)
...
@@ -93,14 +93,19 @@ static int coreboot_table_populate(struct device *dev, void *ptr)
for
(
i
=
0
;
i
<
header
->
table_entries
;
i
++
)
{
for
(
i
=
0
;
i
<
header
->
table_entries
;
i
++
)
{
entry
=
ptr_entry
;
entry
=
ptr_entry
;
device
=
kzalloc
(
sizeof
(
struct
device
)
+
entry
->
size
,
GFP_KERNEL
);
if
(
entry
->
size
<
sizeof
(
*
entry
))
{
dev_warn
(
dev
,
"coreboot table entry too small!
\n
"
);
return
-
EINVAL
;
}
device
=
kzalloc
(
sizeof
(
device
->
dev
)
+
entry
->
size
,
GFP_KERNEL
);
if
(
!
device
)
if
(
!
device
)
return
-
ENOMEM
;
return
-
ENOMEM
;
device
->
dev
.
parent
=
dev
;
device
->
dev
.
parent
=
dev
;
device
->
dev
.
bus
=
&
coreboot_bus_type
;
device
->
dev
.
bus
=
&
coreboot_bus_type
;
device
->
dev
.
release
=
coreboot_device_release
;
device
->
dev
.
release
=
coreboot_device_release
;
memcpy
(
&
device
->
entry
,
ptr_entry
,
entry
->
size
);
memcpy
(
device
->
raw
,
ptr_entry
,
entry
->
size
);
switch
(
device
->
entry
.
tag
)
{
switch
(
device
->
entry
.
tag
)
{
case
LB_TAG_CBMEM_ENTRY
:
case
LB_TAG_CBMEM_ENTRY
:
...
...
drivers/firmware/google/coreboot_table.h
浏览文件 @
5c0f220e
...
@@ -79,6 +79,7 @@ struct coreboot_device {
...
@@ -79,6 +79,7 @@ struct coreboot_device {
struct
lb_cbmem_ref
cbmem_ref
;
struct
lb_cbmem_ref
cbmem_ref
;
struct
lb_cbmem_entry
cbmem_entry
;
struct
lb_cbmem_entry
cbmem_entry
;
struct
lb_framebuffer
framebuffer
;
struct
lb_framebuffer
framebuffer
;
DECLARE_FLEX_ARRAY
(
u8
,
raw
);
};
};
};
};
...
...
drivers/md/bcache/bcache_ondisk.h
浏览文件 @
5c0f220e
...
@@ -106,7 +106,8 @@ static inline unsigned long bkey_bytes(const struct bkey *k)
...
@@ -106,7 +106,8 @@ static inline unsigned long bkey_bytes(const struct bkey *k)
return
bkey_u64s
(
k
)
*
sizeof
(
__u64
);
return
bkey_u64s
(
k
)
*
sizeof
(
__u64
);
}
}
#define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src))
#define bkey_copy(_dest, _src) unsafe_memcpy(_dest, _src, bkey_bytes(_src), \
/* bkey is always padded */
)
static
inline
void
bkey_copy_key
(
struct
bkey
*
dest
,
const
struct
bkey
*
src
)
static
inline
void
bkey_copy_key
(
struct
bkey
*
dest
,
const
struct
bkey
*
src
)
{
{
...
...
drivers/md/bcache/journal.c
浏览文件 @
5c0f220e
...
@@ -149,7 +149,8 @@ reread: left = ca->sb.bucket_size - offset;
...
@@ -149,7 +149,8 @@ reread: left = ca->sb.bucket_size - offset;
bytes
,
GFP_KERNEL
);
bytes
,
GFP_KERNEL
);
if
(
!
i
)
if
(
!
i
)
return
-
ENOMEM
;
return
-
ENOMEM
;
memcpy
(
&
i
->
j
,
j
,
bytes
);
unsafe_memcpy
(
&
i
->
j
,
j
,
bytes
,
/* "bytes" was calculated by set_bytes() above */
);
/* Add to the location after 'where' points to */
/* Add to the location after 'where' points to */
list_add
(
&
i
->
list
,
where
);
list_add
(
&
i
->
list
,
where
);
ret
=
1
;
ret
=
1
;
...
...
init/Makefile
浏览文件 @
5c0f220e
...
@@ -59,3 +59,4 @@ include/generated/utsversion.h: FORCE
...
@@ -59,3 +59,4 @@ include/generated/utsversion.h: FORCE
$(obj)/version-timestamp.o
:
include/generated/utsversion.h
$(obj)/version-timestamp.o
:
include/generated/utsversion.h
CFLAGS_version-timestamp.o
:=
-include
include/generated/utsversion.h
CFLAGS_version-timestamp.o
:=
-include
include/generated/utsversion.h
KASAN_SANITIZE_version-timestamp.o
:=
n
lib/Kconfig.debug
浏览文件 @
5c0f220e
...
@@ -2566,6 +2566,15 @@ config MEMCPY_KUNIT_TEST
...
@@ -2566,6 +2566,15 @@ config MEMCPY_KUNIT_TEST
If unsure, say N.
If unsure, say N.
config MEMCPY_SLOW_KUNIT_TEST
bool "Include exhaustive memcpy tests"
depends on MEMCPY_KUNIT_TEST
default y
help
Some memcpy tests are quite exhaustive in checking for overlaps
and bit ranges. These can be very slow, so they are split out
as a separate config, in case they need to be disabled.
config IS_SIGNED_TYPE_KUNIT_TEST
config IS_SIGNED_TYPE_KUNIT_TEST
tristate "Test is_signed_type() macro" if !KUNIT_ALL_TESTS
tristate "Test is_signed_type() macro" if !KUNIT_ALL_TESTS
depends on KUNIT
depends on KUNIT
...
...
lib/memcpy_kunit.c
浏览文件 @
5c0f220e
...
@@ -309,6 +309,8 @@ static void set_random_nonzero(struct kunit *test, u8 *byte)
...
@@ -309,6 +309,8 @@ static void set_random_nonzero(struct kunit *test, u8 *byte)
static
void
init_large
(
struct
kunit
*
test
)
static
void
init_large
(
struct
kunit
*
test
)
{
{
if
(
!
IS_ENABLED
(
CONFIG_MEMCPY_SLOW_KUNIT_TEST
))
kunit_skip
(
test
,
"Slow test skipped. Enable with CONFIG_MEMCPY_SLOW_KUNIT_TEST=y"
);
/* Get many bit patterns. */
/* Get many bit patterns. */
get_random_bytes
(
large_src
,
ARRAY_SIZE
(
large_src
));
get_random_bytes
(
large_src
,
ARRAY_SIZE
(
large_src
));
...
...
scripts/Makefile.vmlinux
浏览文件 @
5c0f220e
...
@@ -18,6 +18,7 @@ quiet_cmd_cc_o_c = CC $@
...
@@ -18,6 +18,7 @@ quiet_cmd_cc_o_c = CC $@
$(
call
if_changed_dep,cc_o_c
)
$(
call
if_changed_dep,cc_o_c
)
ifdef
CONFIG_MODULES
ifdef
CONFIG_MODULES
KASAN_SANITIZE_.vmlinux.export.o
:=
n
targets
+=
.vmlinux.export.o
targets
+=
.vmlinux.export.o
vmlinux
:
.vmlinux.export.o
vmlinux
:
.vmlinux.export.o
endif
endif
...
...
scripts/gcc-plugins/gcc-common.h
浏览文件 @
5c0f220e
...
@@ -71,7 +71,9 @@
...
@@ -71,7 +71,9 @@
#include "varasm.h"
#include "varasm.h"
#include "stor-layout.h"
#include "stor-layout.h"
#include "internal-fn.h"
#include "internal-fn.h"
#include "gimple.h"
#include "gimple-expr.h"
#include "gimple-expr.h"
#include "gimple-iterator.h"
#include "gimple-fold.h"
#include "gimple-fold.h"
#include "context.h"
#include "context.h"
#include "tree-ssa-alias.h"
#include "tree-ssa-alias.h"
...
@@ -85,10 +87,8 @@
...
@@ -85,10 +87,8 @@
#include "tree-eh.h"
#include "tree-eh.h"
#include "stmt.h"
#include "stmt.h"
#include "gimplify.h"
#include "gimplify.h"
#include "gimple.h"
#include "tree-phinodes.h"
#include "tree-phinodes.h"
#include "tree-cfg.h"
#include "tree-cfg.h"
#include "gimple-iterator.h"
#include "gimple-ssa.h"
#include "gimple-ssa.h"
#include "ssa-iterators.h"
#include "ssa-iterators.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录