Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1666d972 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: smem: smem_get_entry_no_rlock() security extension"

parents 323537b0 d73ae3d2
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -171,13 +171,16 @@ void *smem_get_entry_to_proc(unsigned id, unsigned *size, unsigned to_proc,
 *
 * @id:       ID of SMEM item
 * @size_out: Pointer to size variable for storing the result
 * @to_proc:  SMEM host that shares the item with apps
 * @flags:    Item attribute flags
 * @returns:  Pointer to SMEM item or NULL if it doesn't exist
 *
 * This function does not lock the remote spinlock and should only be used in
 * failure-recover cases such as retrieving the subsystem failure reason during
 * subsystem restart.
 */
void *smem_get_entry_no_rlock(unsigned id, unsigned *size_out);
void *smem_get_entry_no_rlock(unsigned id, unsigned *size_out, unsigned to_proc,
								unsigned flags);

/**
 * smem_virt_to_phys() - Convert SMEM address to physical address.
@@ -221,7 +224,8 @@ static void *smem_get_entry_to_proc(unsigned id, unsigned *size,
{
	return NULL;
}
void *smem_get_entry_no_rlock(unsigned id, unsigned *size_out)
void *smem_get_entry_no_rlock(unsigned id, unsigned *size_out, unsigned to_proc,
								unsigned flags)
{
	return NULL;
}
+2 −1
Original line number Diff line number Diff line
@@ -62,7 +62,8 @@ static void log_modem_sfr(void)
	u32 size;
	char *smem_reason, reason[MAX_SSR_REASON_LEN];

	smem_reason = smem_get_entry_no_rlock(SMEM_SSR_REASON_MSS0, &size);
	smem_reason = smem_get_entry_no_rlock(SMEM_SSR_REASON_MSS0, &size, 0,
							SMEM_ANY_HOST_FLAG);
	if (!smem_reason || !size) {
		pr_err("modem subsystem failure reason: (unknown, smem_get_entry_no_rlock failed).\n");
		return;
+6 −2
Original line number Diff line number Diff line
@@ -763,15 +763,19 @@ EXPORT_SYMBOL(smem_get_entry_to_proc);
 *
 * @id:       ID of SMEM item
 * @size_out: Pointer to size variable for storing the result
 * @to_proc:  SMEM host that shares the item with apps
 * @flags:    Item attribute flags
 * @returns:  Pointer to SMEM item or NULL if it doesn't exist
 *
 * This function does not lock the remote spinlock and should only be used in
 * failure-recover cases such as retrieving the subsystem failure reason during
 * subsystem restart.
 */
void *smem_get_entry_no_rlock(unsigned id, unsigned *size_out)
void *smem_get_entry_no_rlock(unsigned id, unsigned *size_out, unsigned to_proc,
								unsigned flags)
{
	return __smem_get_entry(id, size_out, false, false);
	return __smem_get_entry_to_proc(id, size_out, to_proc, flags, false,
									false);
}
EXPORT_SYMBOL(smem_get_entry_no_rlock);