mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
firmware: tegra: Changes for v5.20-rc1
Contains a fix that avoids unaligned accesses to IPC memory, which in turn helps in suppressing speculative reads from out-of-bounds memory. Another patch performs some minor cleanup around debugfs API usage. -----BEGIN PGP SIGNATURE----- iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmLIeCwTHHRyZWRpbmdA bnZpZGlhLmNvbQAKCRDdI6zXfz6zoX+JEACkEPqRF06QMQSYwX/b+aOYQwPciSn7 XRWY2Kap26uIovtGYGHc4LndcB4w8kgUtTxw6eHlO5eTb364XdRZd5IER0GjQK/o +jx9EwcWxwPKT0zk949vC/5UzfxdXVUGwg2K846wmsATn6Jh8zJHmaz9WHPS+5Y0 UEtN4POucg5ehqlQ59zY/DHpE0xPwlmtiNpHeRvdjjjOPwGDrDE2FarJuOsdl4Nq kFn6dINEzyXNKWSH9n9pI7Uu5Gac9MFpFMSQV5yXNUUW6ArQd6k0ANFrialEgpY4 gPXZH+J1kodEyeHvj+Dmsndu3yUUL95zDc5vxnnp0FUxb4flSR/JXPeglLUbqdL6 H/HAg6XOTMGbKr3KhRk7USTPZuAnkfyWZdPbKqdVlDuUiL47j6ZWqkA/Ne7zR1V+ e2fk5xY6doLm/nAj8ZtZwx3O7e1hDOswi6WlPYMqLj7Lrd1JRYAhw0CdPudcGbLT 0YrUzhY2VHshXQYqkEnb1rj207BAOc4kWho8ae2xLi5q6jLBRhTbuV504aybZRFe LR8a7GEQXWB42+lZAdMk5TxzzKhsPas2vrVkaJKalqrmmVwwzERH8ZxvLs1OsfjO OaoU5XWicCaXlznfoWIOTDVEWHAzgv6IW/+p2rDzMbKmIPYPFMV6vn38tbZ9RnKX e9U0w6y7lqNUuQ== =I1B3 -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLN3wYACgkQmmx57+YA GNlaZg//dkNb+105NP+2E3YvDX4t7MsVd+V8n/9HAyXRz9QfgDCYW6Iyvu7apE4K yGshIyRJ8uVNjz94GBF1H6Q+GL1Upnam0CVeaIEYzJn3ITk0S1BPDkVPoOu5/V9M MDBddJ5PNAI0gi7q6CDvkvpUibkuwb70cbcBswGitOzjpbSyw90piK3IPurSCSrr 24qHM2Iqv6PFwV9n+pYzCJtC55XAbIQNZ/lXFEybdE7M71dSqFnqzAGl8c6b3mrW zl9F7cmokql67LCBH8NL6E4M23BXW1unxCAu7u9Rn95KisItOBNFbkx1W6bgUfdj iOVBYVNyqUfTTNdMHB1W2eZv9RsKZRDrKQ6b1xSR36c5/fFnJXO3B1j/Do3qjRc3 CkmiDqPpy2ISs6uRwniq7yE4e/ucSBPzG1FfcQ7bkmG/iGhfcAvJyf4FrmjGB7Pt SVdqw5ZbxdCtbTDjqwFMpkMhj3E3P+5vwDeQ8F7gOhwKSaU+cWskP2GuKMCP/kjs +ea/9YFbTjy4/ib8RtT+Nw/k2Q+k6ZUto4/BpTa7GrRfEkMrUuaZPrG/uzWSvI50 KFNeyk7HpMAmX/pfABraZgY5IWd7Y4+n4gDvTobw6XkaDCvqEFdkMhpmlCD8/VAK zlfIscUilNj+OaclwHqarPwYSKXDB2H9kV+XLGF+HICaCv7zexw= =c0Uc -----END PGP SIGNATURE----- Merge tag 'tegra-for-5.20-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers firmware: tegra: Changes for v5.20-rc1 Contains a fix that avoids unaligned accesses to IPC memory, which in turn helps in suppressing speculative reads from out-of-bounds memory. Another patch performs some minor cleanup around debugfs API usage. * tag 'tegra-for-5.20-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: Fix error check return value of debugfs_create_file() firmware: tegra: bpmp: Do only aligned access to IPC memory area Link: https://lore.kernel.org/r/20220708185608.676474-3-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
933edcde43
2 changed files with 8 additions and 8 deletions
|
@ -474,7 +474,7 @@ static int bpmp_populate_debugfs_inband(struct tegra_bpmp *bpmp,
|
|||
mode |= attrs & DEBUGFS_S_IWUSR ? 0200 : 0;
|
||||
dentry = debugfs_create_file(name, mode, parent, bpmp,
|
||||
&bpmp_debug_fops);
|
||||
if (!dentry) {
|
||||
if (IS_ERR(dentry)) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
@ -725,7 +725,7 @@ static int bpmp_populate_dir(struct tegra_bpmp *bpmp, struct seqbuf *seqbuf,
|
|||
|
||||
if (t & DEBUGFS_S_ISDIR) {
|
||||
dentry = debugfs_create_dir(name, parent);
|
||||
if (!dentry)
|
||||
if (IS_ERR(dentry))
|
||||
return -ENOMEM;
|
||||
err = bpmp_populate_dir(bpmp, seqbuf, dentry, depth+1);
|
||||
if (err < 0)
|
||||
|
@ -738,7 +738,7 @@ static int bpmp_populate_dir(struct tegra_bpmp *bpmp, struct seqbuf *seqbuf,
|
|||
dentry = debugfs_create_file(name, mode,
|
||||
parent, bpmp,
|
||||
&debugfs_fops);
|
||||
if (!dentry)
|
||||
if (IS_ERR(dentry))
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
@ -788,11 +788,11 @@ int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)
|
|||
return 0;
|
||||
|
||||
root = debugfs_create_dir("bpmp", NULL);
|
||||
if (!root)
|
||||
if (IS_ERR(root))
|
||||
return -ENOMEM;
|
||||
|
||||
bpmp->debugfs_mirror = debugfs_create_dir("debug", root);
|
||||
if (!bpmp->debugfs_mirror) {
|
||||
if (IS_ERR(bpmp->debugfs_mirror)) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ static ssize_t __tegra_bpmp_channel_read(struct tegra_bpmp_channel *channel,
|
|||
int err;
|
||||
|
||||
if (data && size > 0)
|
||||
memcpy(data, channel->ib->data, size);
|
||||
memcpy_fromio(data, channel->ib->data, size);
|
||||
|
||||
err = tegra_bpmp_ack_response(channel);
|
||||
if (err < 0)
|
||||
|
@ -245,7 +245,7 @@ static ssize_t __tegra_bpmp_channel_write(struct tegra_bpmp_channel *channel,
|
|||
channel->ob->flags = flags;
|
||||
|
||||
if (data && size > 0)
|
||||
memcpy(channel->ob->data, data, size);
|
||||
memcpy_toio(channel->ob->data, data, size);
|
||||
|
||||
return tegra_bpmp_post_request(channel);
|
||||
}
|
||||
|
@ -420,7 +420,7 @@ void tegra_bpmp_mrq_return(struct tegra_bpmp_channel *channel, int code,
|
|||
channel->ob->code = code;
|
||||
|
||||
if (data && size > 0)
|
||||
memcpy(channel->ob->data, data, size);
|
||||
memcpy_toio(channel->ob->data, data, size);
|
||||
|
||||
err = tegra_bpmp_post_response(channel);
|
||||
if (WARN_ON(err < 0))
|
||||
|
|
Loading…
Reference in a new issue