Re: [PATCH] drm/vmwgfx: Re-introduce drm_crtc_helper_funcs::prepare

2024-05-03 Thread Zack Rusin
On Fri, May 3, 2024 at 6:29 PM Ian Forbes wrote: > > This function was removed in the referenced fixes commit and caused a > regression. This is because the presence of this function, even though it > is a noop, changes the behaviour of disable_outputs in > drm_atomic_helper.c:1211. > > Fixes: 7b0

Re: [PATCH 06/23] drm/xe/svm: Introduce a helper to build sg table from hmm range

2024-05-03 Thread Dave Airlie
> Let me know if this understanding is correct. > > Or what would you like to do in such situation? > > > > > Not sure how it is really a good idea. > > > > Adaptive locality of memory is still an unsolved problem in Linux, > > sadly. > > > > > > However, the migration stuff should really not be in

Re: [PATCH v2 2/2] drm/ci: validate drm/msm XML register files against schema

2024-05-03 Thread Abhinav Kumar
On 5/3/2024 5:02 PM, Dmitry Baryshkov wrote: On Sat, 4 May 2024 at 01:38, Abhinav Kumar wrote: On 5/3/2024 1:20 PM, Dmitry Baryshkov wrote: On Fri, 3 May 2024 at 22:42, Abhinav Kumar wrote: On 5/3/2024 11:15 AM, Dmitry Baryshkov wrote: In order to validate drm/msm register definiti

Re: [PATCH v2 2/2] drm/ci: validate drm/msm XML register files against schema

2024-05-03 Thread Dmitry Baryshkov
On Sat, 4 May 2024 at 01:38, Abhinav Kumar wrote: > > > > On 5/3/2024 1:20 PM, Dmitry Baryshkov wrote: > > On Fri, 3 May 2024 at 22:42, Abhinav Kumar > > wrote: > >> > >> > >> > >> On 5/3/2024 11:15 AM, Dmitry Baryshkov wrote: > >>> In order to validate drm/msm register definition files against

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Linus Torvalds
On Fri, 3 May 2024 at 16:39, Al Viro wrote: > > *IF* those files are on purely internal filesystem, that's probably > OK; do that with something on something mountable (char device, > sysfs file, etc.) and you have a problem with filesystem staying > busy. Yeah, I agree, it's a bit annoying in ge

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Linus Torvalds
On Fri, 3 May 2024 at 16:23, Kees Cook wrote: > > static bool __must_check get_dma_buf_unless_doomed(struct dma_buf *dmabuf) > { > return atomic_long_inc_not_zero(&dmabuf->file->f_count) != 0L; > } > > If we end up adding epi_fget(), we'll have 2 cases of using > "atomic_long_inc_not_zero"

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Al Viro
On Fri, May 03, 2024 at 04:16:15PM -0700, Linus Torvalds wrote: > On Fri, 3 May 2024 at 15:07, Al Viro wrote: > > > > Suppose your program calls select() on a pipe and dmabuf, sees data to be > > read > > from pipe, reads it, closes both pipe and dmabuf and exits. > > > > Would you expect that dm

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Kees Cook
On Sat, May 04, 2024 at 12:03:18AM +0100, Al Viro wrote: > On Fri, May 03, 2024 at 03:46:25PM -0700, Kees Cook wrote: > > On Fri, May 03, 2024 at 02:52:38PM -0700, Linus Torvalds wrote: > > > That means that the file will be released - and it means that you have > > > violated all the refcounting r

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Linus Torvalds
On Fri, 3 May 2024 at 15:07, Al Viro wrote: > > Suppose your program calls select() on a pipe and dmabuf, sees data to be read > from pipe, reads it, closes both pipe and dmabuf and exits. > > Would you expect that dmabuf file would stick around for hell knows how long > after that? I would certa

Re: [PATCH] dmabuf: fix dmabuf file poll uaf issue

2024-05-03 Thread T.J. Mercier
On Fri, May 3, 2024 at 6:40 AM Charan Teja Kalla wrote: > > Thanks Christian/TJ for the inputs!! > > On 4/18/2024 12:16 PM, Christian König wrote: > > As far as I can see the EPOLL holds a reference to the files it > > contains. So it is perfectly valid to add the file descriptor to EPOLL > > and

Re: [PATCH] drm: renesas: shmobile: Call drm_helper_force_disable_all() at shutdown time

2024-05-03 Thread Doug Anderson
Hi, On Tue, Dec 5, 2023 at 9:35 AM Doug Anderson wrote: > > Hi, > > On Tue, Dec 5, 2023 at 5:40 AM Laurent Pinchart > wrote: > > > > On Tue, Dec 05, 2023 at 02:31:24PM +0100, Geert Uytterhoeven wrote: > > > On Tue, Dec 5, 2023 at 1:16 PM Laurent Pinchart wrote: > > > > On Tue, Dec 05, 2023 at 12

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Al Viro
On Fri, May 03, 2024 at 03:46:25PM -0700, Kees Cook wrote: > On Fri, May 03, 2024 at 02:52:38PM -0700, Linus Torvalds wrote: > > That means that the file will be released - and it means that you have > > violated all the refcounting rules for poll(). > > I feel like I've been looking at this too l

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Kees Cook
On Fri, May 03, 2024 at 02:52:38PM -0700, Linus Torvalds wrote: > That means that the file will be released - and it means that you have > violated all the refcounting rules for poll(). I feel like I've been looking at this too long. I think I see another problem here, but with dmabuf even when ep

Re: [PATCH v2 2/2] drm/ci: validate drm/msm XML register files against schema

2024-05-03 Thread Abhinav Kumar
On 5/3/2024 1:20 PM, Dmitry Baryshkov wrote: On Fri, 3 May 2024 at 22:42, Abhinav Kumar wrote: On 5/3/2024 11:15 AM, Dmitry Baryshkov wrote: In order to validate drm/msm register definition files against schema, reuse the nodebugfs build step. The validation entry is guarded by the EXPER

[PATCH] drm/vmwgfx: Re-introduce drm_crtc_helper_funcs::prepare

2024-05-03 Thread Ian Forbes
This function was removed in the referenced fixes commit and caused a regression. This is because the presence of this function, even though it is a noop, changes the behaviour of disable_outputs in drm_atomic_helper.c:1211. Fixes: 7b0062036c3b ("drm/vmwgfx: Implement virtual crc generation") Sign

Re: [PATCH v1 10/12] sfc: falcon: Make I2C terminology more inclusive

2024-05-03 Thread Jakub Kicinski
On Tue, 30 Apr 2024 17:38:09 + Easwar Hariharan wrote: > I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" > with more appropriate terms. Inspired by and following on to Wolfram's > series to fix drivers/i2c/[1], fix the terminology for users of > I2C_ALGOBIT bitbangi

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Al Viro
On Fri, May 03, 2024 at 11:01:45PM +0100, Al Viro wrote: > Having ->poll() instance itself grab reference is really asking for problem, > even on the boxen that have CONFIG_EPOLL turned off. select(2) is enough; > it will take care of references grabbed by __pollwait(), but it doesn't > know anyt

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Al Viro
On Fri, May 03, 2024 at 02:52:38PM -0700, Linus Torvalds wrote: > On Fri, 3 May 2024 at 14:45, Al Viro wrote: > > > > How do you get through eventpoll_release_file() while someone > > has entered ep_item_poll()? > > Doesn't matter. > > Look, it's enough that the file count has gone down to zero.

[BUG] drm: zynqmp_dp: Lockup in zynqmp_dp_bridge_detect when device is unbound

2024-05-03 Thread Sean Anderson
Hi, I have discovered a bug in the displayport driver on drm-misc-next. To trigger it, run echo fd4a.display > /sys/bus/platform/drivers/zynqmp-dpsub/unbind The system will become unresponsive and (after a bit) splat with a hard LOCKUP. One core will be unresponsive at the first zynqmp_dp_re

Re: get_file() unsafe under epoll (was Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove)

2024-05-03 Thread Al Viro
On Fri, May 03, 2024 at 02:42:22PM -0700, Linus Torvalds wrote: > On Fri, 3 May 2024 at 14:36, Al Viro wrote: > > > > ... the last part is no-go - poll_wait() must be able to grab a reference > > (well, the callback in it must) > > Yeah. I really think that *poll* itself is doing everything right

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Linus Torvalds
On Fri, 3 May 2024 at 14:45, Al Viro wrote: > > How do you get through eventpoll_release_file() while someone > has entered ep_item_poll()? Doesn't matter. Look, it's enough that the file count has gone down to zero. You may not even have gotten to eventpoll_release_file() yet - the important pa

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Al Viro
On Fri, May 03, 2024 at 02:33:37PM -0700, Linus Torvalds wrote: > Look at the hack in __ep_remove(): if it is concurrent with > eventpoll_release_file(), it will hit this code > > spin_lock(&file->f_lock); > if (epi->dying && !force) { > spin_unlock(&file->f_lock);

Re: get_file() unsafe under epoll (was Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove)

2024-05-03 Thread Linus Torvalds
On Fri, 3 May 2024 at 14:36, Al Viro wrote: > > ... the last part is no-go - poll_wait() must be able to grab a reference > (well, the callback in it must) Yeah. I really think that *poll* itself is doing everything right. It knows that it's called with a file pointer with a reference, and it add

[RFT PATCH v2 48/48] drm/panel: Update TODO list item for cleaning up prepared/enabled tracking

2024-05-03 Thread Douglas Anderson
Now that most panels have been updated not to track/double-check their prepared/enabled state update the TODO with next steps. Signed-off-by: Douglas Anderson --- (no changes since v1) Documentation/gpu/todo.rst | 47 +- 1 file changed, 26 insertions(+), 21

[RFT PATCH v2 47/48] drm/panel: sony-acx565akm: Don't call disable at remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 46/48] drm/panel: sony-acx565akm: Don't double-check enabled state in disable

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 45/48] drm/panel: raydium-rm67191: Don't call unprepare+disable at shutdown

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 44/48] drm/panel: raydium-rm67191: Stop tracking enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 43/48] drm/panel: sitronix-st7703: Don't call disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 42/48] drm/panel: sitronix-st7703: Stop tracking prepared

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 41/48] drm/panel: sharp-ls043t1le01: Don't call disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 40/48] drm/panel: sharp-ls043t1le01: Stop tracking prepared

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 39/48] drm/panel: sharp-lq101r1sx01: Don't call disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 38/48] drm/panel: sharp-lq101r1sx01: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 37/48] drm/panel: seiko-43wvf1g: Don't call disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 36/48] drm/panel: seiko-43wvf1g: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 35/48] drm/panel: panasonic-vvx10f034n00: Don't call disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 34/48] drm/panel: panasonic-vvx10f034n00: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 33/48] drm/panel: jdi-lt070me05000: Don't call disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 32/48] drm/panel: jdi-lt070me05000: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 30/48] drm/panel: xinpeng-xpp055c272: Stop tracking prepared

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 31/48] drm/panel: xinpeng-xpp055c272: Don't call unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 20/48] drm/panel: olimex-lcd-olinuxino: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 29/48] drm/panel: tdo-tl070wsh30: Don't call unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 28/48] drm/panel: tdo-tl070wsh30: Stop tracking prepared

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 19/48] drm/panel: novatek-nt36672a: Don't call unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 26/48] drm/panel: simple: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 27/48] drm/panel: simple: Add a comment about unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 25/48] drm/panel: samsung-atna33xc20: Don't call unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 24/48] drm/panel: samsung-atna33xc20: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 23/48] drm/panel: osd-osd101t2587-53ts: Don't call unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 22/48] drm/panel: osd-osd101t2587-53ts: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 21/48] drm/panel: olimex-lcd-olinuxino: Don't call unprepare+disable at remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 18/48] drm/panel: novatek-nt36672a: Stop tracking prepared

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 17/48] drm/panel: ltk500hd1829: Don't call unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 16/48] drm/panel: ltk500hd1829: Stop tracking prepared

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 15/48] drm/panel: ltk050h3146w: Don't call unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 14/48] drm/panel: ltk050h3146w: Stop tracking prepared

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 13/48] drm/panel: kingdisplay-kd097d04: Don't call unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 12/48] drm/panel: kingdisplay-kd097d04: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 11/48] drm/panel: khadas-ts050: Don't call unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 10/48] drm/panel: khadas-ts050: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 08/48] drm/panel: innolux-p079zca: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 09/48] drm/panel: innolux-p079zca: Don't call unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 07/48] drm/panel: edp: Add a comment about unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 06/48] drm/panel: edp: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 05/48] drm/panel: boe-tv101wum-nl6: Don't call unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 04/48] drm/panel: boe-tv101wum-nl6: Stop tracking prepared

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

Re: get_file() unsafe under epoll (was Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove)

2024-05-03 Thread Al Viro
On Fri, May 03, 2024 at 10:11:09PM +0100, Al Viro wrote: > On Fri, May 03, 2024 at 01:28:37PM -0700, Kees Cook wrote: > > > > Is this the right approach? It still feels to me like get_file() needs > > to happen much earlier... > > I don't believe it needs to happen at all. The problem is not tha

[RFT PATCH v2 03/48] drm/panel: boe-himax8279d: Don't call unprepare+disable at shutdown/remove

2024-05-03 Thread Douglas Anderson
It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset

[RFT PATCH v2 02/48] drm/panel: boe-himax8279d: Stop tracking prepared/enabled

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 01/48] drm/panel: raydium-rm692e5: Stop tracking prepared

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now

[RFT PATCH v2 00/48] drm/panel: Remove most store/double-check of prepared/enabled state

2024-05-03 Thread Douglas Anderson
As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is n

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Linus Torvalds
On Fri, 3 May 2024 at 14:24, Al Viro wrote: > > Can we get to ep_item_poll(epi, ...) after eventpoll_release_file() > got past __ep_remove()? Because if we can, we have a worse problem - > epi freed under us. Look at the hack in __ep_remove(): if it is concurrent with eventpoll_release_file(), i

Re: get_file() unsafe under epoll (was Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove)

2024-05-03 Thread Al Viro
On Fri, May 03, 2024 at 02:24:45PM -0700, Linus Torvalds wrote: > Because even with perfectly normal "->poll()", and even with the > ep_item_poll() happening *before* eventpoll_release_file(), you have > this trivial race: > > ep_item_poll() > ->poll() > > and *between* those two operation

Re: get_file() unsafe under epoll (was Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove)

2024-05-03 Thread Linus Torvalds
On Fri, 3 May 2024 at 14:11, Al Viro wrote: > > What we need is > * promise that ep_item_poll() won't happen after > eventpoll_release_file(). > AFAICS, we do have that. > * ->poll() not playing silly buggers. No. That is not enough at all. Because even with perfectly normal "->

Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Al Viro
On Fri, May 03, 2024 at 02:11:30PM -0700, Linus Torvalds wrote: > epoll is a mess, and does various invalid things in the name of > performance. > > Let's try to rein it in a bit. Something like this, perhaps? > +/* > + * The ffd.file pointer may be in the process of > + * being torn down due to

[PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-03 Thread Linus Torvalds
epoll is a mess, and does various invalid things in the name of performance. Let's try to rein it in a bit. Something like this, perhaps? Not-yet-signed-off-by: Linus Torvalds --- This is entirely untested, thus the "Not-yet-signed-off-by". But I think this may be kind of the right path forwar

Re: [PATCH v2 03/12] drm/i915: Make I2C terminology more inclusive

2024-05-03 Thread Rodrigo Vivi
On Fri, May 03, 2024 at 02:04:15PM -0700, Easwar Hariharan wrote: > On 5/3/2024 12:34 PM, Rodrigo Vivi wrote: > > On Fri, May 03, 2024 at 06:13:24PM +, Easwar Hariharan wrote: > >> I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced > >> "master/slave" > >> with more appropriate term

Re: get_file() unsafe under epoll (was Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove)

2024-05-03 Thread Al Viro
On Fri, May 03, 2024 at 01:28:37PM -0700, Kees Cook wrote: > > Is this the right approach? It still feels to me like get_file() needs > to happen much earlier... I don't believe it needs to happen at all. The problem is not that ->release() can be called during ->poll() - it can't and it doesn't

Re: [PATCH v2 03/12] drm/i915: Make I2C terminology more inclusive

2024-05-03 Thread Easwar Hariharan
On 5/3/2024 12:34 PM, Rodrigo Vivi wrote: > On Fri, May 03, 2024 at 06:13:24PM +, Easwar Hariharan wrote: >> I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" >> with more appropriate terms. Inspired by and following on to Wolfram's >> series to fix drivers/i2c/[1], f

Re: [PATCH] drm/msm/dpu: fix vblank IRQ handling for command panels

2024-05-03 Thread Dmitry Baryshkov
On Fri, May 03, 2024 at 11:18:52AM +0200, Luca Weiss wrote: > On Sun Apr 7, 2024 at 5:15 AM CEST, Dmitry Baryshkov wrote: > > On Sat, 30 Mar 2024 at 18:49, Marijn Suijten > > wrote: > > > > > > On 2024-03-30 05:52:29, Dmitry Baryshkov wrote: > > > > In case of CMD DSI panels, the vblank IRQ can be

Re: [PATCH] drm/msm/gen_header: allow skipping the validation

2024-05-03 Thread Dmitry Baryshkov
On Fri, May 03, 2024 at 09:48:12AM -0700, Nathan Chancellor wrote: > Hi Dmitry, > > On Tue, Apr 09, 2024 at 05:22:54PM +0300, Dmitry Baryshkov wrote: > > We don't need to run the validation of the XML files if we are just > > compiling the kernel. Skip the validation unless the user enables > > co

Re: [PATCH 5/6] drm/panel: novatek-nt36672a: stop calling regulator_set_load manually

2024-05-03 Thread Dmitry Baryshkov
On Fri, May 03, 2024 at 10:03:35AM -0700, Doug Anderson wrote: > Hi, > > On Thu, Apr 4, 2024 at 3:08 AM Dmitry Baryshkov > wrote: > > > > Use .init_load_uA part of the bulk regulator API instead of calling > > register_set_load() manually. > > > > Signed-off-by: Dmitry Baryshkov > > --- > > dri

RE: [PATCH 06/23] drm/xe/svm: Introduce a helper to build sg table from hmm range

2024-05-03 Thread Zeng, Oak
> -Original Message- > From: Jason Gunthorpe > Sent: Friday, May 3, 2024 12:28 PM > To: Zeng, Oak > Cc: Thomas Hellström ; Daniel Vetter > ; dri-devel@lists.freedesktop.org; intel- > x...@lists.freedesktop.org; Brost, Matthew ; > Welty, Brian ; Ghimiray, Himal Prasad > ; Bommu, Krishna

Re: get_file() unsafe under epoll (was Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove)

2024-05-03 Thread Kees Cook
On Fri, May 03, 2024 at 12:59:52PM -0700, Kees Cook wrote: > So, yeah, I can't figure out how eventpoll_release() and epoll_wait() > are expected to behave safely for .poll handlers. > > Regardless, for the simple case: it seems like it's just totally illegal > to use get_file() in a poll handler.

Re: [PATCH v2 0/2] drm/msm/gen_header: allow skipping the validation

2024-05-03 Thread Dmitry Baryshkov
On Fri, 3 May 2024 at 21:15, Dmitry Baryshkov wrote: > > In order to remove pointless messages regarding missing lxml, skip > validation of MSM register files against the schema. Only the driver > developers really care and/or can fix the files. > > Keep the validation enabled during one of DRM CI

Re: [PATCH] fbdev: Have CONFIG_FB_NOTIFY be tristate

2024-05-03 Thread Florian Fainelli
On 5/3/24 12:45, Arnd Bergmann wrote: On Fri, May 3, 2024, at 21:28, Florian Fainelli wrote: Android devices in recovery mode make use of a framebuffer device to provide an user interface. In a GKI configuration that has CONFIG_FB=m, but CONFIG_FB_NOTIFY=y, loading the fb.ko module will fail wit

Re: [PATCH v2 2/2] drm/ci: validate drm/msm XML register files against schema

2024-05-03 Thread Dmitry Baryshkov
On Fri, 3 May 2024 at 22:42, Abhinav Kumar wrote: > > > > On 5/3/2024 11:15 AM, Dmitry Baryshkov wrote: > > In order to validate drm/msm register definition files against schema, > > reuse the nodebugfs build step. The validation entry is guarded by > > the EXPERT Kconfig option and we don't want

Re: [RFC PATCH net-next v8 02/14] net: page_pool: create hooks for custom page providers

2024-05-03 Thread Mina Almasry
Sorry for the late reply. On Wed, May 1, 2024 at 12:55 AM Christoph Hellwig wrote: > > Still NAK to creating aⅺbitrary hooks here. Is the concern still that folks may be able to hook proprietary stuff into this like you mentioned before[1]? I don't see how that can be done as currently written.

Re: get_file() unsafe under epoll (was Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove)

2024-05-03 Thread Kees Cook
On Fri, May 03, 2024 at 01:35:09PM -0600, Jens Axboe wrote: > On 5/3/24 1:22 PM, Kees Cook wrote: > > On Fri, May 03, 2024 at 12:49:11PM -0600, Jens Axboe wrote: > >> On 5/3/24 12:26 PM, Kees Cook wrote: > >>> Thanks for doing this analysis! I suspect at least a start of a fix > >>> would be this:

Re: [PATCH] fbdev: Have CONFIG_FB_NOTIFY be tristate

2024-05-03 Thread Arnd Bergmann
On Fri, May 3, 2024, at 21:28, Florian Fainelli wrote: > Android devices in recovery mode make use of a framebuffer device to > provide an user interface. In a GKI configuration that has CONFIG_FB=m, > but CONFIG_FB_NOTIFY=y, loading the fb.ko module will fail with: > > fb: Unknown symbol fb_notifi

Re: [PATCH v2 2/2] drm/ci: validate drm/msm XML register files against schema

2024-05-03 Thread Abhinav Kumar
On 5/3/2024 11:15 AM, Dmitry Baryshkov wrote: In order to validate drm/msm register definition files against schema, reuse the nodebugfs build step. The validation entry is guarded by the EXPERT Kconfig option and we don't want to enable that option for all the builds. Signed-off-by: Dmitry B

Re: get_file() unsafe under epoll (was Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove)

2024-05-03 Thread Jens Axboe
On 5/3/24 1:22 PM, Kees Cook wrote: > On Fri, May 03, 2024 at 12:49:11PM -0600, Jens Axboe wrote: >> On 5/3/24 12:26 PM, Kees Cook wrote: >>> Thanks for doing this analysis! I suspect at least a start of a fix >>> would be this: >>> >>> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-b

[PATCH] fbdev: Have CONFIG_FB_NOTIFY be tristate

2024-05-03 Thread Florian Fainelli
Android devices in recovery mode make use of a framebuffer device to provide an user interface. In a GKI configuration that has CONFIG_FB=m, but CONFIG_FB_NOTIFY=y, loading the fb.ko module will fail with: fb: Unknown symbol fb_notifier_call_chain (err -2) Have CONFIG_FB_NOTIFY be tristate, just

Re: [PATCH v2 03/12] drm/i915: Make I2C terminology more inclusive

2024-05-03 Thread Rodrigo Vivi
On Fri, May 03, 2024 at 06:13:24PM +, Easwar Hariharan wrote: > I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" > with more appropriate terms. Inspired by and following on to Wolfram's > series to fix drivers/i2c/[1], fix the terminology for users of > I2C_ALGOBIT b

Re: [PATCH v2 1/2] drm/msm/gen_header: allow skipping the validation

2024-05-03 Thread Abhinav Kumar
On 5/3/2024 11:15 AM, Dmitry Baryshkov wrote: We don't need to run the validation of the XML files if we are just compiling the kernel. Skip the validation unless the user enables corresponding Kconfig option. This removes a warning from gen_header.py about lxml being not installed. Reported-

[PATCH v5 10/10] drm: zynqmp_dp: Add debugfs interface for compliance testing

2024-05-03 Thread Sean Anderson
Add a debugfs interface for exercising the various test modes supported by the DisplayPort controller. This allows performing compliance testing, or performing signal integrity measurements on a failing link. At the moment, we do not support sink-driven link quality testing, although such support w

[PATCH v5 09/10] drm: zynqmp_dp: Take dp->lock in zynqmp_dp_hpd_work_func

2024-05-03 Thread Sean Anderson
Add a non-locking version of zynqmp_dp_bridge_detect and use it in zynqmp_dp_hpd_work_func so we can take the lock explicitly. This will make it easier to check for hpd_ignore when we add debugfs support. Signed-off-by: Sean Anderson --- (no changes since v3) Changes in v3: - New drivers/gpu/

[PATCH v5 08/10] drm: zynqmp_dp: Split off several helper functions

2024-05-03 Thread Sean Anderson
In preparation for supporting compliance testing, split off several helper functions. No functional change intended. Signed-off-by: Sean Anderson Reviewed-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen --- (no changes since v1) drivers/gpu/drm/xlnx/zynqmp_dp.c | 49 ++--

  1   2   3   >