Import of kernel-6.12.0-211.26.1.el10_2
This commit is contained in:
parent
3d57f395f9
commit
f190b9663a
@ -428,10 +428,17 @@ void do_secure_storage_access(struct pt_regs *regs)
|
||||
folio = phys_to_folio(addr);
|
||||
if (unlikely(!folio_try_get(folio)))
|
||||
return;
|
||||
rc = arch_make_folio_accessible(folio);
|
||||
rc = uv_convert_from_secure(folio_to_phys(folio));
|
||||
if (!rc)
|
||||
clear_bit(PG_arch_1, &folio->flags);
|
||||
folio_put(folio);
|
||||
/*
|
||||
* There are some valid fixup types for kernel
|
||||
* accesses to donated secure memory. zeropad is one
|
||||
* of them.
|
||||
*/
|
||||
if (rc)
|
||||
BUG();
|
||||
return handle_fault_error_nolock(regs, 0);
|
||||
} else {
|
||||
mm = current->mm;
|
||||
mmap_read_lock(mm);
|
||||
|
||||
@ -4780,17 +4780,22 @@ CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y
|
||||
CONFIG_WATCHDOG_OPEN_TIMEOUT=0
|
||||
CONFIG_WATCHDOG_SYSFS=y
|
||||
# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set
|
||||
CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT=y
|
||||
|
||||
#
|
||||
# Watchdog Pretimeout Governors
|
||||
#
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_SEL=m
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV_NOOP is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC=y
|
||||
|
||||
#
|
||||
# Watchdog Device Drivers
|
||||
#
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
# CONFIG_SOFT_WATCHDOG_PRETIMEOUT is not set
|
||||
# CONFIG_LENOVO_SE10_WDT is not set
|
||||
CONFIG_WDAT_WDT=m
|
||||
# CONFIG_XILINX_WATCHDOG is not set
|
||||
|
||||
@ -4766,17 +4766,22 @@ CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y
|
||||
CONFIG_WATCHDOG_OPEN_TIMEOUT=0
|
||||
CONFIG_WATCHDOG_SYSFS=y
|
||||
# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set
|
||||
CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT=y
|
||||
|
||||
#
|
||||
# Watchdog Pretimeout Governors
|
||||
#
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_SEL=m
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV_NOOP is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC=y
|
||||
|
||||
#
|
||||
# Watchdog Device Drivers
|
||||
#
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
# CONFIG_SOFT_WATCHDOG_PRETIMEOUT is not set
|
||||
# CONFIG_LENOVO_SE10_WDT is not set
|
||||
CONFIG_WDAT_WDT=m
|
||||
# CONFIG_XILINX_WATCHDOG is not set
|
||||
|
||||
@ -4748,17 +4748,22 @@ CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y
|
||||
CONFIG_WATCHDOG_OPEN_TIMEOUT=0
|
||||
CONFIG_WATCHDOG_SYSFS=y
|
||||
# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set
|
||||
CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT=y
|
||||
|
||||
#
|
||||
# Watchdog Pretimeout Governors
|
||||
#
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_SEL=m
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV_NOOP is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC=y
|
||||
|
||||
#
|
||||
# Watchdog Device Drivers
|
||||
#
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
# CONFIG_SOFT_WATCHDOG_PRETIMEOUT is not set
|
||||
# CONFIG_LENOVO_SE10_WDT is not set
|
||||
CONFIG_WDAT_WDT=m
|
||||
# CONFIG_XILINX_WATCHDOG is not set
|
||||
|
||||
@ -4762,17 +4762,22 @@ CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y
|
||||
CONFIG_WATCHDOG_OPEN_TIMEOUT=0
|
||||
CONFIG_WATCHDOG_SYSFS=y
|
||||
# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set
|
||||
CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT=y
|
||||
|
||||
#
|
||||
# Watchdog Pretimeout Governors
|
||||
#
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_SEL=m
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV_NOOP is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC=y
|
||||
|
||||
#
|
||||
# Watchdog Device Drivers
|
||||
#
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
# CONFIG_SOFT_WATCHDOG_PRETIMEOUT is not set
|
||||
# CONFIG_LENOVO_SE10_WDT is not set
|
||||
CONFIG_WDAT_WDT=m
|
||||
# CONFIG_XILINX_WATCHDOG is not set
|
||||
|
||||
@ -4780,17 +4780,22 @@ CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y
|
||||
CONFIG_WATCHDOG_OPEN_TIMEOUT=0
|
||||
CONFIG_WATCHDOG_SYSFS=y
|
||||
# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set
|
||||
CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT=y
|
||||
|
||||
#
|
||||
# Watchdog Pretimeout Governors
|
||||
#
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_SEL=m
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV_NOOP is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC=y
|
||||
|
||||
#
|
||||
# Watchdog Device Drivers
|
||||
#
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
# CONFIG_SOFT_WATCHDOG_PRETIMEOUT is not set
|
||||
# CONFIG_LENOVO_SE10_WDT is not set
|
||||
CONFIG_WDAT_WDT=m
|
||||
# CONFIG_XILINX_WATCHDOG is not set
|
||||
|
||||
@ -4766,17 +4766,22 @@ CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y
|
||||
CONFIG_WATCHDOG_OPEN_TIMEOUT=0
|
||||
CONFIG_WATCHDOG_SYSFS=y
|
||||
# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set
|
||||
CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT=y
|
||||
|
||||
#
|
||||
# Watchdog Pretimeout Governors
|
||||
#
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_SEL=m
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV_NOOP is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC=y
|
||||
|
||||
#
|
||||
# Watchdog Device Drivers
|
||||
#
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
# CONFIG_SOFT_WATCHDOG_PRETIMEOUT is not set
|
||||
# CONFIG_LENOVO_SE10_WDT is not set
|
||||
CONFIG_WDAT_WDT=m
|
||||
# CONFIG_XILINX_WATCHDOG is not set
|
||||
|
||||
@ -4748,17 +4748,22 @@ CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y
|
||||
CONFIG_WATCHDOG_OPEN_TIMEOUT=0
|
||||
CONFIG_WATCHDOG_SYSFS=y
|
||||
# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set
|
||||
CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT=y
|
||||
|
||||
#
|
||||
# Watchdog Pretimeout Governors
|
||||
#
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_SEL=m
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV_NOOP is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC=y
|
||||
|
||||
#
|
||||
# Watchdog Device Drivers
|
||||
#
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
# CONFIG_SOFT_WATCHDOG_PRETIMEOUT is not set
|
||||
# CONFIG_LENOVO_SE10_WDT is not set
|
||||
CONFIG_WDAT_WDT=m
|
||||
# CONFIG_XILINX_WATCHDOG is not set
|
||||
|
||||
@ -4762,17 +4762,22 @@ CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y
|
||||
CONFIG_WATCHDOG_OPEN_TIMEOUT=0
|
||||
CONFIG_WATCHDOG_SYSFS=y
|
||||
# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set
|
||||
CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT=y
|
||||
|
||||
#
|
||||
# Watchdog Pretimeout Governors
|
||||
#
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_SEL=m
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV_NOOP is not set
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=y
|
||||
CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC=y
|
||||
|
||||
#
|
||||
# Watchdog Device Drivers
|
||||
#
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
# CONFIG_SOFT_WATCHDOG_PRETIMEOUT is not set
|
||||
# CONFIG_LENOVO_SE10_WDT is not set
|
||||
CONFIG_WDAT_WDT=m
|
||||
# CONFIG_XILINX_WATCHDOG is not set
|
||||
|
||||
@ -4547,24 +4547,12 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void cancel_tasks_sync(struct rbd_device *rbd_dev)
|
||||
{
|
||||
dout("%s rbd_dev %p\n", __func__, rbd_dev);
|
||||
|
||||
cancel_work_sync(&rbd_dev->acquired_lock_work);
|
||||
cancel_work_sync(&rbd_dev->released_lock_work);
|
||||
cancel_delayed_work_sync(&rbd_dev->lock_dwork);
|
||||
cancel_work_sync(&rbd_dev->unlock_work);
|
||||
}
|
||||
|
||||
/*
|
||||
* header_rwsem must not be held to avoid a deadlock with
|
||||
* rbd_dev_refresh() when flushing notifies.
|
||||
*/
|
||||
static void rbd_unregister_watch(struct rbd_device *rbd_dev)
|
||||
{
|
||||
cancel_tasks_sync(rbd_dev);
|
||||
|
||||
mutex_lock(&rbd_dev->watch_mutex);
|
||||
if (rbd_dev->watch_state == RBD_WATCH_STATE_REGISTERED)
|
||||
__rbd_unregister_watch(rbd_dev);
|
||||
@ -6539,10 +6527,18 @@ out_err:
|
||||
|
||||
static void rbd_dev_image_unlock(struct rbd_device *rbd_dev)
|
||||
{
|
||||
dout("%s rbd_dev %p\n", __func__, rbd_dev);
|
||||
|
||||
disable_delayed_work_sync(&rbd_dev->lock_dwork);
|
||||
disable_work_sync(&rbd_dev->unlock_work);
|
||||
|
||||
down_write(&rbd_dev->lock_rwsem);
|
||||
if (__rbd_is_lock_owner(rbd_dev))
|
||||
__rbd_release_lock(rbd_dev);
|
||||
up_write(&rbd_dev->lock_rwsem);
|
||||
|
||||
flush_work(&rbd_dev->acquired_lock_work);
|
||||
flush_work(&rbd_dev->released_lock_work);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -3325,9 +3325,10 @@ static int ahash_setkey(struct crypto_ahash *ahash, const u8 *key,
|
||||
if (aligned_len < keylen)
|
||||
return -EOVERFLOW;
|
||||
|
||||
hashed_key = kmemdup(key, aligned_len, GFP_KERNEL);
|
||||
hashed_key = kmalloc(aligned_len, GFP_KERNEL);
|
||||
if (!hashed_key)
|
||||
return -ENOMEM;
|
||||
memcpy(hashed_key, key, keylen);
|
||||
ret = hash_digest_key(ctx, &keylen, hashed_key, digestsize);
|
||||
if (ret)
|
||||
goto bad_free_key;
|
||||
|
||||
@ -10737,12 +10737,10 @@ void bnxt_del_one_rss_ctx(struct bnxt *bp, struct bnxt_rss_ctx *rss_ctx,
|
||||
struct bnxt_ntuple_filter *ntp_fltr;
|
||||
int i;
|
||||
|
||||
if (netif_running(bp->dev)) {
|
||||
bnxt_hwrm_vnic_free_one(bp, &rss_ctx->vnic);
|
||||
for (i = 0; i < BNXT_MAX_CTX_PER_VNIC; i++) {
|
||||
if (vnic->fw_rss_cos_lb_ctx[i] != INVALID_HW_RING_ID)
|
||||
bnxt_hwrm_vnic_ctx_free_one(bp, vnic, i);
|
||||
}
|
||||
bnxt_hwrm_vnic_free_one(bp, &rss_ctx->vnic);
|
||||
for (i = 0; i < BNXT_MAX_CTX_PER_VNIC; i++) {
|
||||
if (vnic->fw_rss_cos_lb_ctx[i] != INVALID_HW_RING_ID)
|
||||
bnxt_hwrm_vnic_ctx_free_one(bp, vnic, i);
|
||||
}
|
||||
if (!all)
|
||||
return;
|
||||
|
||||
@ -1756,6 +1756,27 @@ static int ibmveth_set_mac_addr(struct net_device *dev, void *p)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static netdev_features_t ibmveth_features_check(struct sk_buff *skb,
|
||||
struct net_device *dev,
|
||||
netdev_features_t features)
|
||||
{
|
||||
/* Some physical adapters do not support segmentation offload with
|
||||
* MSS < 224. Disable GSO for such packets to avoid adapter freeze.
|
||||
* Note: Single-segment packets (gso_segs == 1) don't need this check
|
||||
* as they bypass the LSO path and are transmitted without segmentation.
|
||||
*/
|
||||
if (skb_is_gso(skb)) {
|
||||
if (skb_shinfo(skb)->gso_size < IBMVETH_MIN_LSO_MSS) {
|
||||
netdev_warn_once(dev,
|
||||
"MSS %u too small for LSO, disabling GSO\n",
|
||||
skb_shinfo(skb)->gso_size);
|
||||
features &= ~NETIF_F_GSO_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
return vlan_features_check(skb, features);
|
||||
}
|
||||
|
||||
static const struct net_device_ops ibmveth_netdev_ops = {
|
||||
.ndo_open = ibmveth_open,
|
||||
.ndo_stop = ibmveth_close,
|
||||
@ -1767,6 +1788,7 @@ static const struct net_device_ops ibmveth_netdev_ops = {
|
||||
.ndo_set_features = ibmveth_set_features,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_set_mac_address = ibmveth_set_mac_addr,
|
||||
.ndo_features_check = ibmveth_features_check,
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
.ndo_poll_controller = ibmveth_poll_controller,
|
||||
#endif
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
#define IBMVETH_ILLAN_IPV4_TCP_CSUM 0x0000000000000002UL
|
||||
#define IBMVETH_ILLAN_ACTIVE_TRUNK 0x0000000000000001UL
|
||||
|
||||
#define IBMVETH_MIN_LSO_MSS 224 /* Minimum MSS for LSO */
|
||||
/* hcall macros */
|
||||
#define h_register_logical_lan(ua, buflst, rxq, fltlst, mac) \
|
||||
plpar_hcall_norets(H_REGISTER_LOGICAL_LAN, ua, buflst, rxq, fltlst, mac)
|
||||
|
||||
@ -3355,6 +3355,7 @@ static int add_adev(struct gdma_dev *gd, const char *name)
|
||||
struct auxiliary_device *adev;
|
||||
struct mana_adev *madev;
|
||||
int ret;
|
||||
int id;
|
||||
|
||||
madev = kzalloc(sizeof(*madev), GFP_KERNEL);
|
||||
if (!madev)
|
||||
@ -3364,7 +3365,8 @@ static int add_adev(struct gdma_dev *gd, const char *name)
|
||||
ret = mana_adev_idx_alloc();
|
||||
if (ret < 0)
|
||||
goto idx_fail;
|
||||
adev->id = ret;
|
||||
id = ret;
|
||||
adev->id = id;
|
||||
|
||||
adev->name = name;
|
||||
adev->dev.parent = gd->gdma_context->dev;
|
||||
@ -3390,7 +3392,7 @@ add_fail:
|
||||
auxiliary_device_uninit(adev);
|
||||
|
||||
init_fail:
|
||||
mana_adev_idx_free(adev->id);
|
||||
mana_adev_idx_free(id);
|
||||
|
||||
idx_fail:
|
||||
kfree(madev);
|
||||
|
||||
@ -1584,6 +1584,15 @@ static ssize_t bindings_show(const struct bus_type *bus, char *buf)
|
||||
|
||||
static BUS_ATTR_RO(bindings);
|
||||
|
||||
static ssize_t bindings_complete_count_show(const struct bus_type *bus,
|
||||
char *buf)
|
||||
{
|
||||
return sysfs_emit(buf, "%llu\n",
|
||||
atomic64_read(&ap_bindings_complete_count));
|
||||
}
|
||||
|
||||
static BUS_ATTR_RO(bindings_complete_count);
|
||||
|
||||
static ssize_t features_show(const struct bus_type *bus, char *buf)
|
||||
{
|
||||
int n = 0;
|
||||
@ -1624,6 +1633,7 @@ static struct attribute *ap_bus_attrs[] = {
|
||||
&bus_attr_aqmask.attr,
|
||||
&bus_attr_scans.attr,
|
||||
&bus_attr_bindings.attr,
|
||||
&bus_attr_bindings_complete_count.attr,
|
||||
&bus_attr_features.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
@ -934,10 +934,15 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
/* Check to see if link went down during discovery */
|
||||
if (lpfc_els_chk_latt(vport)) {
|
||||
/* One additional decrement on node reference count to
|
||||
* trigger the release of the node
|
||||
* trigger the release of the node. Make sure the ndlp
|
||||
* is marked NLP_DROPPED.
|
||||
*/
|
||||
if (!(ndlp->fc4_xpt_flags & SCSI_XPT_REGD))
|
||||
if (!test_bit(NLP_IN_DEV_LOSS, &ndlp->nlp_flag) &&
|
||||
!test_bit(NLP_DROPPED, &ndlp->nlp_flag) &&
|
||||
!(ndlp->fc4_xpt_flags & SCSI_XPT_REGD)) {
|
||||
set_bit(NLP_DROPPED, &ndlp->nlp_flag);
|
||||
lpfc_nlp_put(ndlp);
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -995,9 +1000,10 @@ stop_rr_fcf_flogi:
|
||||
IOERR_LOOP_OPEN_FAILURE)))
|
||||
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
|
||||
"2858 FLOGI Status:x%x/x%x TMO"
|
||||
":x%x Data x%lx x%x\n",
|
||||
":x%x Data x%lx x%x x%lx x%x\n",
|
||||
ulp_status, ulp_word4, tmo,
|
||||
phba->hba_flag, phba->fcf.fcf_flag);
|
||||
phba->hba_flag, phba->fcf.fcf_flag,
|
||||
ndlp->nlp_flag, ndlp->fc4_xpt_flags);
|
||||
|
||||
/* Check for retry */
|
||||
if (lpfc_els_retry(phba, cmdiocb, rspiocb)) {
|
||||
@ -1015,14 +1021,17 @@ stop_rr_fcf_flogi:
|
||||
* reference to trigger node release.
|
||||
*/
|
||||
if (!test_bit(NLP_IN_DEV_LOSS, &ndlp->nlp_flag) &&
|
||||
!(ndlp->fc4_xpt_flags & SCSI_XPT_REGD))
|
||||
!test_bit(NLP_DROPPED, &ndlp->nlp_flag) &&
|
||||
!(ndlp->fc4_xpt_flags & SCSI_XPT_REGD)) {
|
||||
set_bit(NLP_DROPPED, &ndlp->nlp_flag);
|
||||
lpfc_nlp_put(ndlp);
|
||||
}
|
||||
|
||||
lpfc_printf_vlog(vport, KERN_WARNING, LOG_ELS,
|
||||
"0150 FLOGI Status:x%x/x%x "
|
||||
"xri x%x TMO:x%x refcnt %d\n",
|
||||
"xri x%x iotag x%x TMO:x%x refcnt %d\n",
|
||||
ulp_status, ulp_word4, cmdiocb->sli4_xritag,
|
||||
tmo, kref_read(&ndlp->kref));
|
||||
cmdiocb->iotag, tmo, kref_read(&ndlp->kref));
|
||||
|
||||
/* If this is not a loop open failure, bail out */
|
||||
if (!(ulp_status == IOSTAT_LOCAL_REJECT &&
|
||||
@ -1279,6 +1288,19 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||
uint32_t tmo, did;
|
||||
int rc;
|
||||
|
||||
/* It's possible for lpfc to reissue a FLOGI on an ndlp that is marked
|
||||
* NLP_DROPPED. This happens when the FLOGI completed with the XB bit
|
||||
* set causing lpfc to reference the ndlp until the XRI_ABORTED CQE is
|
||||
* issued. The time window for the XRI_ABORTED CQE can be as much as
|
||||
* 2*2*RA_TOV allowing for ndlp reuse of this type when the link is
|
||||
* cycling quickly. When true, restore the initial reference and remove
|
||||
* the NLP_DROPPED flag as lpfc is retrying.
|
||||
*/
|
||||
if (test_and_clear_bit(NLP_DROPPED, &ndlp->nlp_flag)) {
|
||||
if (!lpfc_nlp_get(ndlp))
|
||||
return 1;
|
||||
}
|
||||
|
||||
cmdsize = (sizeof(uint32_t) + sizeof(struct serv_parm));
|
||||
elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp,
|
||||
ndlp->nlp_DID, ELS_CMD_FLOGI);
|
||||
|
||||
@ -423,6 +423,7 @@ lpfc_check_nlp_post_devloss(struct lpfc_vport *vport,
|
||||
struct lpfc_nodelist *ndlp)
|
||||
{
|
||||
if (test_and_clear_bit(NLP_IN_RECOV_POST_DEV_LOSS, &ndlp->save_flags)) {
|
||||
clear_bit(NLP_DROPPED, &ndlp->nlp_flag);
|
||||
lpfc_nlp_get(ndlp);
|
||||
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY | LOG_NODE,
|
||||
"8438 Devloss timeout reversed on DID x%x "
|
||||
@ -565,7 +566,8 @@ lpfc_dev_loss_tmo_handler(struct lpfc_nodelist *ndlp)
|
||||
return fcf_inuse;
|
||||
}
|
||||
|
||||
lpfc_nlp_put(ndlp);
|
||||
if (!test_and_set_bit(NLP_DROPPED, &ndlp->nlp_flag))
|
||||
lpfc_nlp_put(ndlp);
|
||||
return fcf_inuse;
|
||||
}
|
||||
|
||||
|
||||
@ -326,19 +326,27 @@ static int wdat_wdt_probe(struct platform_device *pdev)
|
||||
return -ENODEV;
|
||||
|
||||
wdat = devm_kzalloc(dev, sizeof(*wdat), GFP_KERNEL);
|
||||
if (!wdat)
|
||||
return -ENOMEM;
|
||||
if (!wdat) {
|
||||
ret = -ENOMEM;
|
||||
goto out_put_table;
|
||||
}
|
||||
|
||||
regs = devm_kcalloc(dev, pdev->num_resources, sizeof(*regs),
|
||||
GFP_KERNEL);
|
||||
if (!regs)
|
||||
return -ENOMEM;
|
||||
if (!regs) {
|
||||
ret = -ENOMEM;
|
||||
goto out_put_table;
|
||||
}
|
||||
|
||||
/* WDAT specification wants to have >= 1ms period */
|
||||
if (tbl->timer_period < 1)
|
||||
return -EINVAL;
|
||||
if (tbl->min_count > tbl->max_count)
|
||||
return -EINVAL;
|
||||
if (tbl->timer_period < 1) {
|
||||
ret = -EINVAL;
|
||||
goto out_put_table;
|
||||
}
|
||||
if (tbl->min_count > tbl->max_count) {
|
||||
ret = -EINVAL;
|
||||
goto out_put_table;
|
||||
}
|
||||
|
||||
wdat->period = tbl->timer_period;
|
||||
wdat->wdd.min_timeout = DIV_ROUND_UP(wdat->period * tbl->min_count, 1000);
|
||||
@ -355,15 +363,20 @@ static int wdat_wdt_probe(struct platform_device *pdev)
|
||||
res = &pdev->resource[i];
|
||||
if (resource_type(res) == IORESOURCE_MEM) {
|
||||
reg = devm_ioremap_resource(dev, res);
|
||||
if (IS_ERR(reg))
|
||||
return PTR_ERR(reg);
|
||||
if (IS_ERR(reg)) {
|
||||
ret = PTR_ERR(reg);
|
||||
goto out_put_table;
|
||||
}
|
||||
} else if (resource_type(res) == IORESOURCE_IO) {
|
||||
reg = devm_ioport_map(dev, res->start, 1);
|
||||
if (!reg)
|
||||
return -ENOMEM;
|
||||
if (!reg) {
|
||||
ret = -ENOMEM;
|
||||
goto out_put_table;
|
||||
}
|
||||
} else {
|
||||
dev_err(dev, "Unsupported resource\n");
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto out_put_table;
|
||||
}
|
||||
|
||||
regs[i] = reg;
|
||||
@ -385,8 +398,10 @@ static int wdat_wdt_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
instr = devm_kzalloc(dev, sizeof(*instr), GFP_KERNEL);
|
||||
if (!instr)
|
||||
return -ENOMEM;
|
||||
if (!instr) {
|
||||
ret = -ENOMEM;
|
||||
goto out_put_table;
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&instr->node);
|
||||
instr->entry = entries[i];
|
||||
@ -417,7 +432,8 @@ static int wdat_wdt_probe(struct platform_device *pdev)
|
||||
|
||||
if (!instr->reg) {
|
||||
dev_err(dev, "I/O resource not found\n");
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto out_put_table;
|
||||
}
|
||||
|
||||
instructions = wdat->instructions[action];
|
||||
@ -425,8 +441,10 @@ static int wdat_wdt_probe(struct platform_device *pdev)
|
||||
instructions = devm_kzalloc(dev,
|
||||
sizeof(*instructions),
|
||||
GFP_KERNEL);
|
||||
if (!instructions)
|
||||
return -ENOMEM;
|
||||
if (!instructions) {
|
||||
ret = -ENOMEM;
|
||||
goto out_put_table;
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(instructions);
|
||||
wdat->instructions[action] = instructions;
|
||||
@ -443,7 +461,7 @@ static int wdat_wdt_probe(struct platform_device *pdev)
|
||||
|
||||
ret = wdat_wdt_enable_reboot(wdat);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto out_put_table;
|
||||
|
||||
platform_set_drvdata(pdev, wdat);
|
||||
|
||||
@ -460,12 +478,16 @@ static int wdat_wdt_probe(struct platform_device *pdev)
|
||||
|
||||
ret = wdat_wdt_set_timeout(&wdat->wdd, timeout);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto out_put_table;
|
||||
|
||||
watchdog_set_nowayout(&wdat->wdd, nowayout);
|
||||
watchdog_stop_on_reboot(&wdat->wdd);
|
||||
watchdog_stop_on_unregister(&wdat->wdd);
|
||||
return devm_watchdog_register_device(dev, &wdat->wdd);
|
||||
ret = devm_watchdog_register_device(dev, &wdat->wdd);
|
||||
|
||||
out_put_table:
|
||||
acpi_put_table((struct acpi_table_header *)tbl);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int wdat_wdt_suspend_noirq(struct device *dev)
|
||||
|
||||
@ -1612,6 +1612,12 @@ static void privcmd_close(struct vm_area_struct *vma)
|
||||
kvfree(pages);
|
||||
}
|
||||
|
||||
static int privcmd_may_split(struct vm_area_struct *area, unsigned long addr)
|
||||
{
|
||||
/* Forbid splitting, avoids double free via privcmd_close(). */
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static vm_fault_t privcmd_fault(struct vm_fault *vmf)
|
||||
{
|
||||
printk(KERN_DEBUG "privcmd_fault: vma=%p %lx-%lx, pgoff=%lx, uv=%p\n",
|
||||
@ -1623,6 +1629,7 @@ static vm_fault_t privcmd_fault(struct vm_fault *vmf)
|
||||
|
||||
static const struct vm_operations_struct privcmd_vm_ops = {
|
||||
.close = privcmd_close,
|
||||
.may_split = privcmd_may_split,
|
||||
.fault = privcmd_fault
|
||||
};
|
||||
|
||||
|
||||
@ -366,6 +366,8 @@ static ssize_t buildid_show(struct hyp_sysfs_attr *attr, char *buffer)
|
||||
ret = sprintf(buffer, "<denied>");
|
||||
return ret;
|
||||
}
|
||||
if (ret > PAGE_SIZE)
|
||||
return -ENOSPC;
|
||||
|
||||
buildid = kmalloc(sizeof(*buildid) + ret, GFP_KERNEL);
|
||||
if (!buildid)
|
||||
@ -373,8 +375,10 @@ static ssize_t buildid_show(struct hyp_sysfs_attr *attr, char *buffer)
|
||||
|
||||
buildid->len = ret;
|
||||
ret = HYPERVISOR_xen_version(XENVER_build_id, buildid);
|
||||
if (ret > 0)
|
||||
ret = sprintf(buffer, "%s", buildid->buf);
|
||||
if (ret > 0) {
|
||||
/* Build id is binary, not a string. */
|
||||
memcpy(buffer, buildid->buf, ret);
|
||||
}
|
||||
kfree(buildid);
|
||||
|
||||
return ret;
|
||||
|
||||
@ -14,7 +14,6 @@ struct tcf_pedit_key_ex {
|
||||
struct tcf_pedit_parms {
|
||||
struct tc_pedit_key *tcfp_keys;
|
||||
struct tcf_pedit_key_ex *tcfp_keys_ex;
|
||||
u32 tcfp_off_max_hint;
|
||||
unsigned char tcfp_nkeys;
|
||||
unsigned char tcfp_flags;
|
||||
struct rcu_head rcu;
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
|
||||
kernel.almalinux,1,AlmaLinux,kernel-core,6.12.0-211.22.1.el10.x86_64,mailto:security@almalinux.org
|
||||
kernel.almalinux,1,AlmaLinux,kernel-core,6.12.0-211.26.1.el10.x86_64,mailto:security@almalinux.org
|
||||
|
||||
@ -1048,6 +1048,7 @@ void __noreturn make_task_dead(int signr)
|
||||
futex_exit_recursive(tsk);
|
||||
tsk->exit_state = EXIT_DEAD;
|
||||
refcount_inc(&tsk->rcu_users);
|
||||
preempt_disable();
|
||||
do_task_dead();
|
||||
}
|
||||
|
||||
|
||||
@ -5487,9 +5487,11 @@ static void hci_user_passkey_notify_evt(struct hci_dev *hdev, void *data,
|
||||
|
||||
bt_dev_dbg(hdev, "");
|
||||
|
||||
hci_dev_lock(hdev);
|
||||
|
||||
conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr);
|
||||
if (!conn)
|
||||
return;
|
||||
goto unlock;
|
||||
|
||||
conn->passkey_notify = __le32_to_cpu(ev->passkey);
|
||||
conn->passkey_entered = 0;
|
||||
@ -5498,6 +5500,9 @@ static void hci_user_passkey_notify_evt(struct hci_dev *hdev, void *data,
|
||||
mgmt_user_passkey_notify(hdev, &conn->dst, conn->type,
|
||||
conn->dst_type, conn->passkey_notify,
|
||||
conn->passkey_entered);
|
||||
|
||||
unlock:
|
||||
hci_dev_unlock(hdev);
|
||||
}
|
||||
|
||||
static void hci_keypress_notify_evt(struct hci_dev *hdev, void *data,
|
||||
@ -5508,14 +5513,16 @@ static void hci_keypress_notify_evt(struct hci_dev *hdev, void *data,
|
||||
|
||||
bt_dev_dbg(hdev, "");
|
||||
|
||||
hci_dev_lock(hdev);
|
||||
|
||||
conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr);
|
||||
if (!conn)
|
||||
return;
|
||||
goto unlock;
|
||||
|
||||
switch (ev->type) {
|
||||
case HCI_KEYPRESS_STARTED:
|
||||
conn->passkey_entered = 0;
|
||||
return;
|
||||
goto unlock;
|
||||
|
||||
case HCI_KEYPRESS_ENTERED:
|
||||
conn->passkey_entered++;
|
||||
@ -5530,13 +5537,16 @@ static void hci_keypress_notify_evt(struct hci_dev *hdev, void *data,
|
||||
break;
|
||||
|
||||
case HCI_KEYPRESS_COMPLETED:
|
||||
return;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
if (hci_dev_test_flag(hdev, HCI_MGMT))
|
||||
mgmt_user_passkey_notify(hdev, &conn->dst, conn->type,
|
||||
conn->dst_type, conn->passkey_notify,
|
||||
conn->passkey_entered);
|
||||
|
||||
unlock:
|
||||
hci_dev_unlock(hdev);
|
||||
}
|
||||
|
||||
static void hci_simple_pair_complete_evt(struct hci_dev *hdev, void *data,
|
||||
|
||||
@ -7152,7 +7152,8 @@ static void create_big_complete(struct hci_dev *hdev, void *data, int err)
|
||||
|
||||
static int hci_le_big_create_sync(struct hci_dev *hdev, void *data)
|
||||
{
|
||||
DEFINE_FLEX(struct hci_cp_le_big_create_sync, cp, bis, num_bis, 0x11);
|
||||
DEFINE_FLEX(struct hci_cp_le_big_create_sync, cp, bis, num_bis,
|
||||
HCI_MAX_ISO_BIS);
|
||||
struct hci_conn *conn = data;
|
||||
struct bt_iso_qos *qos = &conn->iso_qos;
|
||||
int err;
|
||||
|
||||
@ -1230,12 +1230,6 @@ static int isotp_release(struct socket *sock)
|
||||
so->ifindex = 0;
|
||||
so->bound = 0;
|
||||
|
||||
if (so->rx.buf != so->rx.sbuf)
|
||||
kfree(so->rx.buf);
|
||||
|
||||
if (so->tx.buf != so->tx.sbuf)
|
||||
kfree(so->tx.buf);
|
||||
|
||||
sock_orphan(sk);
|
||||
sock->sk = NULL;
|
||||
|
||||
@ -1603,6 +1597,21 @@ static int isotp_notifier(struct notifier_block *nb, unsigned long msg,
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static void isotp_sock_destruct(struct sock *sk)
|
||||
{
|
||||
struct isotp_sock *so = isotp_sk(sk);
|
||||
|
||||
/* do the standard CAN sock destruct work */
|
||||
can_sock_destruct(sk);
|
||||
|
||||
/* free potential extended PDU buffers */
|
||||
if (so->rx.buf != so->rx.sbuf)
|
||||
kfree(so->rx.buf);
|
||||
|
||||
if (so->tx.buf != so->tx.sbuf)
|
||||
kfree(so->tx.buf);
|
||||
}
|
||||
|
||||
static int isotp_init(struct sock *sk)
|
||||
{
|
||||
struct isotp_sock *so = isotp_sk(sk);
|
||||
@ -1647,6 +1656,9 @@ static int isotp_init(struct sock *sk)
|
||||
list_add_tail(&so->notifier, &isotp_notifier_list);
|
||||
spin_unlock(&isotp_notifier_lock);
|
||||
|
||||
/* re-assign default can_sock_destruct() reference */
|
||||
sk->sk_destruct = isotp_sock_destruct;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -8890,7 +8890,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
|
||||
struct ieee80211_bss *bss = (void *)cbss->priv;
|
||||
struct sta_info *new_sta = NULL;
|
||||
struct ieee80211_link_data *link;
|
||||
bool have_sta = false;
|
||||
struct sta_info *have_sta = NULL;
|
||||
bool mlo;
|
||||
int err;
|
||||
u16 new_links;
|
||||
@ -8909,11 +8909,8 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
|
||||
mlo = false;
|
||||
}
|
||||
|
||||
if (assoc) {
|
||||
rcu_read_lock();
|
||||
if (assoc)
|
||||
have_sta = sta_info_get(sdata, ap_mld_addr);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
if (mlo && !have_sta &&
|
||||
WARN_ON(sdata->vif.valid_links || sdata->vif.active_links))
|
||||
@ -9072,6 +9069,8 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
|
||||
out_release_chan:
|
||||
ieee80211_link_release_channel(link);
|
||||
out_err:
|
||||
if (mlo && have_sta)
|
||||
WARN_ON(__sta_info_destroy(have_sta));
|
||||
ieee80211_vif_set_links(sdata, 0, 0);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -4819,7 +4819,7 @@ static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx,
|
||||
struct sk_buff *skb = rx->skb;
|
||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
||||
static ieee80211_rx_result res;
|
||||
ieee80211_rx_result res;
|
||||
int orig_len = skb->len;
|
||||
int hdrlen = ieee80211_hdrlen(hdr->frame_control);
|
||||
int snap_offs = hdrlen;
|
||||
|
||||
@ -3565,11 +3565,11 @@ void ieee80211_dfs_radar_detected_work(struct wiphy *wiphy,
|
||||
struct ieee80211_local *local =
|
||||
container_of(work, struct ieee80211_local, radar_detected_work);
|
||||
struct cfg80211_chan_def chandef;
|
||||
struct ieee80211_chanctx *ctx;
|
||||
struct ieee80211_chanctx *ctx, *tmp;
|
||||
|
||||
lockdep_assert_wiphy(local->hw.wiphy);
|
||||
|
||||
list_for_each_entry(ctx, &local->chanctx_list, list) {
|
||||
list_for_each_entry_safe(ctx, tmp, &local->chanctx_list, list) {
|
||||
if (ctx->replace_state == IEEE80211_CHANCTX_REPLACES_OTHER)
|
||||
continue;
|
||||
|
||||
|
||||
@ -4203,6 +4203,8 @@ int __init mptcp_proto_v6_init(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
mptcp_subflow_v6_init();
|
||||
|
||||
mptcp_v6_prot = mptcp_prot;
|
||||
strscpy(mptcp_v6_prot.name, "MPTCPv6", sizeof(mptcp_v6_prot.name));
|
||||
mptcp_v6_prot.slab = NULL;
|
||||
|
||||
@ -817,6 +817,7 @@ static inline void mptcp_subflow_tcp_fallback(struct sock *sk,
|
||||
void __init mptcp_proto_init(void);
|
||||
#if IS_ENABLED(CONFIG_MPTCP_IPV6)
|
||||
int __init mptcp_proto_v6_init(void);
|
||||
void __init mptcp_subflow_v6_init(void);
|
||||
#endif
|
||||
|
||||
struct sock *mptcp_sk_clone_init(const struct sock *sk,
|
||||
|
||||
@ -2149,7 +2149,15 @@ void __init mptcp_subflow_init(void)
|
||||
tcp_prot_override.psock_update_sk_prot = NULL;
|
||||
#endif
|
||||
|
||||
mptcp_diag_subflow_init(&subflow_ulp_ops);
|
||||
|
||||
if (tcp_register_ulp(&subflow_ulp_ops) != 0)
|
||||
panic("MPTCP: failed to register subflows to ULP\n");
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_MPTCP_IPV6)
|
||||
void __init mptcp_subflow_v6_init(void)
|
||||
{
|
||||
/* In struct mptcp_subflow_request_sock, we assume the TCP request sock
|
||||
* structures for v4 and v6 have the same size. It should not changed in
|
||||
* the future but better to make sure to be warned if it is no longer
|
||||
@ -2188,10 +2196,5 @@ void __init mptcp_subflow_init(void)
|
||||
/* Disable sockmap processing for subflows */
|
||||
tcpv6_prot_override.psock_update_sk_prot = NULL;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
mptcp_diag_subflow_init(&subflow_ulp_ops);
|
||||
|
||||
if (tcp_register_ulp(&subflow_ulp_ops) != 0)
|
||||
panic("MPTCP: failed to register subflows to ULP\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include <crypto/skcipher.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/net.h>
|
||||
#include <linux/overflow.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/key-type.h>
|
||||
#include <linux/ctype.h>
|
||||
@ -171,7 +172,7 @@ static int rxrpc_preparse_xdr_yfs_rxgk(struct key_preparsed_payload *prep,
|
||||
size_t plen;
|
||||
const __be32 *ticket, *key;
|
||||
s64 tmp;
|
||||
u32 tktlen, keylen;
|
||||
size_t raw_keylen, raw_tktlen, keylen, tktlen;
|
||||
|
||||
_enter(",{%x,%x,%x,%x},%x",
|
||||
ntohl(xdr[0]), ntohl(xdr[1]), ntohl(xdr[2]), ntohl(xdr[3]),
|
||||
@ -181,18 +182,22 @@ static int rxrpc_preparse_xdr_yfs_rxgk(struct key_preparsed_payload *prep,
|
||||
goto reject;
|
||||
|
||||
key = xdr + (6 * 2 + 1);
|
||||
keylen = ntohl(key[-1]);
|
||||
_debug("keylen: %x", keylen);
|
||||
keylen = round_up(keylen, 4);
|
||||
raw_keylen = ntohl(key[-1]);
|
||||
_debug("keylen: %zx", raw_keylen);
|
||||
if (raw_keylen > AFSTOKEN_GK_KEY_MAX)
|
||||
goto reject;
|
||||
keylen = round_up(raw_keylen, 4);
|
||||
if ((6 * 2 + 2) * 4 + keylen > toklen)
|
||||
goto reject;
|
||||
|
||||
ticket = xdr + (6 * 2 + 1 + (keylen / 4) + 1);
|
||||
tktlen = ntohl(ticket[-1]);
|
||||
_debug("tktlen: %x", tktlen);
|
||||
tktlen = round_up(tktlen, 4);
|
||||
raw_tktlen = ntohl(ticket[-1]);
|
||||
_debug("tktlen: %zx", raw_tktlen);
|
||||
if (raw_tktlen > AFSTOKEN_GK_TOKEN_MAX)
|
||||
goto reject;
|
||||
tktlen = round_up(raw_tktlen, 4);
|
||||
if ((6 * 2 + 2) * 4 + keylen + tktlen != toklen) {
|
||||
kleave(" = -EKEYREJECTED [%x!=%x, %x,%x]",
|
||||
kleave(" = -EKEYREJECTED [%zx!=%x, %zx,%zx]",
|
||||
(6 * 2 + 2) * 4 + keylen + tktlen, toklen,
|
||||
keylen, tktlen);
|
||||
goto reject;
|
||||
@ -206,7 +211,7 @@ static int rxrpc_preparse_xdr_yfs_rxgk(struct key_preparsed_payload *prep,
|
||||
if (!token)
|
||||
goto nomem;
|
||||
|
||||
token->rxgk = kzalloc(sizeof(*token->rxgk) + keylen, GFP_KERNEL);
|
||||
token->rxgk = kzalloc(struct_size_t(struct rxgk_key, _key, raw_keylen), GFP_KERNEL);
|
||||
if (!token->rxgk)
|
||||
goto nomem_token;
|
||||
|
||||
@ -221,9 +226,9 @@ static int rxrpc_preparse_xdr_yfs_rxgk(struct key_preparsed_payload *prep,
|
||||
token->rxgk->enctype = tmp = xdr_dec64(xdr + 5 * 2);
|
||||
if (tmp < 0 || tmp > UINT_MAX)
|
||||
goto reject_token;
|
||||
token->rxgk->key.len = ntohl(key[-1]);
|
||||
token->rxgk->key.len = raw_keylen;
|
||||
token->rxgk->key.data = token->rxgk->_key;
|
||||
token->rxgk->ticket.len = ntohl(ticket[-1]);
|
||||
token->rxgk->ticket.len = raw_tktlen;
|
||||
|
||||
if (token->rxgk->endtime != 0) {
|
||||
expiry = rxrpc_s64_to_time64(token->rxgk->endtime);
|
||||
@ -236,8 +241,7 @@ static int rxrpc_preparse_xdr_yfs_rxgk(struct key_preparsed_payload *prep,
|
||||
memcpy(token->rxgk->key.data, key, token->rxgk->key.len);
|
||||
|
||||
/* Pad the ticket so that we can use it directly in XDR */
|
||||
token->rxgk->ticket.data = kzalloc(round_up(token->rxgk->ticket.len, 4),
|
||||
GFP_KERNEL);
|
||||
token->rxgk->ticket.data = kzalloc(tktlen, GFP_KERNEL);
|
||||
if (!token->rxgk->ticket.data)
|
||||
goto nomem_yrxgk;
|
||||
memcpy(token->rxgk->ticket.data, ticket, token->rxgk->ticket.len);
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
#include <linux/ip.h>
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/overflow.h>
|
||||
#include <linux/unaligned.h>
|
||||
#include <net/ipv6.h>
|
||||
#include <net/netlink.h>
|
||||
#include <net/pkt_sched.h>
|
||||
@ -242,7 +244,6 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla,
|
||||
goto out_free_ex;
|
||||
}
|
||||
|
||||
nparms->tcfp_off_max_hint = 0;
|
||||
nparms->tcfp_flags = parm->flags;
|
||||
nparms->tcfp_nkeys = parm->nkeys;
|
||||
|
||||
@ -268,14 +269,6 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla,
|
||||
BITS_PER_TYPE(int) - 1,
|
||||
nparms->tcfp_keys[i].shift);
|
||||
|
||||
/* The AT option can read a single byte, we can bound the actual
|
||||
* value with uchar max.
|
||||
*/
|
||||
cur += (0xff & offmask) >> nparms->tcfp_keys[i].shift;
|
||||
|
||||
/* Each key touches 4 bytes starting from the computed offset */
|
||||
nparms->tcfp_off_max_hint =
|
||||
max(nparms->tcfp_off_max_hint, cur + 4);
|
||||
}
|
||||
|
||||
p = to_pedit(*a);
|
||||
@ -318,15 +311,12 @@ static void tcf_pedit_cleanup(struct tc_action *a)
|
||||
call_rcu(&parms->rcu, tcf_pedit_cleanup_rcu);
|
||||
}
|
||||
|
||||
static bool offset_valid(struct sk_buff *skb, int offset)
|
||||
static bool offset_valid(struct sk_buff *skb, int offset, int len)
|
||||
{
|
||||
if (offset > 0 && offset > skb->len)
|
||||
if (offset < -(int)skb_headroom(skb))
|
||||
return false;
|
||||
|
||||
if (offset < 0 && -offset > skb_headroom(skb))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return offset <= (int)skb->len - len;
|
||||
}
|
||||
|
||||
static int pedit_l4_skb_offset(struct sk_buff *skb, int *hoffset, const int header_type)
|
||||
@ -393,18 +383,10 @@ TC_INDIRECT_SCOPE int tcf_pedit_act(struct sk_buff *skb,
|
||||
struct tcf_pedit_key_ex *tkey_ex;
|
||||
struct tcf_pedit_parms *parms;
|
||||
struct tc_pedit_key *tkey;
|
||||
u32 max_offset;
|
||||
int i;
|
||||
|
||||
parms = rcu_dereference_bh(p->parms);
|
||||
|
||||
max_offset = (skb_transport_header_was_set(skb) ?
|
||||
skb_transport_offset(skb) :
|
||||
skb_network_offset(skb)) +
|
||||
parms->tcfp_off_max_hint;
|
||||
if (skb_ensure_writable(skb, min(skb->len, max_offset)))
|
||||
goto done;
|
||||
|
||||
tcf_lastuse_update(&p->tcf_tm);
|
||||
tcf_action_update_bstats(&p->common, skb);
|
||||
|
||||
@ -412,10 +394,11 @@ TC_INDIRECT_SCOPE int tcf_pedit_act(struct sk_buff *skb,
|
||||
tkey_ex = parms->tcfp_keys_ex;
|
||||
|
||||
for (i = parms->tcfp_nkeys; i > 0; i--, tkey++) {
|
||||
int write_offset, write_len;
|
||||
int offset = tkey->off;
|
||||
int hoffset = 0;
|
||||
u32 *ptr, hdata;
|
||||
u32 val;
|
||||
u32 cur_val, val;
|
||||
u32 *ptr;
|
||||
int rc;
|
||||
|
||||
if (tkey_ex) {
|
||||
@ -433,13 +416,15 @@ TC_INDIRECT_SCOPE int tcf_pedit_act(struct sk_buff *skb,
|
||||
|
||||
if (tkey->offmask) {
|
||||
u8 *d, _d;
|
||||
int at_offset;
|
||||
|
||||
if (!offset_valid(skb, hoffset + tkey->at)) {
|
||||
if (check_add_overflow(hoffset, (int)tkey->at, &at_offset) ||
|
||||
!offset_valid(skb, at_offset, sizeof(_d))) {
|
||||
pr_info_ratelimited("tc action pedit 'at' offset %d out of bounds\n",
|
||||
hoffset + tkey->at);
|
||||
goto bad;
|
||||
}
|
||||
d = skb_header_pointer(skb, hoffset + tkey->at,
|
||||
d = skb_header_pointer(skb, at_offset,
|
||||
sizeof(_d), &_d);
|
||||
if (!d)
|
||||
goto bad;
|
||||
@ -451,31 +436,51 @@ TC_INDIRECT_SCOPE int tcf_pedit_act(struct sk_buff *skb,
|
||||
}
|
||||
}
|
||||
|
||||
if (!offset_valid(skb, hoffset + offset)) {
|
||||
pr_info_ratelimited("tc action pedit offset %d out of bounds\n", hoffset + offset);
|
||||
if (check_add_overflow(hoffset, offset, &write_offset)) {
|
||||
pr_info_ratelimited("tc action pedit offset overflow\n");
|
||||
goto bad;
|
||||
}
|
||||
|
||||
ptr = skb_header_pointer(skb, hoffset + offset,
|
||||
sizeof(hdata), &hdata);
|
||||
if (!ptr)
|
||||
if (!offset_valid(skb, write_offset, sizeof(*ptr))) {
|
||||
pr_info_ratelimited("tc action pedit offset %d out of bounds\n",
|
||||
write_offset);
|
||||
goto bad;
|
||||
}
|
||||
|
||||
if (write_offset < 0) {
|
||||
if (skb_cow(skb, -write_offset))
|
||||
goto bad;
|
||||
if (write_offset + (int)sizeof(*ptr) > 0) {
|
||||
if (skb_ensure_writable(skb,
|
||||
min_t(int, skb->len,
|
||||
write_offset + (int)sizeof(*ptr))))
|
||||
goto bad;
|
||||
}
|
||||
} else {
|
||||
if (check_add_overflow(write_offset, (int)sizeof(*ptr),
|
||||
&write_len))
|
||||
goto bad;
|
||||
if (skb_ensure_writable(skb, min_t(int, skb->len,
|
||||
write_len)))
|
||||
goto bad;
|
||||
}
|
||||
|
||||
ptr = (u32 *)(skb->data + write_offset);
|
||||
cur_val = get_unaligned(ptr);
|
||||
/* just do it, baby */
|
||||
switch (cmd) {
|
||||
case TCA_PEDIT_KEY_EX_CMD_SET:
|
||||
val = tkey->val;
|
||||
break;
|
||||
case TCA_PEDIT_KEY_EX_CMD_ADD:
|
||||
val = (*ptr + tkey->val) & ~tkey->mask;
|
||||
val = (cur_val + tkey->val) & ~tkey->mask;
|
||||
break;
|
||||
default:
|
||||
pr_info_ratelimited("tc action pedit bad command (%d)\n", cmd);
|
||||
goto bad;
|
||||
}
|
||||
|
||||
*ptr = ((*ptr & tkey->mask) ^ val);
|
||||
if (ptr == &hdata)
|
||||
skb_store_bits(skb, hoffset + offset, ptr, 4);
|
||||
put_unaligned((cur_val & tkey->mask) ^ val, ptr);
|
||||
}
|
||||
|
||||
goto done;
|
||||
|
||||
@ -688,7 +688,7 @@ static int create_static_call_sections(struct objtool_file *file)
|
||||
|
||||
key_sym = find_symbol_by_name(file->elf, tmp);
|
||||
if (!key_sym) {
|
||||
if (!opts.module || file->klp) {
|
||||
if (!opts.module) {
|
||||
ERROR("static_call: can't find static_call_key symbol: %s", tmp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
|
||||
kernel-uki-virt-addons.almalinux,1,AlmaLinux,kernel-uki-virt-addons,6.12.0-211.22.1.el10.x86_64,mailto:security@almalinux.org
|
||||
kernel-uki-virt-addons.almalinux,1,AlmaLinux,kernel-uki-virt-addons,6.12.0-211.26.1.el10.x86_64,mailto:security@almalinux.org
|
||||
|
||||
2
uki.sbat
2
uki.sbat
@ -1,2 +1,2 @@
|
||||
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
|
||||
kernel-uki-virt.almalinux,1,AlmaLinux,kernel-uki-virt,6.12.0-211.22.1.el10.x86_64,mailto:security@almalinux.org
|
||||
kernel-uki-virt.almalinux,1,AlmaLinux,kernel-uki-virt,6.12.0-211.26.1.el10.x86_64,mailto:security@almalinux.org
|
||||
|
||||
Loading…
Reference in New Issue
Block a user