Import of kernel-6.12.0-211.43.1.el10_2
This commit is contained in:
parent
bc4d56d649
commit
00ebf9a778
@ -138,6 +138,9 @@ definitions:
|
||||
-
|
||||
name: eec
|
||||
doc: dpll drives the Ethernet Equipment Clock
|
||||
-
|
||||
name: generic
|
||||
doc: generic dpll type for devices outside PPS/EEC classes
|
||||
render-max: true
|
||||
-
|
||||
type: enum
|
||||
|
||||
@ -12,7 +12,7 @@ RHEL_MINOR = 2
|
||||
#
|
||||
# Use this spot to avoid future merge conflicts.
|
||||
# Do not trim this comment.
|
||||
RHEL_RELEASE = 211.42.1
|
||||
RHEL_RELEASE = 211.43.1
|
||||
|
||||
#
|
||||
# RHEL_REBASE_NUM
|
||||
|
||||
@ -4788,16 +4788,17 @@ static int direct_page_fault(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault
|
||||
if (r != RET_PF_CONTINUE)
|
||||
return r;
|
||||
|
||||
r = RET_PF_RETRY;
|
||||
write_lock(&vcpu->kvm->mmu_lock);
|
||||
|
||||
if (is_page_fault_stale(vcpu, fault))
|
||||
goto out_unlock;
|
||||
|
||||
r = make_mmu_pages_available(vcpu);
|
||||
if (r)
|
||||
goto out_unlock;
|
||||
|
||||
if (is_page_fault_stale(vcpu, fault)) {
|
||||
r = RET_PF_RETRY;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
r = direct_map(vcpu, fault);
|
||||
|
||||
out_unlock:
|
||||
|
||||
@ -827,15 +827,17 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault
|
||||
}
|
||||
#endif
|
||||
|
||||
r = RET_PF_RETRY;
|
||||
write_lock(&vcpu->kvm->mmu_lock);
|
||||
|
||||
if (is_page_fault_stale(vcpu, fault))
|
||||
goto out_unlock;
|
||||
|
||||
r = make_mmu_pages_available(vcpu);
|
||||
if (r)
|
||||
goto out_unlock;
|
||||
|
||||
if (is_page_fault_stale(vcpu, fault)) {
|
||||
r = RET_PF_RETRY;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
r = FNAME(fetch)(vcpu, fault, &walker);
|
||||
|
||||
out_unlock:
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
@ -71,7 +72,8 @@ void dpll_device_notify(struct dpll_device *dpll, unsigned long action)
|
||||
call_dpll_notifiers(action, &info);
|
||||
}
|
||||
|
||||
void dpll_pin_notify(struct dpll_pin *pin, unsigned long action)
|
||||
void dpll_pin_notify(struct dpll_pin *pin, u64 src_clock_id,
|
||||
unsigned long action)
|
||||
{
|
||||
struct dpll_pin_notifier_info info = {
|
||||
.pin = pin,
|
||||
@ -80,6 +82,7 @@ void dpll_pin_notify(struct dpll_pin *pin, unsigned long action)
|
||||
.clock_id = pin->clock_id,
|
||||
.fwnode = pin->fwnode,
|
||||
.prop = &pin->prop,
|
||||
.src_clock_id = src_clock_id,
|
||||
};
|
||||
|
||||
call_dpll_notifiers(action, &info);
|
||||
@ -198,10 +201,8 @@ dpll_xa_ref_pin_add(struct xarray *xa_pins, struct dpll_pin *pin,
|
||||
if (ref->pin != pin)
|
||||
continue;
|
||||
reg = dpll_pin_registration_find(ref, ops, priv, cookie);
|
||||
if (reg) {
|
||||
refcount_inc(&ref->refcount);
|
||||
return 0;
|
||||
}
|
||||
if (reg)
|
||||
return -EEXIST;
|
||||
ref_exists = true;
|
||||
break;
|
||||
}
|
||||
@ -281,10 +282,8 @@ dpll_xa_ref_dpll_add(struct xarray *xa_dplls, struct dpll_device *dpll,
|
||||
if (ref->dpll != dpll)
|
||||
continue;
|
||||
reg = dpll_pin_registration_find(ref, ops, priv, cookie);
|
||||
if (reg) {
|
||||
refcount_inc(&ref->refcount);
|
||||
return 0;
|
||||
}
|
||||
if (reg)
|
||||
return -EEXIST;
|
||||
ref_exists = true;
|
||||
break;
|
||||
}
|
||||
@ -656,6 +655,7 @@ dpll_pin_alloc(u64 clock_id, u32 pin_idx, struct module *module,
|
||||
pin->pin_idx = pin_idx;
|
||||
pin->clock_id = clock_id;
|
||||
pin->module = module;
|
||||
strscpy(pin->module_name, module_name(module));
|
||||
if (WARN_ON(prop->type < DPLL_PIN_TYPE_MUX ||
|
||||
prop->type > DPLL_PIN_TYPE_MAX)) {
|
||||
ret = -EINVAL;
|
||||
@ -851,7 +851,7 @@ __dpll_pin_register(struct dpll_device *dpll, struct dpll_pin *pin,
|
||||
if (ret)
|
||||
goto ref_pin_del;
|
||||
xa_set_mark(&dpll_pin_xa, pin->id, DPLL_REGISTERED);
|
||||
dpll_pin_create_ntf(pin);
|
||||
dpll_pin_create_ntf(pin, dpll->clock_id);
|
||||
|
||||
return ret;
|
||||
|
||||
@ -888,11 +888,21 @@ dpll_pin_register(struct dpll_device *dpll, struct dpll_pin *pin,
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&dpll_lock);
|
||||
if (WARN_ON(!(dpll->module == pin->module &&
|
||||
dpll->clock_id == pin->clock_id)))
|
||||
|
||||
/*
|
||||
* For pins identified via firmware (pin->fwnode), allow registration
|
||||
* even if the pin's (module, clock_id) differs from the target DPLL.
|
||||
* For non-fwnode pins, require a strict (module, clock_id) match.
|
||||
*/
|
||||
if (!pin->fwnode &&
|
||||
WARN_ON_ONCE(dpll->module != pin->module ||
|
||||
dpll->clock_id != pin->clock_id)) {
|
||||
ret = -EINVAL;
|
||||
else
|
||||
ret = __dpll_pin_register(dpll, pin, ops, priv, NULL);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
ret = __dpll_pin_register(dpll, pin, ops, priv, NULL);
|
||||
out_unlock:
|
||||
mutex_unlock(&dpll_lock);
|
||||
|
||||
return ret;
|
||||
@ -918,11 +928,13 @@ __dpll_pin_unregister(struct dpll_device *dpll, struct dpll_pin *pin,
|
||||
const struct dpll_pin_ops *ops, void *priv, void *cookie)
|
||||
{
|
||||
ASSERT_DPLL_PIN_REGISTERED(pin);
|
||||
dpll_pin_ref_sync_pair_del(pin->id);
|
||||
dpll_pin_delete_ntf(pin, dpll->clock_id);
|
||||
dpll_xa_ref_pin_del(&dpll->pin_refs, pin, ops, priv, cookie);
|
||||
dpll_xa_ref_dpll_del(&pin->dpll_refs, dpll, ops, priv, cookie);
|
||||
if (xa_empty(&pin->dpll_refs))
|
||||
if (xa_empty(&pin->dpll_refs)) {
|
||||
dpll_pin_ref_sync_pair_del(pin->id);
|
||||
xa_clear_mark(&dpll_pin_xa, pin->id, DPLL_REGISTERED);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -944,7 +956,6 @@ void dpll_pin_unregister(struct dpll_device *dpll, struct dpll_pin *pin,
|
||||
return;
|
||||
|
||||
mutex_lock(&dpll_lock);
|
||||
dpll_pin_delete_ntf(pin);
|
||||
__dpll_pin_unregister(dpll, pin, ops, priv, NULL);
|
||||
mutex_unlock(&dpll_lock);
|
||||
}
|
||||
@ -990,7 +1001,7 @@ int dpll_pin_on_pin_register(struct dpll_pin *parent, struct dpll_pin *pin,
|
||||
stop = i;
|
||||
goto dpll_unregister;
|
||||
}
|
||||
dpll_pin_create_ntf(pin);
|
||||
dpll_pin_create_ntf(pin, parent->clock_id);
|
||||
}
|
||||
mutex_unlock(&dpll_lock);
|
||||
|
||||
@ -999,9 +1010,9 @@ int dpll_pin_on_pin_register(struct dpll_pin *parent, struct dpll_pin *pin,
|
||||
dpll_unregister:
|
||||
xa_for_each(&parent->dpll_refs, i, ref)
|
||||
if (i < stop) {
|
||||
dpll_pin_delete_ntf(pin, parent->clock_id);
|
||||
__dpll_pin_unregister(ref->dpll, pin, ops, priv,
|
||||
parent);
|
||||
dpll_pin_delete_ntf(pin);
|
||||
}
|
||||
dpll_xa_ref_pin_del(&pin->parent_refs, parent, ops, priv, pin);
|
||||
unlock:
|
||||
@ -1023,14 +1034,19 @@ EXPORT_SYMBOL_GPL(dpll_pin_on_pin_register);
|
||||
void dpll_pin_on_pin_unregister(struct dpll_pin *parent, struct dpll_pin *pin,
|
||||
const struct dpll_pin_ops *ops, void *priv)
|
||||
{
|
||||
struct dpll_pin_registration *reg;
|
||||
struct dpll_pin_ref *ref;
|
||||
unsigned long i;
|
||||
|
||||
mutex_lock(&dpll_lock);
|
||||
dpll_pin_delete_ntf(pin);
|
||||
dpll_xa_ref_pin_del(&pin->parent_refs, parent, ops, priv, pin);
|
||||
xa_for_each(&pin->dpll_refs, i, ref)
|
||||
xa_for_each(&pin->dpll_refs, i, ref) {
|
||||
reg = dpll_pin_registration_find(ref, ops, priv, parent);
|
||||
if (!reg)
|
||||
continue;
|
||||
dpll_pin_delete_ntf(pin, parent->clock_id);
|
||||
__dpll_pin_unregister(ref->dpll, pin, ops, priv, parent);
|
||||
}
|
||||
dpll_xa_ref_pin_del(&pin->parent_refs, parent, ops, priv, pin);
|
||||
mutex_unlock(&dpll_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dpll_pin_on_pin_unregister);
|
||||
|
||||
@ -50,6 +50,7 @@ struct dpll_device {
|
||||
* @pin_idx: index of a pin given by dev driver
|
||||
* @clock_id: clock_id of creator
|
||||
* @module: module of creator
|
||||
* @module_name: module name of creator
|
||||
* @fwnode: optional reference to firmware node
|
||||
* @dpll_refs: hold referencees to dplls pin was registered with
|
||||
* @parent_refs: hold references to parent pins pin was registered with
|
||||
@ -77,6 +78,7 @@ struct dpll_pin {
|
||||
refcount_t refcount;
|
||||
struct ref_tracker_dir refcnt_tracker;
|
||||
struct rcu_head rcu;
|
||||
RH_KABI_EXTEND(char module_name[MODULE_NAME_LEN])
|
||||
};
|
||||
|
||||
/**
|
||||
@ -108,6 +110,7 @@ extern struct xarray dpll_pin_xa;
|
||||
extern struct mutex dpll_lock;
|
||||
|
||||
void dpll_device_notify(struct dpll_device *dpll, unsigned long action);
|
||||
void dpll_pin_notify(struct dpll_pin *pin, unsigned long action);
|
||||
void dpll_pin_notify(struct dpll_pin *pin, u64 src_clock_id,
|
||||
unsigned long action);
|
||||
|
||||
#endif
|
||||
|
||||
@ -89,17 +89,6 @@ static struct dpll_pin *dpll_netdev_pin(const struct net_device *dev)
|
||||
return rcu_dereference_rtnl(dev->dpll_pin);
|
||||
}
|
||||
|
||||
/**
|
||||
* dpll_netdev_pin_handle_size - get size of pin handle attribute of a netdev
|
||||
* @dev: netdev from which to get the pin
|
||||
*
|
||||
* Return: byte size of pin handle attribute, or 0 if @dev has no pin.
|
||||
*/
|
||||
size_t dpll_netdev_pin_handle_size(const struct net_device *dev)
|
||||
{
|
||||
return dpll_netdev_pin(dev) ? nla_total_size(4) : 0; /* DPLL_A_PIN_ID */
|
||||
}
|
||||
|
||||
int dpll_netdev_add_pin_handle(struct sk_buff *msg,
|
||||
const struct net_device *dev)
|
||||
{
|
||||
@ -723,7 +712,7 @@ dpll_cmd_pin_get_one(struct sk_buff *msg, struct dpll_pin *pin,
|
||||
if (ret)
|
||||
return ret;
|
||||
if (nla_put_string(msg, DPLL_A_PIN_MODULE_NAME,
|
||||
module_name(pin->module)))
|
||||
pin->module_name))
|
||||
return -EMSGSIZE;
|
||||
if (nla_put_64bit(msg, DPLL_A_PIN_CLOCK_ID, sizeof(pin->clock_id),
|
||||
&pin->clock_id, DPLL_A_PIN_PAD))
|
||||
@ -867,12 +856,21 @@ int dpll_device_delete_ntf(struct dpll_device *dpll)
|
||||
return dpll_device_event_send(DPLL_CMD_DEVICE_DELETE_NTF, dpll);
|
||||
}
|
||||
|
||||
static int
|
||||
__dpll_device_change_ntf(struct dpll_device *dpll)
|
||||
/**
|
||||
* __dpll_device_change_ntf - notify that the dpll device has been changed
|
||||
* @dpll: registered dpll pointer
|
||||
*
|
||||
* Context: caller must hold dpll_lock. Suitable for use inside device
|
||||
* callbacks which are already invoked under dpll_lock.
|
||||
* Return: 0 if succeeds, error code otherwise.
|
||||
*/
|
||||
int __dpll_device_change_ntf(struct dpll_device *dpll)
|
||||
{
|
||||
lockdep_assert_held(&dpll_lock);
|
||||
dpll_device_notify(dpll, DPLL_DEVICE_CHANGED);
|
||||
return dpll_device_event_send(DPLL_CMD_DEVICE_CHANGE_NTF, dpll);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__dpll_device_change_ntf);
|
||||
|
||||
/**
|
||||
* dpll_device_change_ntf - notify that the dpll device has been changed
|
||||
@ -926,23 +924,33 @@ err_free_msg:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int dpll_pin_create_ntf(struct dpll_pin *pin)
|
||||
int dpll_pin_create_ntf(struct dpll_pin *pin, u64 src_clock_id)
|
||||
{
|
||||
dpll_pin_notify(pin, DPLL_PIN_CREATED);
|
||||
dpll_pin_notify(pin, src_clock_id, DPLL_PIN_CREATED);
|
||||
return dpll_pin_event_send(DPLL_CMD_PIN_CREATE_NTF, pin);
|
||||
}
|
||||
|
||||
int dpll_pin_delete_ntf(struct dpll_pin *pin)
|
||||
int dpll_pin_delete_ntf(struct dpll_pin *pin, u64 src_clock_id)
|
||||
{
|
||||
dpll_pin_notify(pin, DPLL_PIN_DELETED);
|
||||
dpll_pin_notify(pin, src_clock_id, DPLL_PIN_DELETED);
|
||||
return dpll_pin_event_send(DPLL_CMD_PIN_DELETE_NTF, pin);
|
||||
}
|
||||
|
||||
/**
|
||||
* __dpll_pin_change_ntf - notify that the pin has been changed
|
||||
* @pin: registered pin pointer
|
||||
*
|
||||
* Context: caller must hold dpll_lock. Suitable for use inside pin
|
||||
* callbacks which are already invoked under dpll_lock.
|
||||
* Return: 0 if succeeds, error code otherwise.
|
||||
*/
|
||||
int __dpll_pin_change_ntf(struct dpll_pin *pin)
|
||||
{
|
||||
dpll_pin_notify(pin, DPLL_PIN_CHANGED);
|
||||
lockdep_assert_held(&dpll_lock);
|
||||
dpll_pin_notify(pin, pin->clock_id, DPLL_PIN_CHANGED);
|
||||
return dpll_pin_event_send(DPLL_CMD_PIN_CHANGE_NTF, pin);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__dpll_pin_change_ntf);
|
||||
|
||||
/**
|
||||
* dpll_pin_change_ntf - notify that the pin has been changed
|
||||
@ -1326,8 +1334,11 @@ dpll_pin_on_pin_state_set(struct dpll_pin *pin, u32 parent_idx,
|
||||
unsigned long i;
|
||||
int ret;
|
||||
|
||||
/* fwnode pins may not set the capability bit upfront; let the ops
|
||||
* layer return -EOPNOTSUPP if the operation is unsupported.
|
||||
*/
|
||||
if (!(DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE &
|
||||
pin->prop.capabilities)) {
|
||||
pin->prop.capabilities) && !pin->fwnode) {
|
||||
NL_SET_ERR_MSG(extack, "state changing is not allowed");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@ -1362,8 +1373,11 @@ dpll_pin_state_set(struct dpll_device *dpll, struct dpll_pin *pin,
|
||||
struct dpll_pin_ref *ref;
|
||||
int ret;
|
||||
|
||||
/* fwnode pins may not set the capability bit upfront; let the ops
|
||||
* layer return -EOPNOTSUPP if the operation is unsupported.
|
||||
*/
|
||||
if (!(DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE &
|
||||
pin->prop.capabilities)) {
|
||||
pin->prop.capabilities) && !pin->fwnode) {
|
||||
NL_SET_ERR_MSG(extack, "state changing is not allowed");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@ -1651,9 +1665,9 @@ dpll_pin_find(u64 clock_id, struct nlattr *mod_name_attr,
|
||||
xa_for_each_marked(&dpll_pin_xa, i, pin, DPLL_REGISTERED) {
|
||||
prop = &pin->prop;
|
||||
cid_match = clock_id ? pin->clock_id == clock_id : true;
|
||||
mod_match = mod_name_attr && module_name(pin->module) ?
|
||||
mod_match = mod_name_attr && pin->module_name[0] ?
|
||||
!nla_strcmp(mod_name_attr,
|
||||
module_name(pin->module)) : true;
|
||||
pin->module_name) : true;
|
||||
type_match = type ? prop->type == type : true;
|
||||
board_match = board_label ? (prop->board_label ?
|
||||
!nla_strcmp(board_label, prop->board_label) : false) :
|
||||
|
||||
@ -8,8 +8,6 @@ int dpll_device_create_ntf(struct dpll_device *dpll);
|
||||
|
||||
int dpll_device_delete_ntf(struct dpll_device *dpll);
|
||||
|
||||
int dpll_pin_create_ntf(struct dpll_pin *pin);
|
||||
int dpll_pin_create_ntf(struct dpll_pin *pin, u64 src_clock_id);
|
||||
|
||||
int dpll_pin_delete_ntf(struct dpll_pin *pin);
|
||||
|
||||
int __dpll_pin_change_ntf(struct dpll_pin *pin);
|
||||
int dpll_pin_delete_ntf(struct dpll_pin *pin, u64 src_clock_id);
|
||||
|
||||
@ -36,7 +36,7 @@ const struct nla_policy dpll_reference_sync_nl_policy[DPLL_A_PIN_STATE + 1] = {
|
||||
static const struct nla_policy dpll_device_id_get_nl_policy[DPLL_A_TYPE + 1] = {
|
||||
[DPLL_A_MODULE_NAME] = { .type = NLA_NUL_STRING, },
|
||||
[DPLL_A_CLOCK_ID] = { .type = NLA_U64, },
|
||||
[DPLL_A_TYPE] = NLA_POLICY_RANGE(NLA_U32, 1, 2),
|
||||
[DPLL_A_TYPE] = NLA_POLICY_RANGE(NLA_U32, 1, 3),
|
||||
};
|
||||
|
||||
/* DPLL_CMD_DEVICE_GET - do */
|
||||
|
||||
@ -724,18 +724,15 @@ zl3073x_dev_periodic_work(struct kthread_work *work)
|
||||
dev_warn(zldev->dev, "Failed to update phase offsets: %pe\n",
|
||||
ERR_PTR(rc));
|
||||
|
||||
/* Update measured input reference frequencies if any DPLL has
|
||||
* frequency monitoring enabled.
|
||||
/* Update measured input reference frequencies if frequency
|
||||
* monitoring is enabled.
|
||||
*/
|
||||
list_for_each_entry(zldpll, &zldev->dplls, list) {
|
||||
if (zldpll->freq_monitor) {
|
||||
rc = zl3073x_ref_freq_meas_update(zldev);
|
||||
if (rc)
|
||||
dev_warn(zldev->dev,
|
||||
"Failed to update measured frequencies: %pe\n",
|
||||
ERR_PTR(rc));
|
||||
break;
|
||||
}
|
||||
if (zldev->freq_monitor) {
|
||||
rc = zl3073x_ref_freq_meas_update(zldev);
|
||||
if (rc)
|
||||
dev_warn(zldev->dev,
|
||||
"Failed to update measured frequencies: %pe\n",
|
||||
ERR_PTR(rc));
|
||||
}
|
||||
|
||||
list_for_each_entry(zldpll, &zldev->dplls, list)
|
||||
|
||||
@ -57,6 +57,7 @@ struct zl3073x_chip_info {
|
||||
* @work: periodic work
|
||||
* @clock_id: clock id of the device
|
||||
* @phase_avg_factor: phase offset measurement averaging factor
|
||||
* @freq_monitor: is frequency monitor enabled
|
||||
*/
|
||||
struct zl3073x_dev {
|
||||
struct device *dev;
|
||||
@ -77,9 +78,10 @@ struct zl3073x_dev {
|
||||
struct kthread_worker *kworker;
|
||||
struct kthread_delayed_work work;
|
||||
|
||||
/* Devlink parameters */
|
||||
/* Per-chip parameters */
|
||||
u64 clock_id;
|
||||
u8 phase_avg_factor;
|
||||
bool freq_monitor;
|
||||
};
|
||||
|
||||
extern const struct regmap_config zl3073x_regmap_config;
|
||||
|
||||
@ -1117,15 +1117,6 @@ zl3073x_dpll_phase_offset_avg_factor_get(const struct dpll_device *dpll,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
zl3073x_dpll_change_work(struct work_struct *work)
|
||||
{
|
||||
struct zl3073x_dpll *zldpll;
|
||||
|
||||
zldpll = container_of(work, struct zl3073x_dpll, change_work);
|
||||
dpll_device_change_ntf(zldpll->dpll_dev);
|
||||
}
|
||||
|
||||
static int
|
||||
zl3073x_dpll_phase_offset_avg_factor_set(const struct dpll_device *dpll,
|
||||
void *dpll_priv, u32 factor,
|
||||
@ -1151,8 +1142,10 @@ zl3073x_dpll_phase_offset_avg_factor_set(const struct dpll_device *dpll,
|
||||
* we have to send a notification for other DPLL devices.
|
||||
*/
|
||||
list_for_each_entry(item, &zldpll->dev->dplls, list) {
|
||||
if (item != zldpll)
|
||||
schedule_work(&item->change_work);
|
||||
struct dpll_device *dpll_dev = READ_ONCE(item->dpll_dev);
|
||||
|
||||
if (item != zldpll && dpll_dev)
|
||||
__dpll_device_change_ntf(dpll_dev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -1257,7 +1250,7 @@ zl3073x_dpll_freq_monitor_get(const struct dpll_device *dpll,
|
||||
{
|
||||
struct zl3073x_dpll *zldpll = dpll_priv;
|
||||
|
||||
if (zldpll->freq_monitor)
|
||||
if (zldpll->dev->freq_monitor)
|
||||
*state = DPLL_FEATURE_STATE_ENABLE;
|
||||
else
|
||||
*state = DPLL_FEATURE_STATE_DISABLE;
|
||||
@ -1271,9 +1264,19 @@ zl3073x_dpll_freq_monitor_set(const struct dpll_device *dpll,
|
||||
enum dpll_feature_state state,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct zl3073x_dpll *zldpll = dpll_priv;
|
||||
struct zl3073x_dpll *item, *zldpll = dpll_priv;
|
||||
|
||||
zldpll->freq_monitor = (state == DPLL_FEATURE_STATE_ENABLE);
|
||||
zldpll->dev->freq_monitor = (state == DPLL_FEATURE_STATE_ENABLE);
|
||||
|
||||
/* The frequency monitoring is common for all DPLL channels so after
|
||||
* change we have to send a notification for other DPLL devices.
|
||||
*/
|
||||
list_for_each_entry(item, &zldpll->dev->dplls, list) {
|
||||
struct dpll_device *dpll_dev = READ_ONCE(item->dpll_dev);
|
||||
|
||||
if (item != zldpll && dpll_dev)
|
||||
__dpll_device_change_ntf(dpll_dev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1434,8 +1437,8 @@ zl3073x_dpll_pin_register(struct zl3073x_dpll_pin *pin, u32 index)
|
||||
|
||||
err_register:
|
||||
dpll_pin_put(pin->dpll_pin, &pin->tracker);
|
||||
pin->dpll_pin = NULL;
|
||||
err_pin_get:
|
||||
pin->dpll_pin = NULL;
|
||||
fwnode_handle_put(pin->fwnode);
|
||||
pin->fwnode = NULL;
|
||||
zl3073x_pin_props_put(props);
|
||||
@ -1603,8 +1606,10 @@ zl3073x_dpll_pins_register(struct zl3073x_dpll *zldpll)
|
||||
}
|
||||
|
||||
rc = zl3073x_dpll_pin_register(pin, index);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
zl3073x_dpll_pin_free(pin);
|
||||
goto error;
|
||||
}
|
||||
|
||||
list_add(&pin->list, &zldpll->pins);
|
||||
}
|
||||
@ -1665,13 +1670,13 @@ zl3073x_dpll_device_register(struct zl3073x_dpll *zldpll)
|
||||
static void
|
||||
zl3073x_dpll_device_unregister(struct zl3073x_dpll *zldpll)
|
||||
{
|
||||
WARN(!zldpll->dpll_dev, "DPLL device is not registered\n");
|
||||
struct dpll_device *dpll_dev = READ_ONCE(zldpll->dpll_dev);
|
||||
|
||||
cancel_work_sync(&zldpll->change_work);
|
||||
WARN(!dpll_dev, "DPLL device is not registered\n");
|
||||
|
||||
dpll_device_unregister(zldpll->dpll_dev, &zldpll->ops, zldpll);
|
||||
dpll_device_put(zldpll->dpll_dev, &zldpll->tracker);
|
||||
zldpll->dpll_dev = NULL;
|
||||
WRITE_ONCE(zldpll->dpll_dev, NULL);
|
||||
dpll_device_unregister(dpll_dev, &zldpll->ops, zldpll);
|
||||
dpll_device_put(dpll_dev, &zldpll->tracker);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1782,7 +1787,7 @@ zl3073x_dpll_pin_measured_freq_check(struct zl3073x_dpll_pin *pin)
|
||||
u8 ref_id;
|
||||
u32 freq;
|
||||
|
||||
if (!zldpll->freq_monitor)
|
||||
if (!zldpll->dev->freq_monitor)
|
||||
return false;
|
||||
|
||||
ref_id = zl3073x_input_pin_ref_get(pin->id);
|
||||
@ -1815,10 +1820,8 @@ zl3073x_dpll_changes_check(struct zl3073x_dpll *zldpll)
|
||||
struct zl3073x_dev *zldev = zldpll->dev;
|
||||
enum dpll_lock_status lock_status;
|
||||
struct device *dev = zldev->dev;
|
||||
const struct zl3073x_chan *chan;
|
||||
struct zl3073x_dpll_pin *pin;
|
||||
int rc;
|
||||
u8 mode;
|
||||
|
||||
zldpll->check_count++;
|
||||
|
||||
@ -1837,15 +1840,6 @@ zl3073x_dpll_changes_check(struct zl3073x_dpll *zldpll)
|
||||
dpll_device_change_ntf(zldpll->dpll_dev);
|
||||
}
|
||||
|
||||
/* Input pin monitoring does make sense only in automatic
|
||||
* or forced reference modes.
|
||||
*/
|
||||
chan = zl3073x_chan_state_get(zldev, zldpll->id);
|
||||
mode = zl3073x_chan_mode_get(chan);
|
||||
if (mode != ZL_DPLL_MODE_REFSEL_MODE_AUTO &&
|
||||
mode != ZL_DPLL_MODE_REFSEL_MODE_REFLOCK)
|
||||
return;
|
||||
|
||||
/* Update phase offset latch registers for this DPLL if the phase
|
||||
* offset monitor feature is enabled.
|
||||
*/
|
||||
@ -1956,7 +1950,6 @@ zl3073x_dpll_alloc(struct zl3073x_dev *zldev, u8 ch)
|
||||
zldpll->dev = zldev;
|
||||
zldpll->id = ch;
|
||||
INIT_LIST_HEAD(&zldpll->pins);
|
||||
INIT_WORK(&zldpll->change_work, zl3073x_dpll_change_work);
|
||||
|
||||
return zldpll;
|
||||
}
|
||||
|
||||
@ -15,13 +15,11 @@
|
||||
* @id: DPLL index
|
||||
* @check_count: periodic check counter
|
||||
* @phase_monitor: is phase offset monitor enabled
|
||||
* @freq_monitor: is frequency monitor enabled
|
||||
* @ops: DPLL device operations for this instance
|
||||
* @dpll_dev: pointer to registered DPLL device
|
||||
* @tracker: tracking object for the acquired reference
|
||||
* @lock_status: last saved DPLL lock status
|
||||
* @pins: list of pins
|
||||
* @change_work: device change notification work
|
||||
*/
|
||||
struct zl3073x_dpll {
|
||||
struct list_head list;
|
||||
@ -29,13 +27,11 @@ struct zl3073x_dpll {
|
||||
u8 id;
|
||||
u8 check_count;
|
||||
bool phase_monitor;
|
||||
bool freq_monitor;
|
||||
struct dpll_device_ops ops;
|
||||
struct dpll_device *dpll_dev;
|
||||
dpll_tracker tracker;
|
||||
enum dpll_lock_status lock_status;
|
||||
struct list_head pins;
|
||||
struct work_struct change_work;
|
||||
};
|
||||
|
||||
struct zl3073x_dpll *zl3073x_dpll_alloc(struct zl3073x_dev *zldev, u8 ch);
|
||||
|
||||
@ -26,11 +26,11 @@ static int zl3073x_i2c_probe(struct i2c_client *client)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id zl3073x_i2c_id[] = {
|
||||
{ "zl30731" },
|
||||
{ "zl30732" },
|
||||
{ "zl30733" },
|
||||
{ "zl30734" },
|
||||
{ "zl30735" },
|
||||
{ .name = "zl30731" },
|
||||
{ .name = "zl30732" },
|
||||
{ .name = "zl30733" },
|
||||
{ .name = "zl30734" },
|
||||
{ .name = "zl30735" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, zl3073x_i2c_id);
|
||||
|
||||
@ -577,12 +577,7 @@ void intel_alpm_disable(struct intel_dp *intel_dp)
|
||||
mutex_lock(&intel_dp->alpm_parameters.lock);
|
||||
|
||||
intel_de_rmw(display, ALPM_CTL(display, cpu_transcoder),
|
||||
ALPM_CTL_ALPM_ENABLE | ALPM_CTL_LOBF_ENABLE |
|
||||
ALPM_CTL_ALPM_AUX_LESS_ENABLE, 0);
|
||||
|
||||
intel_de_rmw(display,
|
||||
PORT_ALPM_CTL(cpu_transcoder),
|
||||
PORT_ALPM_CTL_ALPM_AUX_LESS_ENABLE, 0);
|
||||
ALPM_CTL_ALPM_ENABLE | ALPM_CTL_LOBF_ENABLE, 0);
|
||||
|
||||
drm_dbg_kms(display->drm, "Disabling ALPM\n");
|
||||
mutex_unlock(&intel_dp->alpm_parameters.lock);
|
||||
|
||||
@ -472,6 +472,7 @@ struct intel_display {
|
||||
u8 vblank_enabled;
|
||||
|
||||
int vblank_enable_count;
|
||||
bool vblank_status_last_notified;
|
||||
|
||||
struct work_struct vblank_notify_work;
|
||||
|
||||
|
||||
@ -1707,8 +1707,12 @@ static void intel_display_vblank_notify_work(struct work_struct *work)
|
||||
struct intel_display *display =
|
||||
container_of(work, typeof(*display), irq.vblank_notify_work);
|
||||
int vblank_enable_count = READ_ONCE(display->irq.vblank_enable_count);
|
||||
bool vblank_status = !!vblank_enable_count;
|
||||
|
||||
intel_psr_notify_vblank_enable_disable(display, vblank_enable_count);
|
||||
if (display->irq.vblank_status_last_notified != vblank_status) {
|
||||
intel_psr_notify_vblank_enable_disable(display, vblank_status);
|
||||
display->irq.vblank_status_last_notified = vblank_status;
|
||||
}
|
||||
}
|
||||
|
||||
int bdw_enable_vblank(struct drm_crtc *_crtc)
|
||||
@ -1721,10 +1725,10 @@ int bdw_enable_vblank(struct drm_crtc *_crtc)
|
||||
if (gen11_dsi_configure_te(crtc, true))
|
||||
return 0;
|
||||
|
||||
spin_lock_irqsave(&display->irq.lock, irqflags);
|
||||
if (crtc->vblank_psr_notify && display->irq.vblank_enable_count++ == 0)
|
||||
schedule_work(&display->irq.vblank_notify_work);
|
||||
|
||||
spin_lock_irqsave(&display->irq.lock, irqflags);
|
||||
bdw_enable_pipe_irq(display, pipe, GEN8_PIPE_VBLANK);
|
||||
spin_unlock_irqrestore(&display->irq.lock, irqflags);
|
||||
|
||||
|
||||
@ -1700,6 +1700,10 @@ struct intel_psr {
|
||||
bool pkg_c_latency_used;
|
||||
|
||||
u8 active_non_psr_pipes;
|
||||
|
||||
const char *no_psr_reason;
|
||||
|
||||
struct ref_tracker *vblank_wakeref;
|
||||
};
|
||||
|
||||
struct intel_dp {
|
||||
|
||||
@ -856,7 +856,12 @@ static void intel_psr_enable_sink(struct intel_dp *intel_dp,
|
||||
|
||||
void intel_psr_panel_replay_enable_sink(struct intel_dp *intel_dp)
|
||||
{
|
||||
if (CAN_PANEL_REPLAY(intel_dp))
|
||||
/*
|
||||
* NOTE: We might want to trigger mode set when
|
||||
* disabling/enabling Panel Replay via debugfs interface to
|
||||
* ensure this bit is cleared/set accordingly.
|
||||
*/
|
||||
if (CAN_PANEL_REPLAY(intel_dp) && panel_replay_global_enabled(intel_dp))
|
||||
drm_dp_dpcd_writeb(&intel_dp->aux, PANEL_REPLAY_CONFIG,
|
||||
DP_PANEL_REPLAY_ENABLE);
|
||||
}
|
||||
@ -3984,27 +3989,22 @@ void intel_psr_notify_vblank_enable_disable(struct intel_display *display,
|
||||
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
|
||||
|
||||
mutex_lock(&intel_dp->psr.lock);
|
||||
if (intel_dp->psr.panel_replay_enabled) {
|
||||
mutex_unlock(&intel_dp->psr.lock);
|
||||
break;
|
||||
if (CAN_PANEL_REPLAY(intel_dp)) {
|
||||
if (enable)
|
||||
intel_dp->psr.vblank_wakeref =
|
||||
intel_display_power_get(display,
|
||||
POWER_DOMAIN_DC_OFF);
|
||||
else
|
||||
intel_display_power_put(display, POWER_DOMAIN_DC_OFF,
|
||||
intel_dp->psr.vblank_wakeref);
|
||||
}
|
||||
|
||||
if (intel_dp->psr.enabled && intel_dp->psr.pkg_c_latency_used)
|
||||
if (intel_dp->psr.enabled && !intel_dp->psr.panel_replay_enabled &&
|
||||
intel_dp->psr.pkg_c_latency_used)
|
||||
intel_psr_apply_underrun_on_idle_wa_locked(intel_dp);
|
||||
|
||||
mutex_unlock(&intel_dp->psr.lock);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* NOTE: intel_display_power_set_target_dc_state is used
|
||||
* only by PSR * code for DC3CO handling. DC3CO target
|
||||
* state is currently disabled in * PSR code. If DC3CO
|
||||
* is taken into use we need take that into account here
|
||||
* as well.
|
||||
*/
|
||||
intel_display_power_set_target_dc_state(display, enable ? DC_STATE_DISABLE :
|
||||
DC_STATE_EN_UPTO_DC6);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@ -447,6 +447,9 @@ static int __t7xx_pci_pm_suspend(struct pci_dev *pdev)
|
||||
goto abort_suspend;
|
||||
}
|
||||
|
||||
/* Delay to prevent SAP suspend timeout */
|
||||
msleep(50);
|
||||
|
||||
ret = t7xx_send_pm_request(t7xx_dev, H2D_CH_SUSPEND_REQ_AP);
|
||||
if (ret) {
|
||||
t7xx_send_pm_request(t7xx_dev, H2D_CH_RESUME_REQ);
|
||||
|
||||
@ -456,6 +456,7 @@ static int do_procmap_query(struct proc_maps_private *priv, void __user *uarg)
|
||||
struct procmap_query karg;
|
||||
struct vm_area_struct *vma;
|
||||
struct mm_struct *mm;
|
||||
struct file *vm_file = NULL;
|
||||
const char *name = NULL;
|
||||
char build_id_buf[BUILD_ID_SIZE_MAX], *name_buf = NULL;
|
||||
__u64 usize;
|
||||
@ -528,21 +529,6 @@ static int do_procmap_query(struct proc_maps_private *priv, void __user *uarg)
|
||||
karg.inode = 0;
|
||||
}
|
||||
|
||||
if (karg.build_id_size) {
|
||||
__u32 build_id_sz;
|
||||
|
||||
err = build_id_parse(vma, build_id_buf, &build_id_sz);
|
||||
if (err) {
|
||||
karg.build_id_size = 0;
|
||||
} else {
|
||||
if (karg.build_id_size < build_id_sz) {
|
||||
err = -ENAMETOOLONG;
|
||||
goto out;
|
||||
}
|
||||
karg.build_id_size = build_id_sz;
|
||||
}
|
||||
}
|
||||
|
||||
if (karg.vma_name_size) {
|
||||
size_t name_buf_sz = min_t(size_t, PATH_MAX, karg.vma_name_size);
|
||||
const struct path *path;
|
||||
@ -576,10 +562,34 @@ static int do_procmap_query(struct proc_maps_private *priv, void __user *uarg)
|
||||
karg.vma_name_size = name_sz;
|
||||
}
|
||||
|
||||
if (karg.build_id_size && vma->vm_file)
|
||||
vm_file = get_file(vma->vm_file);
|
||||
|
||||
/* unlock vma or mmap_lock, and put mm_struct before copying data to user */
|
||||
query_vma_teardown(mm, vma);
|
||||
mmput(mm);
|
||||
|
||||
if (karg.build_id_size) {
|
||||
__u32 build_id_sz;
|
||||
|
||||
if (vm_file)
|
||||
err = build_id_parse_file(vm_file, build_id_buf, &build_id_sz);
|
||||
else
|
||||
err = -ENOENT;
|
||||
if (err) {
|
||||
karg.build_id_size = 0;
|
||||
} else {
|
||||
if (karg.build_id_size < build_id_sz) {
|
||||
err = -ENAMETOOLONG;
|
||||
goto out_file;
|
||||
}
|
||||
karg.build_id_size = build_id_sz;
|
||||
}
|
||||
}
|
||||
|
||||
if (vm_file)
|
||||
fput(vm_file);
|
||||
|
||||
if (karg.vma_name_size && copy_to_user(u64_to_user_ptr(karg.vma_name_addr),
|
||||
name, karg.vma_name_size)) {
|
||||
kfree(name_buf);
|
||||
@ -599,6 +609,9 @@ static int do_procmap_query(struct proc_maps_private *priv, void __user *uarg)
|
||||
out:
|
||||
query_vma_teardown(mm, vma);
|
||||
mmput(mm);
|
||||
out_file:
|
||||
if (vm_file)
|
||||
fput(vm_file);
|
||||
kfree(name_buf);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
#define BUILD_ID_SIZE_MAX 20
|
||||
|
||||
struct vm_area_struct;
|
||||
struct file;
|
||||
|
||||
int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id, __u32 *size);
|
||||
int build_id_parse_file(struct file *file, unsigned char *build_id, __u32 *size);
|
||||
int build_id_parse_nofault(struct vm_area_struct *vma, unsigned char *build_id, __u32 *size);
|
||||
int build_id_parse_buf(const void *buf, unsigned char *build_id, u32 buf_size);
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <net/netlink.h>
|
||||
|
||||
#include <linux/rh_kabi.h>
|
||||
|
||||
@ -264,13 +265,18 @@ struct dpll_pin_notifier_info {
|
||||
u64 clock_id;
|
||||
const struct fwnode_handle *fwnode;
|
||||
const struct dpll_pin_properties *prop;
|
||||
u64 src_clock_id;
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_DPLL)
|
||||
void dpll_netdev_pin_set(struct net_device *dev, struct dpll_pin *dpll_pin);
|
||||
void dpll_netdev_pin_clear(struct net_device *dev);
|
||||
|
||||
size_t dpll_netdev_pin_handle_size(const struct net_device *dev);
|
||||
static inline size_t dpll_netdev_pin_handle_size(void)
|
||||
{
|
||||
return nla_total_size(4); /* DPLL_A_PIN_ID */
|
||||
}
|
||||
|
||||
int dpll_netdev_add_pin_handle(struct sk_buff *msg,
|
||||
const struct net_device *dev);
|
||||
|
||||
@ -281,7 +287,7 @@ static inline void
|
||||
dpll_netdev_pin_set(struct net_device *dev, struct dpll_pin *dpll_pin) { }
|
||||
static inline void dpll_netdev_pin_clear(struct net_device *dev) { }
|
||||
|
||||
static inline size_t dpll_netdev_pin_handle_size(const struct net_device *dev)
|
||||
static inline size_t dpll_netdev_pin_handle_size(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -336,8 +342,10 @@ void dpll_pin_on_pin_unregister(struct dpll_pin *parent, struct dpll_pin *pin,
|
||||
int dpll_pin_ref_sync_pair_add(struct dpll_pin *pin,
|
||||
struct dpll_pin *ref_sync_pin);
|
||||
|
||||
int __dpll_device_change_ntf(struct dpll_device *dpll);
|
||||
int dpll_device_change_ntf(struct dpll_device *dpll);
|
||||
|
||||
int __dpll_pin_change_ntf(struct dpll_pin *pin);
|
||||
int dpll_pin_change_ntf(struct dpll_pin *pin);
|
||||
|
||||
int register_dpll_notifier(struct notifier_block *nb);
|
||||
|
||||
@ -108,11 +108,14 @@ enum dpll_clock_quality_level {
|
||||
* enum dpll_type - type of dpll, valid values for DPLL_A_TYPE attribute
|
||||
* @DPLL_TYPE_PPS: dpll produces Pulse-Per-Second signal
|
||||
* @DPLL_TYPE_EEC: dpll drives the Ethernet Equipment Clock
|
||||
* @DPLL_TYPE_GENERIC: generic dpll type for devices outside PPS/EEC classes
|
||||
*/
|
||||
enum dpll_type {
|
||||
DPLL_TYPE_PPS = 1,
|
||||
DPLL_TYPE_EEC,
|
||||
|
||||
#ifndef __GENKSYMS__
|
||||
DPLL_TYPE_GENERIC,
|
||||
#endif
|
||||
/* private: */
|
||||
__DPLL_TYPE_MAX,
|
||||
DPLL_TYPE_MAX = (__DPLL_TYPE_MAX - 1)
|
||||
|
||||
@ -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.42.1.el10.x86_64,mailto:security@almalinux.org
|
||||
kernel.almalinux,1,AlmaLinux,kernel-core,6.12.0-211.43.1.el10.x86_64,mailto:security@almalinux.org
|
||||
|
||||
@ -1458,10 +1458,11 @@ static int __try_to_del_timer_sync(struct timer_list *timer, bool shutdown)
|
||||
|
||||
base = lock_timer_base(timer, &flags);
|
||||
|
||||
if (base->running_timer != timer)
|
||||
if (base->running_timer != timer) {
|
||||
ret = detach_if_pending(timer, base, true);
|
||||
if (shutdown)
|
||||
timer->function = NULL;
|
||||
if (shutdown)
|
||||
timer->function = NULL;
|
||||
}
|
||||
|
||||
raw_spin_unlock_irqrestore(&base->lock, flags);
|
||||
|
||||
|
||||
@ -279,7 +279,7 @@ static int get_build_id_64(struct freader *r, unsigned char *build_id, __u32 *si
|
||||
/* enough for Elf64_Ehdr, Elf64_Phdr, and all the smaller requests */
|
||||
#define MAX_FREADER_BUF_SZ 64
|
||||
|
||||
static int __build_id_parse(struct vm_area_struct *vma, unsigned char *build_id,
|
||||
static int __build_id_parse(struct file *file, unsigned char *build_id,
|
||||
__u32 *size, bool may_fault)
|
||||
{
|
||||
const Elf32_Ehdr *ehdr;
|
||||
@ -287,11 +287,7 @@ static int __build_id_parse(struct vm_area_struct *vma, unsigned char *build_id,
|
||||
char buf[MAX_FREADER_BUF_SZ];
|
||||
int ret;
|
||||
|
||||
/* only works for page backed storage */
|
||||
if (!vma->vm_file)
|
||||
return -EINVAL;
|
||||
|
||||
freader_init_from_file(&r, buf, sizeof(buf), vma->vm_file, may_fault);
|
||||
freader_init_from_file(&r, buf, sizeof(buf), file, may_fault);
|
||||
|
||||
/* fetch first 18 bytes of ELF header for checks */
|
||||
ehdr = freader_fetch(&r, 0, offsetofend(Elf32_Ehdr, e_type));
|
||||
@ -319,8 +315,8 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse build ID of ELF file mapped to vma
|
||||
/**
|
||||
* build_id_parse_nofault() - Parse build ID of ELF file mapped to vma
|
||||
* @vma: vma object
|
||||
* @build_id: buffer to store build id, at least BUILD_ID_SIZE long
|
||||
* @size: returns actual build id size in case of success
|
||||
@ -332,11 +328,14 @@ out:
|
||||
*/
|
||||
int build_id_parse_nofault(struct vm_area_struct *vma, unsigned char *build_id, __u32 *size)
|
||||
{
|
||||
return __build_id_parse(vma, build_id, size, false /* !may_fault */);
|
||||
if (!vma->vm_file)
|
||||
return -EINVAL;
|
||||
|
||||
return __build_id_parse(vma->vm_file, build_id, size, false /* !may_fault */);
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse build ID of ELF file mapped to VMA
|
||||
/**
|
||||
* build_id_parse() - Parse build ID of ELF file mapped to VMA
|
||||
* @vma: vma object
|
||||
* @build_id: buffer to store build id, at least BUILD_ID_SIZE long
|
||||
* @size: returns actual build id size in case of success
|
||||
@ -348,7 +347,26 @@ int build_id_parse_nofault(struct vm_area_struct *vma, unsigned char *build_id,
|
||||
*/
|
||||
int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id, __u32 *size)
|
||||
{
|
||||
return __build_id_parse(vma, build_id, size, true /* may_fault */);
|
||||
if (!vma->vm_file)
|
||||
return -EINVAL;
|
||||
|
||||
return __build_id_parse(vma->vm_file, build_id, size, true /* may_fault */);
|
||||
}
|
||||
|
||||
/**
|
||||
* build_id_parse_file() - Parse build ID of ELF file
|
||||
* @file: file object
|
||||
* @build_id: buffer to store build id, at least BUILD_ID_SIZE long
|
||||
* @size: returns actual build id size in case of success
|
||||
*
|
||||
* Assumes faultable context and can cause page faults to bring in file data
|
||||
* into page cache.
|
||||
*
|
||||
* Return: 0 on success; negative error, otherwise
|
||||
*/
|
||||
int build_id_parse_file(struct file *file, unsigned char *build_id, __u32 *size)
|
||||
{
|
||||
return __build_id_parse(file, build_id, size, true /* may_fault */);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1087,11 +1087,11 @@ static size_t rtnl_devlink_port_size(const struct net_device *dev)
|
||||
return size;
|
||||
}
|
||||
|
||||
static size_t rtnl_dpll_pin_size(const struct net_device *dev)
|
||||
static size_t rtnl_dpll_pin_size(void)
|
||||
{
|
||||
size_t size = nla_total_size(0); /* nest IFLA_DPLL_PIN */
|
||||
|
||||
size += dpll_netdev_pin_handle_size(dev);
|
||||
size += dpll_netdev_pin_handle_size();
|
||||
|
||||
return size;
|
||||
}
|
||||
@ -1152,7 +1152,7 @@ static noinline size_t if_nlmsg_size(const struct net_device *dev,
|
||||
+ rtnl_prop_list_size(dev)
|
||||
+ nla_total_size(MAX_ADDR_LEN) /* IFLA_PERM_ADDRESS */
|
||||
+ rtnl_devlink_port_size(dev)
|
||||
+ rtnl_dpll_pin_size(dev)
|
||||
+ rtnl_dpll_pin_size()
|
||||
+ nla_total_size(8) /* IFLA_MAX_PACING_OFFLOAD_HORIZON */
|
||||
+ 0;
|
||||
}
|
||||
|
||||
@ -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.42.1.el10.x86_64,mailto:security@almalinux.org
|
||||
kernel-uki-virt-addons.almalinux,1,AlmaLinux,kernel-uki-virt-addons,6.12.0-211.43.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.42.1.el10.x86_64,mailto:security@almalinux.org
|
||||
kernel-uki-virt.almalinux,1,AlmaLinux,kernel-uki-virt,6.12.0-211.43.1.el10.x86_64,mailto:security@almalinux.org
|
||||
|
||||
Loading…
Reference in New Issue
Block a user