drm/amdgpu: check the result of copy_from_user in secure display debugfs (v2)
Subsystems (2)
PATCH 1/1 drm/amdgpu: check the result of copy_from_user in secure display debugfs (v2)
Make sure the copy succeeded. Also fixes a warning.
v2: fix the error check
--- drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c +3 -1
@@ -101,7 +101,9 @@ static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __ureturn -EINVAL ;memset (str,0 ,sizeof (str)); -copy_from_user (str, buf, size); + ret =copy_from_user (str, buf, size); +if (ret) +return -EFAULT ; ret =pm_runtime_get_sync (dev->dev);if (ret <0 ) {
Signature · 6 lines
2.29.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
+ Joe
Quoted 26 lines · Alex Deucher
Make sure the copy succeeded. Also fixes a warning.
v2: fix the error check
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c +3
-2@@ -101,7 +101,9 @@ static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __ureturn -EINVAL ;memset (str,0 ,sizeof (str)); -copy_from_user (str, buf, size); + ret =copy_from_user (str, buf, size); +if (ret) +return -EFAULT ; ret =pm_runtime_get_sync (dev->dev);if (ret <0 ) { --
Quoted 2 lines
2.29.2
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Thanks, Alex!
Regards,
Joe
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, January 14, 2021 11:24 AM
To: amd-gfx list <[email protected]>; Su, Jinzhou (Joe) <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: check the result of copy_from_user in secure display debugfs (v2)
+ Joe
Quoted 26 lines · Alex Deucher
Make sure the copy succeeded. Also fixes a warning.
v2: fix the error check
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c +3
-2@@ -101,7 +101,9 @@ static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __ureturn -EINVAL ;memset (str,0 ,sizeof (str)); -copy_from_user (str, buf, size); + ret =copy_from_user (str, buf, size); +if (ret) +return -EFAULT ; ret =pm_runtime_get_sync (dev->dev);if (ret <0 ) { --
Quoted 2 lines
2.29.2
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
maintainer[AMD Public Use]
Quoted 9 lines
-----Original Message-----
From: Su, Jinzhou (Joe) <[email protected]>
Sent: Wednesday, January 13, 2021 10:27 PM
To: Alex Deucher <[email protected]>; amd-gfx list <amd- [email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: check the result ofcopy_from_userin secure display debugfs (v2)
Quoted 3 lines
[AMD Official Use Only - Internal Distribution Only]
Thanks, Alex!
Can I get a Reviewed-by or Acked-by?
Thanks!
Alex
Quoted 27 lines
Regards,
Joe-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, January 14, 2021 11:24 AM
To: amd-gfx list <[email protected]>; Su, Jinzhou (Joe) <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: check the result ofcopy_from_userin secure display debugfs (v2)+ Joe
Quoted 10 lines · Alex Deucher
Make sure the copy succeeded. Also fixes a warning.
v2: fix the error check
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 20 lines
Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.cdrivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c static ssize_t
Quoted 4 lines
index 455978781380..b033344c5ce2 100644
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c +0
-0@@ -101,7 +101,9 @@ static ssize_tamdgpu_securedisplay_debugfs_write(struct file *f, const char
__uQuoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c +3
-2return -EINVAL ;memset (str,0 ,sizeof (str)); -copy_from_user (str, buf, size); + ret =copy_from_user (str, buf, size); +if (ret) +return -EFAULT ; ret =pm_runtime_get_sync (dev->dev);if (ret <0 ) { --2.29.2
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Su, Jinzhou (Joe)
Reviewed-by[AMD Public Use]
Regards,
Joe
-----Original Message-----
From: Deucher, Alexander <[email protected]>
Sent: Thursday, January 14, 2021 12:17 PM
To: Su, Jinzhou (Joe) <[email protected]>; Alex Deucher <[email protected]>; amd-gfx list <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: check the result of copy_from_user in secure display debugfs (v2)
[AMD Public Use]
Quoted 9 lines
-----Original Message-----
From: Su, Jinzhou (Joe) <[email protected]>
Sent: Wednesday, January 13, 2021 10:27 PM
To: Alex Deucher <[email protected]>; amd-gfx list <amd- [email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: check the result ofcopy_from_userin secure display debugfs (v2)
Quoted 3 lines
[AMD Official Use Only - Internal Distribution Only]
Thanks, Alex!
Can I get a Reviewed-by or Acked-by?
Thanks!
Alex
Quoted 27 lines
Regards,
Joe-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, January 14, 2021 11:24 AM
To: amd-gfx list <[email protected]>; Su, Jinzhou (Joe) <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: check the result ofcopy_from_userin secure display debugfs (v2)+ Joe
Quoted 10 lines · Alex Deucher
Make sure the copy succeeded. Also fixes a warning.
v2: fix the error check
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 20 lines
Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.cdrivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c static ssize_t
Quoted 4 lines
index 455978781380..b033344c5ce2 100644
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c +0
-0@@ -101,7 +101,9 @@ static ssize_tamdgpu_securedisplay_debugfs_write(struct file *f, const char
__uQuoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c +3
-2return -EINVAL ;memset (str,0 ,sizeof (str)); -copy_from_user (str, buf, size); + ret =copy_from_user (str, buf, size); +if (ret) +return -EFAULT ; ret =pm_runtime_get_sync (dev->dev);if (ret <0 ) { --2.29.2
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx