mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
Merge tag 'bounds-fixes-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull bounds fixes from Kees Cook: "These are a handful of buffer and array bounds fixes that I've been carrying in preparation for the coming memcpy improvements and the enabling of '-Warray-bounds' globally. There are additional similar fixes in other maintainer's trees, but these ended up getting carried by me. :)" * tag 'bounds-fixes-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: media: omap3isp: Use struct_group() for memcpy() region tpm: vtpm_proxy: Check length to avoid compiler warning alpha: Silence -Warray-bounds warnings m68k: cmpxchg: Dereference matching size intel_th: msu: Use memset_startat() for clearing hw header KVM: x86: Replace memset() "optimization" with normal per-field writes
This commit is contained in:
@@ -162,6 +162,7 @@ struct omap3isp_h3a_aewb_config {
|
||||
* struct omap3isp_stat_data - Statistic data sent to or received from user
|
||||
* @ts: Timestamp of returned framestats.
|
||||
* @buf: Pointer to pass to user.
|
||||
* @buf_size: Size of buffer.
|
||||
* @frame_number: Frame number of requested stats.
|
||||
* @cur_frame: Current frame number being processed.
|
||||
* @config_counter: Number of the configuration associated with the data.
|
||||
@@ -176,10 +177,12 @@ struct omap3isp_stat_data {
|
||||
struct timeval ts;
|
||||
#endif
|
||||
void __user *buf;
|
||||
__u32 buf_size;
|
||||
__u16 frame_number;
|
||||
__u16 cur_frame;
|
||||
__u16 config_counter;
|
||||
__struct_group(/* no tag */, frame, /* no attrs */,
|
||||
__u32 buf_size;
|
||||
__u16 frame_number;
|
||||
__u16 cur_frame;
|
||||
__u16 config_counter;
|
||||
);
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
@@ -189,10 +192,12 @@ struct omap3isp_stat_data_time32 {
|
||||
__s32 tv_usec;
|
||||
} ts;
|
||||
__u32 buf;
|
||||
__u32 buf_size;
|
||||
__u16 frame_number;
|
||||
__u16 cur_frame;
|
||||
__u16 config_counter;
|
||||
__struct_group(/* no tag */, frame, /* no attrs */,
|
||||
__u32 buf_size;
|
||||
__u16 frame_number;
|
||||
__u16 cur_frame;
|
||||
__u16 config_counter;
|
||||
);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user