Re: [PATCH 19/64] ip: Use struct_group() for memcpy() regions

2021-07-27 Thread Gustavo A. R. Silva
On 7/28/21 01:31, Gustavo A. R. Silva wrote: > > > On 7/28/21 01:19, Greg Kroah-Hartman wrote: >> On Wed, Jul 28, 2021 at 01:14:33AM -0500, Gustavo A. R. Silva wrote: >>> >>> >>> On 7/28/21 00:55, Greg Kroah-Hartman wrote: On Tue, Jul 27, 2021 at 01:58:10PM -0700, Kees Cook wrote: > I

Re: [PATCH 19/64] ip: Use struct_group() for memcpy() regions

2021-07-27 Thread Gustavo A. R. Silva
On 7/28/21 01:19, Greg Kroah-Hartman wrote: > On Wed, Jul 28, 2021 at 01:14:33AM -0500, Gustavo A. R. Silva wrote: >> >> >> On 7/28/21 00:55, Greg Kroah-Hartman wrote: >>> On Tue, Jul 27, 2021 at 01:58:10PM -0700, Kees Cook wrote: In preparation for FORTIFY_SOURCE performing compile-time an

Re: [PATCH 19/64] ip: Use struct_group() for memcpy() regions

2021-07-27 Thread Greg Kroah-Hartman
On Wed, Jul 28, 2021 at 01:31:16AM -0500, Gustavo A. R. Silva wrote: > > Why not use a local version of the macro like was done in the DRM header > > file, to make it always work the same and more obvious what is > > happening? If I were a userspace developer and saw the above, I would > > think t

Re: [PATCH 19/64] ip: Use struct_group() for memcpy() regions

2021-07-27 Thread Gustavo A. R. Silva
On 7/28/21 00:55, Greg Kroah-Hartman wrote: > On Tue, Jul 27, 2021 at 01:58:10PM -0700, Kees Cook wrote: >> In preparation for FORTIFY_SOURCE performing compile-time and run-time >> field bounds checking for memcpy(), memmove(), and memset(), avoid >> intentionally writing across neighboring fie

Re: [PATCH 19/64] ip: Use struct_group() for memcpy() regions

2021-07-27 Thread Greg Kroah-Hartman
On Wed, Jul 28, 2021 at 01:14:33AM -0500, Gustavo A. R. Silva wrote: > > > On 7/28/21 00:55, Greg Kroah-Hartman wrote: > > On Tue, Jul 27, 2021 at 01:58:10PM -0700, Kees Cook wrote: > >> In preparation for FORTIFY_SOURCE performing compile-time and run-time > >> field bounds checking for memcpy()

Re: [PATCH 33/64] lib: Introduce CONFIG_TEST_MEMCPY

2021-07-27 Thread Bart Van Assche
On 7/27/21 1:58 PM, Kees Cook wrote: +static int __init test_memcpy_init(void) +{ + int err = 0; + + err |= test_memcpy(); + err |= test_memmove(); + err |= test_memset(); + + if (err) { + pr_warn("FAIL!\n"); + err = -EINVAL; + } els

Re: [PATCH v2 09/14] soc: mediatek: mmsys: Add reset controller support for MT8195 vdosys1

2021-07-27 Thread Nancy . Lin
Hi Enric, Thanks for your review. On Fri, 2021-07-23 at 12:57 +0200, Enric Balletbo Serra wrote: > Hi Nancy, > > Thank you for your patch. > > Missatge de Nancy.Lin del dia dj., 22 de > jul. > 2021 a les 11:46: > > > > Among other features the mmsys driver should implement a reset > > control

Re: [PATCH 25/64] drm/mga/mga_ioc32: Use struct_group() for memcpy() region

2021-07-27 Thread Greg Kroah-Hartman
On Tue, Jul 27, 2021 at 01:58:16PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. > > Use struct_group() in struct drm32_mga_ini

Re: [PATCH 19/64] ip: Use struct_group() for memcpy() regions

2021-07-27 Thread Greg Kroah-Hartman
On Tue, Jul 27, 2021 at 01:58:10PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. > > Use struct_group() in struct flowi4, struc

Re: [PATCH 10/64] lib80211: Use struct_group() for memcpy() region

2021-07-27 Thread Greg Kroah-Hartman
On Tue, Jul 27, 2021 at 01:58:01PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. > > Use struct_group() around members addr1, a

Re: [PATCH 62/64] netlink: Avoid false-positive memcpy() warning

2021-07-27 Thread Greg Kroah-Hartman
On Tue, Jul 27, 2021 at 01:58:53PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. > > Add a flexible array member to mark the en

Re: [PATCH 49/64] cm4000_cs: Use struct_group() to zero struct cm4000_dev region

2021-07-27 Thread Greg Kroah-Hartman
On Tue, Jul 27, 2021 at 01:58:40PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memset(), avoid intentionally writing across > neighboring fields. > > Add struct_group() to mark region of struct cm4000_dev that should

Re: [PATCH 09/64] staging: rtl8723bs: Avoid field-overflowing memcpy()

2021-07-27 Thread Greg Kroah-Hartman
On Tue, Jul 27, 2021 at 01:58:00PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. > > Adjust memcpy() destination to be the name

Re: [PATCH 08/64] staging: rtl8192u: Use struct_group() for memcpy() region

2021-07-27 Thread Greg Kroah-Hartman
On Tue, Jul 27, 2021 at 01:57:59PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. > > Use struct_group() around members addr1, a

Re: [PATCH 24/64] staging: wlan-ng: Use struct_group() for memcpy() region

2021-07-27 Thread Greg Kroah-Hartman
On Tue, Jul 27, 2021 at 01:58:15PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. > > Use struct_group() in struct hfa384x_tx_fr

Re: [PATCH 07/64] staging: rtl8192e: Use struct_group() for memcpy() region

2021-07-27 Thread Greg Kroah-Hartman
On Tue, Jul 27, 2021 at 01:57:58PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. > > Use struct_group() around members addr1, a

Re: [PATCH v2 07/14] soc: mediatek: add mtk-mmsys support for mt8195 vdosys1

2021-07-27 Thread Nancy . Lin
Hi Enric, Thanks for your review. On Fri, 2021-07-23 at 13:05 +0200, Enric Balletbo Serra wrote: > Hi Nancy, > > Thank you for your patch. > > Missatge de Nancy.Lin del dia dj., 22 de > jul. > 2021 a les 11:45: > > > > Add mt8195 vdosys1 clock driver name and routing table to > > the driver d

Re: [PATCH v2 04/14] dt-bindings: reset: mt8195: Move reset controller constants into common location

2021-07-27 Thread Nancy . Lin
Hi Enric, Thanks for your review. On Fri, 2021-07-23 at 13:10 +0200, Enric Balletbo Serra wrote: > Hi Nancy, > > Thank you for your patch > > Missatge de Nancy.Lin del dia dj., 22 de > jul. > 2021 a les 11:46: > > > > The DT binding includes for reset controllers are located in > > include/dt

Re: [PATCH 00/14] drm: Make DRM's IRQ helpers legacy

2021-07-27 Thread Thomas Zimmermann
Hi Sam Am 27.07.21 um 20:51 schrieb Sam Ravnborg: Hi Thomas, On Tue, Jul 27, 2021 at 08:27:07PM +0200, Thomas Zimmermann wrote: DRM's IRQ helpers are only helpful for old, non-KMS drivers. Move the code behind CONFIG_DRM_LEGACY. Convert KMS drivers to Linux IRQ interfaces. DRM provides IRQ he

[Bug 213779] Screen stays blank on resume from hibernate

2021-07-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213779 --- Comment #4 from Alex Deucher (alexdeuc...@gmail.com) --- Fix is in 5.14 and should land in stable shortly: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6be50f5d83adc9541de3d5be26e968182b5ac150 -- You may repl

Re: [PATCH 06/64] bnxt_en: Use struct_group_attr() for memcpy() region

2021-07-27 Thread Gustavo A. R. Silva
On Tue, Jul 27, 2021 at 01:57:57PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. > > Use struct_group() around members queue_id

Re: [Intel-gfx] [PATCH 08/15] drm/i915/guc/slpc: Add methods to set min/max frequency

2021-07-27 Thread Belgaumkar, Vinay
On 7/27/2021 8:24 AM, Michal Wajdeczko wrote: On 26.07.2021 21:07, Vinay Belgaumkar wrote: Add param set h2g helpers to set the min and max frequencies s/h2g/H2G for use by SLPC. v2: Address review comments (Michal W) v3: Check for positive error code (Michal W) Signed-off-by: Sundare

Re: [PATCH 05/64] skbuff: Switch structure bounds to struct_group()

2021-07-27 Thread Gustavo A. R. Silva
On Tue, Jul 27, 2021 at 01:57:56PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. > > Replace the existing empty member position

Re: [PATCH 34/64] fortify: Detect struct member overflows in memcpy() at compile-time

2021-07-27 Thread Nick Desaulniers
On Tue, Jul 27, 2021 at 2:17 PM Kees Cook wrote: > > To accelerate the review of potential run-time false positives, it's > also worth noting that it is possible to partially automate checking > by examining memcpy() buffer argument fields to see if they have > a neighboring. It is reasonable to e

Re: [PATCH 04/64] stddef: Introduce struct_group() helper macro

2021-07-27 Thread Gustavo A. R. Silva
On Tue, Jul 27, 2021 at 01:57:55PM -0700, Kees Cook wrote: > Kernel code has a regular need to describe groups of members within a > structure usually when they need to be copied or initialized separately > from the rest of the surrounding structure. The generally accepted design > pattern in C is

Re: [PATCH 03/64] rpmsg: glink: Replace strncpy() with strscpy_pad()

2021-07-27 Thread Gustavo A. R. Silva
On Tue, Jul 27, 2021 at 01:57:54PM -0700, Kees Cook wrote: > The use of strncpy() is considered deprecated for NUL-terminated > strings[1]. Replace strncpy() with strscpy_pad() (as it seems this case > expects the NUL padding to fill the allocation following the flexible > array). This additionally

Re: [PATCH 01/64] media: omap3isp: Extract struct group for memcpy() region

2021-07-27 Thread Kees Cook
On Tue, Jul 27, 2021 at 07:55:46PM -0500, Gustavo A. R. Silva wrote: > On Tue, Jul 27, 2021 at 01:57:52PM -0700, Kees Cook wrote: > > In preparation for FORTIFY_SOURCE performing compile-time and run-time > > field bounds checking for memcpy(), memmove(), and memset(), avoid > > intentionally writi

Re: [PATCH 34/64] fortify: Detect struct member overflows in memcpy() at compile-time

2021-07-27 Thread Kees Cook
On Tue, Jul 27, 2021 at 03:43:27PM -0700, Nick Desaulniers wrote: > On Tue, Jul 27, 2021 at 2:17 PM Kees Cook wrote: > > > > To accelerate the review of potential run-time false positives, it's > > also worth noting that it is possible to partially automate checking > > by examining memcpy() buffe

Re: [PATCH 36/64] scsi: ibmvscsi: Avoid multi-field memset() overflow by aiming at srp

2021-07-27 Thread Martin K. Petersen
Kees, > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memset(), avoid intentionally writing across > neighboring fields. > > Instead of writing beyond the end of evt_struct->iu.srp.cmd, target the > upper union (evt_struct->iu.srp) instead, as

Re: [PATCH 33/64] lib: Introduce CONFIG_TEST_MEMCPY

2021-07-27 Thread Kees Cook
On Tue, Jul 27, 2021 at 04:31:03PM -0700, Bart Van Assche wrote: > On 7/27/21 1:58 PM, Kees Cook wrote: > > +static int __init test_memcpy_init(void) > > +{ > > + int err = 0; > > + > > + err |= test_memcpy(); > > + err |= test_memmove(); > > + err |= test_memset(); > > + > > + if (err) {

Re: [PATCH 12/15] drm/i915/guc/slpc: Cache platform frequency limits

2021-07-27 Thread Belgaumkar, Vinay
On 7/27/2021 9:00 AM, Michal Wajdeczko wrote: On 26.07.2021 21:07, Vinay Belgaumkar wrote: Cache rp0, rp1 and rpn platform limits into SLPC structure for range checking while setting min/max frequencies. Also add "soft" limits which keep track of frequency changes made from userland. These

Re: [PATCH 07/15] drm/i915/guc/slpc: Remove BUG_ON in guc_submission_disable

2021-07-27 Thread Matthew Brost
On Tue, Jul 27, 2021 at 06:01:18PM -0700, Belgaumkar, Vinay wrote: > > > On 7/27/2021 5:20 PM, Matthew Brost wrote: > > On Mon, Jul 26, 2021 at 12:07:52PM -0700, Vinay Belgaumkar wrote: > > > The assumption when it was added was there would be no wakerefs > > > held. However, if we fail to enable

[PATCH v4 13/13] drm/msm/gem: Mark active before pinning

2021-07-27 Thread Rob Clark
From: Rob Clark Mark all the bos in the submit as active, before pinning, to prevent evicting a buffer in the same submit to make room for a buffer earlier in the table. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c| 2 -- drivers/gpu/drm/msm/msm_gem_submit.c | 28 +++

[PATCH v4 12/13] drm/msm: Utilize gpu scheduler priorities

2021-07-27 Thread Rob Clark
From: Rob Clark The drm/scheduler provides additional prioritization on top of that provided by however many number of ringbuffers (each with their own priority level) is supported on a given generation. Expose the additional levels of priority to userspace and map the userspace priority back to

[PATCH v4 08/13] drm/msm: Return ERR_PTR() from submit_create()

2021-07-27 Thread Rob Clark
From: Rob Clark In the next patch, we start having more than a single potential failure reason. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_gem_submit.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/dr

[PATCH v4 11/13] drm/msm: Drop struct_mutex in submit path

2021-07-27 Thread Rob Clark
From: Rob Clark It is sufficient to serialize on the submit queue now. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_gem_submit.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/g

[PATCH v4 09/13] drm/msm: Conversion to drm scheduler

2021-07-27 Thread Rob Clark
From: Rob Clark For existing adrenos, there is one or more ringbuffer, depending on whether preemption is supported. When preemption is supported, each ringbuffer has it's own priority. A submitqueue (which maps to a gl context or vk queue in userspace) is mapped to a specific ring- buffer at c

[PATCH v4 10/13] drm/msm: Drop submit bo_list

2021-07-27 Thread Rob Clark
From: Rob Clark This was only used to detect userspace including the same bo multiple times in a submit. But ww_mutex can already tell us this. When we drop struct_mutex around the submit ioctl, we'd otherwise need to lock the bo before adding it to the bo_list. But since ww_mutex can already

[PATCH v4 07/13] drm/msm: Track "seqno" fences by idr

2021-07-27 Thread Rob Clark
From: Rob Clark Previously the (non-fd) fence returned from submit ioctl was a raw seqno, which is scoped to the ring. But from UABI standpoint, the ioctls related to seqno fences all specify a submitqueue. We can take advantage of that to replace the seqno fences with a cyclic idr handle. Thi

[PATCH v4 06/13] drm/msm: Consolidate submit bo state

2021-07-27 Thread Rob Clark
From: Rob Clark Move all the locked/active/pinned state handling to msm_gem_submit.c. In particular, for drm/scheduler, we'll need to do all this before pushing the submit job to the scheduler. But while we're at it we can get rid of the dupicate pin and refcnt. Signed-off-by: Rob Clark Acked-

[PATCH v4 05/13] drm/msm/submit: Simplify out-fence-fd handling

2021-07-27 Thread Rob Clark
From: Rob Clark No need for this to be split in two parts. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_gem_submit.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm

[PATCH v4 04/13] drm: Drop drm_gem_object_put_locked()

2021-07-27 Thread Rob Clark
From: Rob Clark Now that no one is using it, remove it. Signed-off-by: Rob Clark Acked-by: Christian König Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_gem.c | 22 -- include/drm/drm_gem.h | 2 -- 2 files changed, 24 deletions(-) diff --git a/drivers/gpu/drm/d

[PATCH v4 03/13] drm/msm: drop drm_gem_object_put_locked()

2021-07-27 Thread Rob Clark
From: Rob Clark No idea why we were still using this. It certainly hasn't been needed for some time. So drop the pointless twin codepaths. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 4 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c

[PATCH v4 01/13] drm/msm: Docs and misc cleanup

2021-07-27 Thread Rob Clark
From: Rob Clark Fix a couple incorrect or misspelt comments, and add submitqueue doc comment. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_gem.h | 3 +-- drivers/gpu/drm/msm/msm_gem_submit.c | 1 + drivers/gpu/drm/msm/msm_gpu.h | 15 +++

[PATCH v4 02/13] drm/msm: Small submitqueue creation cleanup

2021-07-27 Thread Rob Clark
From: Rob Clark If we don't have a gpu, there is no need to create a submitqueue, which lets us simplify the error handling and submitqueue creation. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_submitqueue.c | 22 +++--- 1 file changed, 11 in

[PATCH v4 00/13] drm/msm: drm scheduler conversion and cleanups

2021-07-27 Thread Rob Clark
From: Rob Clark Conversion to gpu_scheduler, and bonus removal of drm_gem_object_put_locked() v2: Fix priority mixup (msm UAPI has lower numeric priority value as higher priority, inverse of drm/scheduler) and add some comments in the UAPI header to clarify. Now that we move active

Re: [PATCH 07/15] drm/i915/guc/slpc: Remove BUG_ON in guc_submission_disable

2021-07-27 Thread Belgaumkar, Vinay
On 7/27/2021 5:20 PM, Matthew Brost wrote: On Mon, Jul 26, 2021 at 12:07:52PM -0700, Vinay Belgaumkar wrote: The assumption when it was added was there would be no wakerefs held. However, if we fail to enable SLPC, we will still be holding a wakeref. So this is if intel_guc_slpc_enable() f

Re: [PATCH 01/64] media: omap3isp: Extract struct group for memcpy() region

2021-07-27 Thread Gustavo A. R. Silva
On Tue, Jul 27, 2021 at 01:57:52PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. Wrap the target region > in a common named str

[PATCH 14/14] drm/kmb: Enable support for fbcon (framebuffer console)

2021-07-27 Thread Anitha Chrisanthus
From: Edmund Dea Enable support for fbcon (framebuffer console). The user can initialize fbcon by loading kmb-drm with the parameter console=1. Signed-off-by: Edmund Dea Signed-off-by: Anitha Chrisanthus --- drivers/gpu/drm/kmb/kmb_drv.c | 13 - 1 file changed, 12 insertions(+), 1

[PATCH 11/14] drm/kmb: Prune display modes with CRTC vfp < 4

2021-07-27 Thread Anitha Chrisanthus
From: Edmund Dea Monitors with vfp < 4 are not supported in KMB display. This change prunes display modes with vfp < 4. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Signed-off-by: Edmund Dea --- drivers/gpu/drm/kmb/kmb_crtc.c | 6 ++ drivers/gpu/drm/kmb/kmb_drv.h | 1 +

[PATCH 12/14] drm/kmb: Fix possible oops in error handling

2021-07-27 Thread Anitha Chrisanthus
If kmb_dsi_init() fails the "kmb->kmb_dsi" variable is an error pointer. This can potentially result in kernel panic when kmb_dsi_host_unregister is called. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Fixes: 98521f4d4b4c ("drm/kmb: Mipi DSI part of the display driver") Cc: Dan

[PATCH 13/14] drm/kmb: Enable alpha blended second plane

2021-07-27 Thread Anitha Chrisanthus
From: Edmund Dea Enable one additional plane that is alpha blended on top of the primary plane. Signed-off-by: Edmund Dea --- drivers/gpu/drm/kmb/kmb_drv.c | 8 ++-- drivers/gpu/drm/kmb/kmb_plane.c | 81 + drivers/gpu/drm/kmb/kmb_plane.h | 5 +- drivers/gpu/

[PATCH 10/14] drm/kmb: Enable ADV bridge after modeset

2021-07-27 Thread Anitha Chrisanthus
On KMB, ADV bridge must be programmed and powered on prior to MIPI DSI HW initialization. Fixes: 98521f4d4b4c ("drm/kmb: Mipi DSI part of the display driver") Signed-off-by: Anitha Chrisanthus --- drivers/gpu/drm/kmb/kmb_dsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/k

[PATCH 09/14] drm/kmb : W/A for planar formats

2021-07-27 Thread Anitha Chrisanthus
This is a work around for fully planar formats, where color corruption was observed for formats like YU12, YU16 etc. Set the DMA Vstride and Line width for U and V planes to the same as the Y plane and not the actual pitch. For decoded video frames, continue to use the info from metadata. Fixes: 7

[PATCH 08/14] drm/kmb: Corrected typo in handle_lcd_irq

2021-07-27 Thread Anitha Chrisanthus
Check for Overflow bits for layer3 in the irq handler. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Signed-off-by: Anitha Chrisanthus --- drivers/gpu/drm/kmb/kmb_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/

[PATCH 07/14] drm/kmb: Disable change of plane parameters

2021-07-27 Thread Anitha Chrisanthus
From: Edmund Dea Due to HW limitations, KMB cannot change height, width, or pixel format after initial plane configuration. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Signed-off-by: Edmund Dea --- drivers/gpu/drm/kmb/kmb_crtc.c | 2 ++ drivers/gpu/drm/kmb/kmb_drv.h |

[PATCH 06/14] drm/kmb: Remove clearing DPHY regs

2021-07-27 Thread Anitha Chrisanthus
From: Edmund Dea Don't clear the shared DPHY registers common to MIPI Rx and MIPI Tx during DSI initialization since this was causing MIPI Rx reset. Rest of the writes are bitwise, so do not affect Mipi Rx side. Fixes: 98521f4d4b4c ("drm/kmb: Mipi DSI part of the display driver") Signed-off-by:

[PATCH 05/14] drm/kmb: Limit supported mode to 1080p

2021-07-27 Thread Anitha Chrisanthus
KMB only supports single resolution(1080p), this commit checks for 1920x1080x60 or 1920x1080x59 in crtc_mode_valid. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Signed-off-by: Anitha Chrisanthus --- drivers/gpu/drm/kmb/kmb_crtc.c | 28 drivers/gpu

[PATCH 04/14] drm/kmb : W/A for 256B cache alignment for video

2021-07-27 Thread Anitha Chrisanthus
For B0 silicon, the media driver pads the decoded video dmabufs for 256B alignment. This is the backing buffer of the framebuffer and info in the drm frame buffer is not correct for these buffers as this is done internally in the media driver. This change extracts the meta data info from dmabuf pri

[PATCH 03/14] drm/kmb: Work around for higher system clock

2021-07-27 Thread Anitha Chrisanthus
Use a different value for system clock offset in the ppl/llp ratio calculations for clocks higher than 500 Mhz. Fixes: 98521f4d4b4c ("drm/kmb: Mipi DSI part of the display driver") Signed-off-by: Anitha Chrisanthus --- drivers/gpu/drm/kmb/kmb_dsi.c | 11 ++- 1 file changed, 10 insertions

[PATCH 02/14] drm/kmb: Define driver date and major/minor version

2021-07-27 Thread Anitha Chrisanthus
From: Edmund Dea Added macros for date and version Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Signed-off-by: Edmund Dea --- drivers/gpu/drm/kmb/kmb_drv.c | 8 drivers/gpu/drm/kmb/kmb_drv.h | 5 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/

[PATCH 01/14] drm/kmb: Enable LCD DMA for low TVDDCV

2021-07-27 Thread Anitha Chrisanthus
From: Edmund Dea There's an undocumented dependency between LCD layer enable bits [2-5] and the AXI pipelined read enable bit [28] in the LCD_CONTROL register. The proper order of operation is: 1) Clear AXI pipelined read enable bit 2) Set LCD layers 3) Set AXI pipelined read enable bit With th

Re: [PATCH 07/15] drm/i915/guc/slpc: Remove BUG_ON in guc_submission_disable

2021-07-27 Thread Matthew Brost
On Mon, Jul 26, 2021 at 12:07:52PM -0700, Vinay Belgaumkar wrote: > The assumption when it was added was there would be no wakerefs > held. However, if we fail to enable SLPC, we will still be > holding a wakeref. > So this is if intel_guc_slpc_enable() fails, right? Not seeing where the wakeref

Re: [PATCH 11/15] drm/i915/guc/slpc: Enable ARAT timer interrupt

2021-07-27 Thread Belgaumkar, Vinay
On 7/27/2021 8:40 AM, Matthew Brost wrote: On Mon, Jul 26, 2021 at 12:07:56PM -0700, Vinay Belgaumkar wrote: This interrupt is enabled during RPS initialization, and now needs to be done by SLPC code. It allows ARAT timer expiry interrupts to get forwarded to GuC. Signed-off-by: Vinay Belgau

[PATCH 1/3] drm/amdgpu: create amdgpu_vkms (v4)

2021-07-27 Thread Ryan Taylor
Modify the VKMS driver into an api that dce_virtual can use to create virtual displays that obey drm's atomic modesetting api. v2: Made local functions static. v3: Switched vkms_output kzalloc for kcalloc. Cleanup patches by moving display mode fixes to this patch. v4: Update atomic_check an

[PATCH 2/3] drm/amdgpu: cleanup dce_virtual

2021-07-27 Thread Ryan Taylor
Remove obsolete functions and variables from dce_virtual. Signed-off-by: Ryan Taylor --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 568 +-- 1 file changed, 3 insertions(+), 565 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/

[PATCH 3/3] drm/amdgpu: replace dce_virtual with amdgpu_vkms (v3)

2021-07-27 Thread Ryan Taylor
Move dce_virtual into amdgpu_vkms and update all references to dce_virtual with amdgpu_vkms. v2: Removed more references to dce_virtual. v3: Restored display modes from previous implementation. Reported-by: kernel test robot Suggested-by: Alex Deucher Signed-off-by: Ryan Taylor --- drivers/g

[PATCH 0/3] drm/amdgpu: modernize virtual display feature

2021-07-27 Thread Ryan Taylor
The amdgpu vkms interface provides a virtual KMS interface for several use cases: devices without display hardware, platforms where the actual display hardware is not useful (e.g., servers), SR-IOV virtual functions, device emulation/simulation, and device bring up prior to display hardware being u

Re: [PATCH 10/15] drm/i915/guc/slpc: Add debugfs for SLPC info

2021-07-27 Thread Belgaumkar, Vinay
On 7/27/2021 8:37 AM, Michal Wajdeczko wrote: On 26.07.2021 21:07, Vinay Belgaumkar wrote: This prints out relevant SLPC info from the SLPC shared structure. We will send a h2g message which forces SLPC to update the s/h2g/H2G ok. shared data structure with latest information before

[Bug 213779] Screen stays blank on resume from hibernate

2021-07-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213779 alex14...@yahoo.com changed: What|Removed |Added Summary|Screen stays blank on |Screen stays blank on

Re: [PATCH v2 13/14] drm/mediatek: add ETHDR support for MT8195

2021-07-27 Thread Chun-Kuang Hu
Hi, Nancy: Nancy.Lin 於 2021年7月22日 週四 下午5:46寫道: > > Add ETHDR module files: > ETHDR is designed for HDR video and graphics conversion in the external > display path. It handles multiple HDR input types and performs tone > mapping, color space/color format conversion, and then combines > different

[PATCH] drm/exynos: Always initialize mapping in exynos_drm_register_dma()

2021-07-27 Thread Nathan Chancellor
In certain randconfigs, clang warns: drivers/gpu/drm/exynos/exynos_drm_dma.c:121:19: warning: variable 'mapping' is uninitialized when used here [-Wuninitialized] priv->mapping = mapping; ^~~ drivers/gpu/drm/exynos/exynos_drm_dma.c:111:16: note:

Re: [PATCH 33/64] lib: Introduce CONFIG_TEST_MEMCPY

2021-07-27 Thread Randy Dunlap
On 7/27/21 4:31 PM, Bart Van Assche wrote: > On 7/27/21 1:58 PM, Kees Cook wrote: >> +static int __init test_memcpy_init(void) >> +{ >> +    int err = 0; >> + >> +    err |= test_memcpy(); >> +    err |= test_memmove(); >> +    err |= test_memset(); >> + >> +    if (err) { >> +    pr_warn("FAIL

Re: [Intel-gfx] [PATCH 09/15] drm/i915/guc/slpc: Add get max/min freq hooks

2021-07-27 Thread Belgaumkar, Vinay
On 7/27/2021 8:32 AM, Michal Wajdeczko wrote: On 26.07.2021 21:07, Vinay Belgaumkar wrote: Add helpers to read the min/max frequency being used by SLPC. This is done by send a H2G command which forces SLPC to update the shared data struct which can then be read. These helpers will be used i

Re: [PATCH 03/15] drm/i915/guc/slpc: Gate Host RPS when SLPC is enabled

2021-07-27 Thread Matthew Brost
On Tue, Jul 27, 2021 at 03:48:23PM -0700, Belgaumkar, Vinay wrote: > > > On 7/27/2021 3:44 PM, Matthew Brost wrote: > > On Mon, Jul 26, 2021 at 12:07:48PM -0700, Vinay Belgaumkar wrote: > > > Also ensure uc_init is called before we initialize RPS so that we > > > can check for SLPC support. We do

Re: [PATCH 03/15] drm/i915/guc/slpc: Gate Host RPS when SLPC is enabled

2021-07-27 Thread Belgaumkar, Vinay
On 7/27/2021 3:44 PM, Matthew Brost wrote: On Mon, Jul 26, 2021 at 12:07:48PM -0700, Vinay Belgaumkar wrote: Also ensure uc_init is called before we initialize RPS so that we can check for SLPC support. We do not need to enable up/down interrupts when SLPC is enabled. However, we still need t

Re: [PATCH v3] drm/dp_mst: Fix return code on sideband message failure

2021-07-27 Thread Lyude Paul
Nice timing, you literally got me as I was 2 minutes away from leaving work for the day :P. I will go ahead and push it now. BTW - in the future I recommend using dim to add Fixes: tags as it'll add Cc: to stable as appropriate (this patch in particular should be Cc: sta...@vger.kernel.org # v5.3+

Re: [PATCH 03/15] drm/i915/guc/slpc: Gate Host RPS when SLPC is enabled

2021-07-27 Thread Matthew Brost
On Mon, Jul 26, 2021 at 12:07:48PM -0700, Vinay Belgaumkar wrote: > Also ensure uc_init is called before we initialize RPS so that we > can check for SLPC support. We do not need to enable up/down > interrupts when SLPC is enabled. However, we still need the ARAT > interrupt, which will be enabled

Re: [PATCH v3] drm/dp_mst: Fix return code on sideband message failure

2021-07-27 Thread khsieh
On 2021-07-27 12:21, Lyude Paul wrote: On Thu, 2021-07-22 at 15:28 -0700, khs...@codeaurora.org wrote: It looks like this patch is good to go (mainlined). Anything needed from me to do? Thanks, Do you have access for pushing this patch? If not let me know and I can go ahead and push it to d

Re: [PATCH 00/11] Implement generic prot_guest_has() helper function

2021-07-27 Thread Tom Lendacky
On 7/27/21 5:26 PM, Tom Lendacky wrote: > This patch series provides a generic helper function, prot_guest_has(), > to replace the sme_active(), sev_active(), sev_es_active() and > mem_encrypt_active() functions. > > It is expected that as new protected virtualization technologies are > added to t

Re: [Intel-gfx] [PATCH 08/15] drm/i915/guc/slpc: Add methods to set min/max frequency

2021-07-27 Thread Belgaumkar, Vinay
On 7/27/2021 8:24 AM, Michal Wajdeczko wrote: On 26.07.2021 21:07, Vinay Belgaumkar wrote: Add param set h2g helpers to set the min and max frequencies s/h2g/H2G for use by SLPC. v2: Address review comments (Michal W) v3: Check for positive error code (Michal W) Signed-off-by: Sundare

Re: [PATCH 07/64] staging: rtl8192e: Use struct_group() for memcpy() region

2021-07-27 Thread Larry Finger
On 7/27/21 3:57 PM, Kees Cook wrote: In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring fields. Use struct_group() around members addr1, addr2, and addr3 in struct rtll

[PATCH 11/11] s390/mm: Remove the now unused mem_encrypt_active() function

2021-07-27 Thread Tom Lendacky
The mem_encrypt_active() function has been replaced by prot_guest_has(), so remove the implementation. Since the default implementation of the prot_guest_has() matches the s390 implementation of mem_encrypt_active(), prot_guest_has() does not need to be implemented in s390 (the config option ARCH_H

[PATCH 10/11] powerpc/pseries/svm: Remove the now unused mem_encrypt_active() function

2021-07-27 Thread Tom Lendacky
The mem_encrypt_active() function has been replaced by prot_guest_has(), so remove the implementation. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signed-off-by: Tom Lendacky --- arch/powerpc/include/asm/mem_encrypt.h | 5 - 1 file changed, 5 deletions(-) diff --gi

[PATCH 09/11] x86/sev: Remove the now unused mem_encrypt_active() function

2021-07-27 Thread Tom Lendacky
The mem_encrypt_active() function has been replaced by prot_guest_has(), so remove the implementation. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/mem_encrypt.h | 5 - 1 file changed, 5 deletions(-) diff --git a/arch/x86/in

[PATCH 08/11] mm: Remove the now unused mem_encrypt_active() function

2021-07-27 Thread Tom Lendacky
The mem_encrypt_active() function has been replaced by prot_guest_has(), so remove the implementation. Signed-off-by: Tom Lendacky --- include/linux/mem_encrypt.h | 4 1 file changed, 4 deletions(-) diff --git a/include/linux/mem_encrypt.h b/include/linux/mem_encrypt.h index 5c4a18a91f89..

[PATCH 07/11] treewide: Replace the use of mem_encrypt_active() with prot_guest_has()

2021-07-27 Thread Tom Lendacky
Replace occurrences of mem_encrypt_active() with calls to prot_guest_has() with the PATTR_MEM_ENCRYPT attribute. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxi

[PATCH 06/11] x86/sev: Replace occurrences of sev_es_active() with prot_guest_has()

2021-07-27 Thread Tom Lendacky
Replace occurrences of sev_es_active() with the more generic prot_guest_has() using PATTR_GUEST_PROT_STATE, except for in arch/x86/kernel/sev*.c and arch/x86/mm/mem_encrypt*.c where PATTR_SEV_ES will be used. If future support is added for other memory encyrption techonologies, the use of PATTR_GUE

[PATCH 05/11] x86/sev: Replace occurrences of sev_active() with prot_guest_has()

2021-07-27 Thread Tom Lendacky
Replace occurrences of sev_active() with the more generic prot_guest_has() using PATTR_GUEST_MEM_ENCRYPT, except for in arch/x86/mm/mem_encrypt*.c where PATTR_SEV will be used. If future support is added for other memory encryption technologies, the use of PATTR_GUEST_MEM_ENCRYPT can be updated, as

[PATCH 04/11] x86/sme: Replace occurrences of sme_active() with prot_guest_has()

2021-07-27 Thread Tom Lendacky
Replace occurrences of sme_active() with the more generic prot_guest_has() using PATTR_HOST_MEM_ENCRYPT, except for in arch/x86/mm/mem_encrypt*.c where PATTR_SME will be used. If future support is added for other memory encryption technologies, the use of PATTR_HOST_MEM_ENCRYPT can be updated, as r

[PATCH 03/11] powerpc/pseries/svm: Add a powerpc version of prot_guest_has()

2021-07-27 Thread Tom Lendacky
Introduce a powerpc version of the prot_guest_has() function. This will be used to replace the powerpc mem_encrypt_active() implementation, so the implementation will initially only support the PATTR_MEM_ENCRYPT attribute. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signe

[PATCH 02/11] x86/sev: Add an x86 version of prot_guest_has()

2021-07-27 Thread Tom Lendacky
Introduce an x86 version of the prot_guest_has() function. This will be used in the more generic x86 code to replace vendor specific calls like sev_active(), etc. While the name suggests this is intended mainly for guests, it will also be used for host memory encryption checks in place of sme_acti

[PATCH 01/11] mm: Introduce a function to check for virtualization protection features

2021-07-27 Thread Tom Lendacky
In prep for other protected virtualization technologies, introduce a generic helper function, prot_guest_has(), that can be used to check for specific protection attributes, like memory encryption. This is intended to eliminate having to add multiple technology-specific checks to the code (e.g. if

[PATCH 00/11] Implement generic prot_guest_has() helper function

2021-07-27 Thread Tom Lendacky
This patch series provides a generic helper function, prot_guest_has(), to replace the sme_active(), sev_active(), sev_es_active() and mem_encrypt_active() functions. It is expected that as new protected virtualization technologies are added to the kernel, they can all be covered by a single funct

Re: [PATCH 14/15] drm/i915/guc/slpc: Add SLPC selftest

2021-07-27 Thread Belgaumkar, Vinay
On 7/27/2021 12:16 PM, Matthew Brost wrote: On Mon, Jul 26, 2021 at 12:07:59PM -0700, Vinay Belgaumkar wrote: Tests that exercise the SLPC get/set frequency interfaces. Clamp_max will set max frequency to multiple levels and check that SLPC requests frequency lower than or equal to it. Clam

Re: [PATCH 31/64] fortify: Explicitly disable Clang support

2021-07-27 Thread Kees Cook
On Tue, Jul 27, 2021 at 02:18:58PM -0700, Nathan Chancellor wrote: > On 7/27/2021 1:58 PM, Kees Cook wrote: > > Clang has never correctly compiled the FORTIFY_SOURCE defenses due to > > a couple bugs: > > > > Eliding inlines with matching __builtin_* names > > https://bugs.llvm.org/show_bu

[PATCH 48/64] drbd: Use struct_group() to zero algs

2021-07-27 Thread Kees Cook
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memset(), avoid intentionally writing across neighboring fields. Add a struct_group() for the algs so that memset() can correctly reason about the size. Signed-off-by: Kees Cook --- drivers/block/dr

[PATCH 59/64] fortify: Detect struct member overflows in memset() at compile-time

2021-07-27 Thread Kees Cook
As done for memcpy(), also update memset() to use the same tightened compile-time bounds checking under CONFIG_FORTIFY_SOURCE. Signed-off-by: Kees Cook --- include/linux/fortify-string.h| 54 --- .../write_overflow_field-memset.c | 5 ++ 2 files chang

Re: [PATCH 31/64] fortify: Explicitly disable Clang support

2021-07-27 Thread Nathan Chancellor
On 7/27/2021 1:58 PM, Kees Cook wrote: Clang has never correctly compiled the FORTIFY_SOURCE defenses due to a couple bugs: Eliding inlines with matching __builtin_* names https://bugs.llvm.org/show_bug.cgi?id=50322 Incorrect __builtin_constant_p() of some globals

[PATCH 46/64] IB/mthca: Use memset_after() for clearing mpt_entry

2021-07-27 Thread Kees Cook
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memset(), avoid intentionally writing across neighboring fields. Use memset_after() so memset() doesn't get confused about writing beyond the destination member that is intended to be the starting poin

  1   2   3   4   >