提交 17329178 编写于 作者: T Tan Xiaojun 提交者: Xie XiuQi

kabi: reserve space for scsi related structure

hulk inclusion
category: feature
bugzilla: 13276
CVE: NA

-------------------------------

Reserve space for the structure in scsi.
Signed-off-by: NTan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 e202760d
......@@ -2,6 +2,8 @@
#ifndef _SCSI_DISK_H
#define _SCSI_DISK_H
#include <linux/kabi.h>
/*
* More than enough for everybody ;) The huge number of majors
* is a leftover from 16bit dev_t days, we don't really need that
......@@ -117,6 +119,9 @@ struct scsi_disk {
unsigned urswrz : 1;
unsigned security : 1;
unsigned ignore_medium_access_errors : 1;
KABI_RESERVE(1)
KABI_RESERVE(2)
};
#define to_scsi_disk(obj) container_of(obj,struct scsi_disk,dev)
......
......@@ -2,6 +2,7 @@
#ifndef _SCSI_SCSI_CMND_H
#define _SCSI_SCSI_CMND_H
#include <linux/kabi.h>
#include <linux/dma-mapping.h>
#include <linux/blkdev.h>
#include <linux/t10-pi.h>
......@@ -147,6 +148,11 @@ struct scsi_cmnd {
int flags; /* Command flags */
unsigned char tag; /* SCSI-II queued command tag */
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
};
/*
......
......@@ -2,6 +2,7 @@
#ifndef _SCSI_SCSI_DEVICE_H
#define _SCSI_SCSI_DEVICE_H
#include <linux/kabi.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/workqueue.h>
......@@ -227,6 +228,13 @@ struct scsi_device {
struct mutex state_mutex;
enum scsi_device_state sdev_state;
struct task_struct *quiesced_by;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
KABI_RESERVE(5)
KABI_RESERVE(6)
unsigned long sdev_data[0];
} __attribute__((aligned(sizeof(unsigned long))));
......@@ -311,6 +319,11 @@ struct scsi_target {
char scsi_level;
enum scsi_target_state state;
void *hostdata; /* available to low-level driver */
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
unsigned long starget_data[0]; /* for the transport */
/* starget_data must be the last element!!!! */
} __attribute__((aligned(sizeof(unsigned long))));
......
......@@ -2,6 +2,7 @@
#ifndef _SCSI_SCSI_HOST_H
#define _SCSI_SCSI_HOST_H
#include <linux/kabi.h>
#include <linux/device.h>
#include <linux/list.h>
#include <linux/types.h>
......@@ -486,6 +487,11 @@ struct scsi_host_template {
*/
unsigned int cmd_size;
struct scsi_host_cmd_pool *cmd_pool;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
};
/*
......@@ -704,6 +710,13 @@ struct Scsi_Host {
*/
struct device *dma_dev;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
KABI_RESERVE(5)
KABI_RESERVE(6)
/*
* We should ensure that this is aligned, both for better performance
* and also because some compilers (m68k) don't automatically force
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册