Import of kernel-4.18.0-553.153.1.el8_10
This commit is contained in:
parent
88c4dfe6d0
commit
26e49da668
@ -12,7 +12,7 @@ RHEL_MINOR = 10
|
||||
#
|
||||
# Use this spot to avoid future merge conflicts.
|
||||
# Do not trim this comment.
|
||||
RHEL_RELEASE = 553.151.1
|
||||
RHEL_RELEASE = 553.153.1
|
||||
|
||||
#
|
||||
# ZSTREAM
|
||||
|
||||
@ -629,6 +629,9 @@
|
||||
#define MSR_ZEN2_SPECTRAL_CHICKEN 0xc00110e3
|
||||
#define MSR_ZEN2_SPECTRAL_CHICKEN_BIT BIT_ULL(1)
|
||||
|
||||
#define MSR_ZEN4_BP_CFG 0xc001102e
|
||||
#define MSR_ZEN2_BP_CFG_BUG_FIX_BIT 33
|
||||
|
||||
/* Fam 16h MSRs */
|
||||
#define MSR_F16H_L2I_PERF_CTL 0xc0010230
|
||||
#define MSR_F16H_L2I_PERF_CTR 0xc0010231
|
||||
|
||||
@ -1008,6 +1008,24 @@ void init_spectral_chicken(struct cpuinfo_x86 *c)
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool is_amd_zen2(struct cpuinfo_x86 *c)
|
||||
{
|
||||
if (c->x86 == 0x17) {
|
||||
switch (c->x86_model) {
|
||||
case 0x30 ... 0x4f:
|
||||
case 0x60 ... 0x7f:
|
||||
case 0x90 ... 0x91:
|
||||
case 0xa0 ... 0xaf:
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void init_amd_zn(struct cpuinfo_x86 *c)
|
||||
{
|
||||
set_cpu_cap(c, X86_FEATURE_ZEN);
|
||||
@ -1023,6 +1041,9 @@ static void init_amd_zn(struct cpuinfo_x86 *c)
|
||||
if (!cpu_has(c, X86_FEATURE_CPB))
|
||||
set_cpu_cap(c, X86_FEATURE_CPB);
|
||||
|
||||
if (is_amd_zen2(c))
|
||||
msr_set_bit(MSR_ZEN4_BP_CFG, MSR_ZEN2_BP_CFG_BUG_FIX_BIT);
|
||||
|
||||
/*
|
||||
* Zen3 (Fam19 model < 0x10) parts are not susceptible to
|
||||
* Branch Type Confusion, but predate the allocation of the
|
||||
|
||||
@ -1125,6 +1125,26 @@ static void storvsc_command_completion(struct storvsc_cmd_request *cmd_request,
|
||||
kfree(payload);
|
||||
}
|
||||
|
||||
/*
|
||||
* The current SCSI handling on the host side does not correctly handle:
|
||||
* INQUIRY with page code 0x80, MODE_SENSE / MODE_SENSE_10 with cmd[2] == 0x1c,
|
||||
* and (for FC) MAINTENANCE_IN / PERSISTENT_RESERVE_IN passthrough.
|
||||
*/
|
||||
static bool storvsc_host_mishandles_cmd(u8 opcode, struct hv_device *device)
|
||||
{
|
||||
switch (opcode) {
|
||||
case INQUIRY:
|
||||
case MODE_SENSE:
|
||||
case MODE_SENSE_10:
|
||||
return true;
|
||||
case MAINTENANCE_IN:
|
||||
case PERSISTENT_RESERVE_IN:
|
||||
return hv_dev_is_fc(device);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static void storvsc_on_io_completion(struct storvsc_device *stor_device,
|
||||
struct vstor_packet *vstor_packet,
|
||||
struct storvsc_cmd_request *request)
|
||||
@ -1135,21 +1155,12 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
|
||||
stor_pkt = &request->vstor_packet;
|
||||
|
||||
/*
|
||||
* The current SCSI handling on the host side does
|
||||
* not correctly handle:
|
||||
* INQUIRY command with page code parameter set to 0x80
|
||||
* MODE_SENSE command with cmd[2] == 0x1c
|
||||
* MAINTENANCE_IN is not supported by HyperV FC passthrough
|
||||
*
|
||||
* Setup srb and scsi status so this won't be fatal.
|
||||
* We do this so we can distinguish truly fatal failues
|
||||
* (srb status == 0x4) and off-line the device in that case.
|
||||
*/
|
||||
|
||||
if ((stor_pkt->vm_srb.cdb[0] == INQUIRY) ||
|
||||
(stor_pkt->vm_srb.cdb[0] == MODE_SENSE) ||
|
||||
(stor_pkt->vm_srb.cdb[0] == MAINTENANCE_IN &&
|
||||
hv_dev_is_fc(device))) {
|
||||
if (storvsc_host_mishandles_cmd(stor_pkt->vm_srb.cdb[0], device)) {
|
||||
vstor_packet->vm_srb.scsi_status = 0;
|
||||
vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@ -1319,6 +1319,19 @@ static int gfs2_block_zero_range(struct inode *inode, loff_t from,
|
||||
return iomap_zero_range(inode, from, length, NULL, &gfs2_iomap_ops);
|
||||
}
|
||||
|
||||
int gfs2_clear_beyond_eof(struct inode *inode, loff_t end)
|
||||
{
|
||||
loff_t isize = i_size_read(inode);
|
||||
unsigned int len = isize & ~PAGE_MASK;
|
||||
|
||||
if (!len || isize >= end)
|
||||
return 0;
|
||||
len = PAGE_SIZE - len;
|
||||
if (end - isize < len)
|
||||
len = end - isize;
|
||||
return gfs2_block_zero_range(inode, isize, len);
|
||||
}
|
||||
|
||||
#define GFS2_JTRUNC_REVOKES 8192
|
||||
|
||||
/**
|
||||
@ -2100,6 +2113,12 @@ static int do_grow(struct inode *inode, u64 size)
|
||||
unstuff = 1;
|
||||
}
|
||||
|
||||
if (!unstuff) {
|
||||
error = gfs2_clear_beyond_eof(inode, size);
|
||||
if (error)
|
||||
goto do_grow_qunlock;
|
||||
}
|
||||
|
||||
error = gfs2_trans_begin(sdp, RES_DINODE + RES_STATFS + RES_RG_BIT +
|
||||
(unstuff &&
|
||||
gfs2_is_jdata(ip) ? RES_JDATA : 0) +
|
||||
|
||||
@ -60,6 +60,7 @@ int gfs2_get_extent(struct inode *inode, u64 lblock, u64 *dblock,
|
||||
unsigned int *extlen);
|
||||
int gfs2_alloc_extent(struct inode *inode, u64 lblock, u64 *dblock,
|
||||
unsigned *extlen, bool *new);
|
||||
int gfs2_clear_beyond_eof(struct inode *inode, loff_t end);
|
||||
int gfs2_setattr_size(struct inode *inode, u64 size);
|
||||
void gfs2_trim_blocks(struct inode *inode);
|
||||
int gfs2_truncatei_resume(struct gfs2_inode *ip);
|
||||
|
||||
@ -1042,6 +1042,10 @@ retry:
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
ret = gfs2_clear_beyond_eof(inode, iocb->ki_pos);
|
||||
if (ret)
|
||||
goto out_unlock;
|
||||
|
||||
current->backing_dev_info = inode_to_bdi(inode);
|
||||
pagefault_disable();
|
||||
ret = iomap_file_buffered_write(iocb, from, &gfs2_iomap_ops);
|
||||
@ -1249,6 +1253,12 @@ static long __gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t
|
||||
|
||||
next = (next + 1) << sdp->sd_sb.sb_bsize_shift;
|
||||
|
||||
if (!(mode & FALLOC_FL_KEEP_SIZE)) {
|
||||
error = gfs2_clear_beyond_eof(inode, offset + len);
|
||||
if (error)
|
||||
return error;
|
||||
}
|
||||
|
||||
offset &= bsize_mask;
|
||||
|
||||
len = next - offset;
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
|
||||
kernel.centos,1,Red Hat,kernel-core,4.18.0-553.151.1.el8.x86_64,mailto:secalert@redhat.com
|
||||
kernel.centos,1,Red Hat,kernel-core,4.18.0-553.153.1.el8.x86_64,mailto:secalert@redhat.com
|
||||
|
||||
@ -1161,6 +1161,16 @@ struct bpf_prog *bpf_jit_blind_constants(struct bpf_prog *prog)
|
||||
insn = clone->insnsi;
|
||||
|
||||
for (i = 0; i < insn_cnt; i++, insn++) {
|
||||
if (bpf_pseudo_func(insn)) {
|
||||
/* ld_imm64 with an address of bpf subprog is not
|
||||
* a user controlled constant. Don't randomize it,
|
||||
* since it will conflict with jit_subprogs() logic.
|
||||
*/
|
||||
insn++;
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* We temporarily need to hold the original ld64 insn
|
||||
* so that we can still access the first part in the
|
||||
* second blinding run.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user