Re: [Mesa-dev] [PATCH] RFC: Workaround for pthread_setaffinity_np() seccomp filtering

2019-03-13 Thread Marc-André Lureau
lled then. > ... which is an other argument against just killing. But ok ... > IMO this condition happens sufficiently seldom to accept that. > > Could that solve our problem?? > > best > Mathias > > > > > > Marek > > > > On Tue, Mar 12, 2019, 1:59

Re: [Mesa-dev] [PATCH] RFC: Workaround for pthread_setaffinity_np() seccomp filtering

2019-03-12 Thread Marc-André Lureau
t kill a process. > That 'badly affected' program still can call abort then. > But nicely working programs don't get just killed then!! Returning an error seems less secure that prohibiting it completely. And it may lead to subtle bugs in rarely tested code paths. It's legitimate that QEMU and management layers want to prevent arbitrary code from changing resource allocation etc. There are no easy way I can think of for mesa (and other libraries) to probe the seccomp filters and associated action. So we need a way to tell mesa not to call setaffinity() (and other syscalls). MESA_NO_THREAD_AFFINITY or MESA_NO_SYSCALLS=setaffinity,... seem like a relatively easy way to go. thanks -- Marc-André Lureau ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] RFC: Workaround for pthread_setaffinity_np() seccomp filtering

2019-03-04 Thread Marc-André Lureau
That doesn't work, since the default SIGSYS handler will core dump. Furthermore, qemu will start using SCMP_ACT_KILL_PROCESS, which will kill the entire process immediately. > > On Wed, Feb 27, 2019 at 4:13 PM wrote: > > > > From: Marc-André Lureau > > > > Since

Re: [Mesa-dev] [PATCH] RFC: Workaround for pthread_setaffinity_np() seccomp filtering

2019-02-28 Thread Marc-André Lureau
Hi Eero! (ex-colleagues, long time ago!) On Thu, Feb 28, 2019 at 1:37 PM Eero Tamminen wrote: > > Hi, > > On 28.2.2019 11.57, Marc-André Lureau wrote: > > On Thu, Feb 28, 2019 at 1:17 AM Marek Olšák wrote: > >> I'd rather have something more robust than an env var,

Re: [Mesa-dev] [PATCH] RFC: Workaround for pthread_setaffinity_np() seccomp filtering

2019-02-28 Thread Marc-André Lureau
eccomp, it will default to SCMP_ACT_KILL_PROCESS. In those KILL action cases, mesa will not be able to catch the failing syscalls. > > Marek > > On Wed, Feb 27, 2019 at 6:13 PM wrote: >> >> From: Marc-André Lureau >> >> Since commit d877451b48a59ab0f9a42

Re: [Mesa-dev] [PATCH] virgl/vtest: disconnect on destroy

2017-02-12 Thread Marc-André Lureau
- Original Message - > On 10 February 2017 at 00:35, <marcandre.lur...@redhat.com> wrote: > > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > > > Since vtest is currently only handling a context at a time, calling > > disconnect in virg

Re: [Mesa-dev] [PATCH] gallium/tgsi: fix memory leak in tgsi sanity check

2017-01-23 Thread Marc-André Lureau
Hi - Original Message - > Fix the leak of some ctx fields in error path. > > Signed-off-by: Li Qiang > --- > src/gallium/auxiliary/tgsi/tgsi_sanity.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git

Re: [Mesa-dev] [PATCH] gallium/tgsi: fix oob access in parse instruction

2017-01-23 Thread Marc-André Lureau
Hi - Original Message - > When parsing texture instruction, it doesn't stop if the > 'cur' is ',', the loop variable 'i' will also be increased > and be used to index the 'inst.TexOffsets' array. This can lead > an oob access issue. This patch avoid this. > > Signed-off-by: Li Qiang

Re: [Mesa-dev] [PATCHv2 0/9] drisw/glx: use XShm if possible

2016-10-22 Thread Marc-André Lureau
Hi Pierre, On Fri, Apr 1, 2016 at 1:23 PM Pierre Ossman <oss...@cendio.se> wrote: > On Mon, 15 Jun 2015 15:34:06 +0200 > marcandre.lureau at gmail.com (Marc-André Lureau) wrote: > > > Hi, > > > > XPutImage/XGetImage requires to copy the images around, and

Re: [Mesa-dev] [PATCH] virgl: fix flushing while removing sampler views

2016-09-23 Thread Marc-André Lureau
Hi On Sat, Sep 24, 2016 at 12:00 AM Dave Airlie <airl...@gmail.com> wrote: > On 14 September 2016 at 04:00, <marcandre.lur...@redhat.com> wrote: > > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > > > When updating the sampler views, virgl

Re: [Mesa-dev] virglrenderer regression in commit ad4f0f1941677c

2016-08-01 Thread Marc-André Lureau
Hi - Original Message - > On Fri, Jul 29, 2016 at 3:57 PM, Rob Herring wrote: > > Hi, > > > > This commit in virglrenderer causes a regression in Android for me. > > The parameters that get passed in are last_level = 8, width = 1. I'm > > not really sure if this is

[Mesa-dev] [PATCH] virgl: fix checking fences

2016-06-07 Thread Marc-André Lureau
with vtest though there is a similar fix) Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- src/gallium/winsys/virgl/drm/virgl_drm_winsys.c | 2 +- src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [Mesa-dev] [PATCH] virtio_gpu: Add virtio 1.0 PCI ID to driver map

2016-02-24 Thread Marc-André Lureau
Hi On Mon, Feb 22, 2016 at 8:06 PM, Emil Velikov <emil.l.veli...@gmail.com> wrote: > Hi Marc, > > On 12 February 2016 at 21:11, Marc-André Lureau > <marcandre.lur...@redhat.com> wrote: >> From: Marc-André Lureau <marcandre.lur...@gmail.com> >> &

[Mesa-dev] [PATCH] virtio_gpu: Add virtio 1.0 PCI ID to driver map

2016-02-12 Thread Marc-André Lureau
From: Marc-André Lureau <marcandre.lur...@gmail.com> Add the virtio-gpu PCI ID for virtio 1.0 (according to the specification, "the PCI Device ID is calculated by adding 0x1040 to the Virtio Device ID") Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>

Re: [Mesa-dev] [PATCHv2 6/9] gallium: rename DRM_API_HANDLE_TYPE* WINSYS_HANDLE_TYPE*

2015-06-16 Thread Marc-André Lureau
are used simultaneously, so a common structure seems necessary. thanks -- Marc-André Lureau ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] Fwd: [PATCHv2 6/9] gallium: rename DRM_API_HANDLE_TYPE* WINSYS_HANDLE_TYPE*

2015-06-16 Thread Marc-André Lureau
Hi On Tue, Jun 16, 2015 at 3:33 PM, Marek Olšák mar...@gmail.com wrote: On Tue, Jun 16, 2015 at 2:42 PM, Marc-André Lureau marcandre.lur...@gmail.com wrote: Hi Marek On Mon, Jun 15, 2015 at 10:21 PM, Marek Olšák mar...@gmail.com wrote: The idea of drm_driver.h and the DRM prefix

[Mesa-dev] [PATCHv2 4/9] drisw/glx: use XShm if possible

2015-06-15 Thread Marc-André Lureau
Implements putImageShm from DRIswrastLoaderExtension. If XShm extension is not available, or fails, it will fallback on regular XPutImage(). Tested on Linux only with 16bpp and 32bpp visual. --- src/glx/drisw_glx.c | 165 +++ src/glx/drisw_priv.h

[Mesa-dev] [PATCHv2 1/9] dri: add putImageShm and getImageShm to swrastLoader

2015-06-15 Thread Marc-André Lureau
Add new APIa to put and get an image using shared memory. Instead of only passing the data pointer, 3 arguments are given: the shmid, the data offset and the shmaddr. Bump interface version. --- include/GL/internal/dri_interface.h | 18 +- 1 file changed, 17 insertions(+), 1

[Mesa-dev] [PATCHv2 7/9] drisw: learn to query shmid handle type

2015-06-15 Thread Marc-André Lureau
--- src/gallium/include/state_tracker/drisw_api.h | 1 + src/gallium/include/state_tracker/sw_winsys.h | 3 +-- src/gallium/include/state_tracker/winsys_handle.h | 1 + src/gallium/winsys/sw/dri/dri_sw_winsys.c | 10 +- 4 files changed, 12 insertions(+), 3 deletions(-)

[Mesa-dev] [PATCHv2 2/9] drisw: use putImageShm if available

2015-06-15 Thread Marc-André Lureau
If the DRIswrastLoaderExtension implements putImageShm, bind it to drisw_loader_funcs. --- src/gallium/include/state_tracker/drisw_api.h | 3 +++ src/gallium/state_trackers/dri/drisw.c| 37 +-- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git

[Mesa-dev] [PATCHv2 5/9] gallium: move winsys_handle to its own header

2015-06-15 Thread Marc-André Lureau
The structure is shared in drm driver and sw_winsys headers, moving it to a common place to have a common definition. --- src/gallium/include/state_tracker/drm_driver.h| 32 +- src/gallium/include/state_tracker/winsys_handle.h | 41 +++ 2 files changed, 42

[Mesa-dev] [PATCHv2 8/9] drisw: use getImageShm() if available

2015-06-15 Thread Marc-André Lureau
--- src/gallium/state_trackers/dri/drisw.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/dri/drisw.c b/src/gallium/state_trackers/dri/drisw.c index 75c8e85e..2ebb112 100644 --- a/src/gallium/state_trackers/dri/drisw.c +++

[Mesa-dev] [PATCHv2 0/9] drisw/glx: use XShm if possible

2015-06-15 Thread Marc-André Lureau
with it - add getImageShm() Marc-André Lureau (9): dri: add putImageShm and getImageShm to swrastLoader drisw: use putImageShm if available drisw: use shared memory when possible drisw/glx: use XShm if possible gallium: move winsys_handle to its own header gallium: rename

[Mesa-dev] [PATCHv2 9/9] drisw/glx: implement getImageShm

2015-06-15 Thread Marc-André Lureau
--- src/glx/drisw_glx.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index f27e1f4..d80c396 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -305,6 +305,32 @@ swrastGetImage(__DRIdrawable * read,

[Mesa-dev] [PATCHv2 3/9] drisw: use shared memory when possible

2015-06-15 Thread Marc-André Lureau
If drisw_loader_funcs implements put_image_shm, allocates display target data with shared memory and display with put_image_shm(). --- src/gallium/winsys/sw/dri/dri_sw_winsys.c | 72 +-- 1 file changed, 60 insertions(+), 12 deletions(-) diff --git

[Mesa-dev] [PATCHv2 6/9] gallium: rename DRM_API_HANDLE_TYPE* WINSYS_HANDLE_TYPE*

2015-06-15 Thread Marc-André Lureau
The DRM prefix seems unnecessary as other kind of handle could be used. --- src/gallium/auxiliary/vl/vl_winsys_dri.c | 2 +- src/gallium/drivers/freedreno/freedreno_screen.c | 12 ++-- src/gallium/drivers/nouveau/nouveau_screen.c | 12 ++--

Re: [Mesa-dev] [PATCHv2 1/9] dri: add putImageShm and getImageShm to swrastLoader

2015-06-15 Thread Marc-André Lureau
/x11 to 2. We could to make it more explicit, but to me this is not necessary as the structure is cleared, the iface pointers are null. thanks for the comment though -- Marc-André Lureau ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

Re: [Mesa-dev] [PATCH 0/4] drisw/glx: use XShm if possible

2015-06-11 Thread Marc-André Lureau
use guidance to design such an interface. Perhaps doing this on wayland swrast would help defining it though. regards -- Marc-André Lureau ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 4/4] drisw/glx: use XShm if possible

2015-06-10 Thread Marc-André Lureau
Implements putImageShm from DRIswrastLoaderExtension. If XShm extension is not available, or fails, it will fallback on regular XPutImage(). Tested on Linux only with 16bpp and 32bpp visual. --- src/glx/drisw_glx.c | 164 +++ src/glx/drisw_priv.h

[Mesa-dev] [PATCH 1/4] dri: add putImageShm to swrastLoader

2015-06-10 Thread Marc-André Lureau
Add a new API to put an image using shared memory. Instead of only passing the data pointer, 3 arguments are given: the shmid, the data offset and the shmaddr. Bump interface version. --- include/GL/internal/dri_interface.h | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff

[Mesa-dev] [PATCH 3/4] drisw: use shared memory when possible

2015-06-10 Thread Marc-André Lureau
If drisw_loader_funcs implements put_image_shm, allocates display target data with shared memory and display with put_image_shm(). --- src/gallium/winsys/sw/dri/dri_sw_winsys.c | 72 +-- 1 file changed, 60 insertions(+), 12 deletions(-) diff --git

[Mesa-dev] [PATCH 0/4] drisw/glx: use XShm if possible

2015-06-10 Thread Marc-André Lureau
and fixed with 16bpp visuals - split patch for easier review Marc-André Lureau (4): dri: add putImageShm to swrastLoader drisw: use putImageShm if available drisw: use shared memory when possible drisw/glx: use XShm if possible include/GL/internal/dri_interface.h | 12 +- src

[Mesa-dev] [PATCH 2/4] drisw: use putImageShm if available

2015-06-10 Thread Marc-André Lureau
If the DRIswrastLoaderExtension implements putImageShm, bind it to drisw_loader_funcs. --- src/gallium/include/state_tracker/drisw_api.h | 3 +++ src/gallium/state_trackers/dri/drisw.c| 37 +-- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 4/4] drisw/glx: use XShm if possible

2015-06-10 Thread Marc-André Lureau
. thanks -- Marc-André Lureau ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] RFC: drisw/glx: use XShm if possible

2015-06-08 Thread Marc-André Lureau
; - }; struct drisw_screen @@ -62,6 +66,7 @@ struct drisw_drawable __DRIdrawable *driDrawable; XVisualInfo *visinfo; XImage *ximage; + XShmSegmentInfo shminfo; }; _X_HIDDEN int -- Marc-André Lureau ___ mesa-dev mailing list mesa-dev

Re: [Mesa-dev] [PATCH] RFC: drisw/glx: use XShm if possible

2015-06-08 Thread Marc-André Lureau
Hi Adam, Thanks for the feedback On Mon, Jun 8, 2015 at 5:12 PM, Adam Jackson a...@redhat.com wrote: On Fri, 2015-06-05 at 19:14 +0200, Marc-André Lureau wrote: XPutImage requires to copy the images around, and the request may be split over several chunks. Using XShm may improve

[Mesa-dev] [PATCH] RFC: drisw/glx: use XShm if possible

2015-06-05 Thread Marc-André Lureau
XPutImage requires to copy the images around, and the request may be split over several chunks. Using XShm may improve performance. In particular, the performances are bad when using gnome-shell with Spice and playing video. Chunking the update confuses the video detection heuristic:

[Mesa-dev] [PATCH] egl: more define fixes for EGL_MESA_image_dma_buf_export

2015-05-11 Thread Marc-André Lureau
s/EGL_MESA_dma_buf_image_export/EGL_MESA_image_dma_buf_export as defined by the spec --- src/egl/main/eglapi.c | 2 +- src/egl/main/eglfallbacks.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index ba1d0dd..6d2b51d

[Mesa-dev] [PATCH] egl: misc fixes for EGL_MESA_image_dma_buf_export

2015-04-28 Thread Marc-André Lureau
Fix define and a function argument name introduced in commit 8f7338f284cdb1fef64c85e3293d2200d0cc6387 --- src/egl/main/eglapi.c | 2 +- src/egl/main/eglapi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index ea2ee73..8b7b9be

Re: [Mesa-dev] [PATCH] [RFC] egl: propose simple EGL_MESA_image_dma_buf_export v2.4

2015-04-01 Thread Marc-André Lureau
, +.getCapabilities= NULL }; static int -- 2.3.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev -- Marc-André Lureau ___ mesa

[Mesa-dev] [PATCH] gallium/auxiliary/indices: fix start param

2015-02-27 Thread Marc-André Lureau
Since commit 28f3f8d, indices generator take a start parameter. However, some index values have been left to start at 0. This fixes the glean/fbo test with the virgl driver. --- src/gallium/auxiliary/indices/u_indices_gen.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff