[PATCH v2 3/4] dix: Silence -Wunused-variable warning by moving window.c off of legacy region defines

2015-10-19 Thread Jeremy Huddleston Sequoia
window.c:223:15: warning: unused variable 'pScreen' [-Wunused-variable,Unused 
Entity Issue]
ScreenPtr pScreen = pWin->drawable.pScreen;
  ^

Signed-off-by: Jeremy Huddleston Sequoia 
---
 dix/window.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/dix/window.c b/dix/window.c
index d57f320..69b5a7c 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -220,7 +220,6 @@ log_window_info(WindowPtr pWin, int depth)
 int i;
 const char *win_name, *visibility;
 BoxPtr rects;
-ScreenPtr pScreen = pWin->drawable.pScreen;
 
 for (i = 0; i < (depth << 2); i++)
 ErrorF(" ");
@@ -240,7 +239,7 @@ log_window_info(WindowPtr pWin, int depth)
 ErrorF(" (%s compositing: pixmap %x)",
(pWin->redirectDraw == RedirectDrawAutomatic) ?
"automatic" : "manual",
-   (unsigned) pScreen->GetWindowPixmap(pWin)->drawable.id);
+   (unsigned) 
pWin->drawable.pScreen->GetWindowPixmap(pWin)->drawable.id);
 #endif
 
 switch (pWin->visibility) {
@@ -259,10 +258,10 @@ log_window_info(WindowPtr pWin, int depth)
 }
 ErrorF(", %s", visibility);
 
-if (REGION_NOTEMPTY(pScreen, >clipList)) {
+if (RegionNotEmpty(>clipList)) {
 ErrorF(", clip list:");
-rects = REGION_RECTS(>clipList);
-for (i = 0; i < REGION_NUM_RECTS(>clipList); i++)
+rects = RegionRects(>clipList);
+for (i = 0; i < RegionNumRects(>clipList); i++)
 ErrorF(" [(%d, %d) to (%d, %d)]",
rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2);
 ErrorF("; extents [(%d, %d) to (%d, %d)]",
-- 
2.6.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH v2 2/4] glx: Fix header length error checking in __glXDisp_RenderLarge

2015-10-19 Thread Jeremy Huddleston Sequoia
glxcmds.c:2206:46: warning: comparison of unsigned expression < 0 is always 
false [-Wtautological-compare,Semantic
Issue]
if ((cmdlen = safe_pad(hdr->length)) < 0)
 ^ ~

Signed-off-by: Jeremy Huddleston Sequoia 
---
 glx/glxcmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index cbd4ede..0416dac 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -2182,7 +2182,7 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
 __GLXrenderSizeData entry;
 int extra = 0;
 int left = (req->length << 2) - sz_xGLXRenderLargeReq;
-size_t cmdlen;
+int cmdlen;
 int err;
 
 /*
-- 
2.6.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH v2 4/4] osinit: Silence -Wunused-variable warnings

2015-10-19 Thread Jeremy Huddleston Sequoia
osinit.c:161:24: warning: unused variable 'devnull' [-Wunused-variable,Unused 
Entity Issue]
static const char *devnull = "/dev/null";
   ^
osinit.c:162:10: warning: unused variable 'fname' [-Wunused-variable,Unused 
Entity Issue]
char fname[PATH_MAX];
 ^

Signed-off-by: Jeremy Huddleston Sequoia 
---
 os/osinit.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/os/osinit.c b/os/osinit.c
index ddd3fce..6ec2f11 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -158,8 +158,10 @@ void
 OsInit(void)
 {
 static Bool been_here = FALSE;
+#ifndef XQUARTZ
 static const char *devnull = "/dev/null";
 char fname[PATH_MAX];
+#endif
 
 if (!been_here) {
 #if !defined(WIN32) || defined(__CYGWIN__)
-- 
2.6.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH v2 1/4] randr: Silence -Wshift-negative-value warnings

2015-10-19 Thread Jeremy Huddleston Sequoia
rrtransform.c:199:23: warning: shifting a negative signed value is undefined 
[-Wshift-negative-value,Semantic Issue]
rot_cos = F(-1);
  ^
rrtransform.c:114:14: note: expanded from macro 'F'
^~
../render/picture.h:200:24: note: expanded from macro 'IntToxFixed'
^~
/opt/X11/include/pixman-1/pixman.h:130:56: note: expanded from macro 
'pixman_int_to_fixed'
   ~~~ ^

Signed-off-by: Jeremy Huddleston Sequoia 
---
 randr/rrtransform.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/randr/rrtransform.c b/randr/rrtransform.c
index 26b0649..d32b43a 100644
--- a/randr/rrtransform.c
+++ b/randr/rrtransform.c
@@ -196,7 +196,7 @@ RRTransformCompute(int x,
 f_rot_sin = 0;
 f_rot_dx = width;
 f_rot_dy = height;
-rot_cos = F(-1);
+rot_cos = F(~0u);
 rot_sin = F(0);
 rot_dx = F(width);
 rot_dy = F(height);
@@ -207,7 +207,7 @@ RRTransformCompute(int x,
 f_rot_dx = 0;
 f_rot_dy = width;
 rot_cos = F(0);
-rot_sin = F(-1);
+rot_sin = F(~0u);
 rot_dx = F(0);
 rot_dy = F(width);
 break;
@@ -230,7 +230,7 @@ RRTransformCompute(int x,
 scale_dy = 0;
 if (rotation & RR_Reflect_X) {
 f_scale_x = -1;
-scale_x = F(-1);
+scale_x = F(~0u);
 if (rotation & (RR_Rotate_0 | RR_Rotate_180)) {
 f_scale_dx = width;
 scale_dx = F(width);
@@ -242,7 +242,7 @@ RRTransformCompute(int x,
 }
 if (rotation & RR_Reflect_Y) {
 f_scale_y = -1;
-scale_y = F(-1);
+scale_y = F(~0u);
 if (rotation & (RR_Rotate_0 | RR_Rotate_180)) {
 f_scale_dy = height;
 scale_dy = F(height);
-- 
2.6.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH v2 4/4] osinit: Silence -Wunused-variable warnings

2015-10-19 Thread Jeremy Huddleston Sequoia
Actually, only this last one is "v2".

The others I just still need a Reviewed-by: for, but they're unchanged from 
earlier.  Sorry for any confusion.

> On Oct 18, 2015, at 23:12, Jeremy Huddleston Sequoia  
> wrote:
> 
> osinit.c:161:24: warning: unused variable 'devnull' [-Wunused-variable,Unused 
> Entity Issue]
>static const char *devnull = "/dev/null";
>   ^
> osinit.c:162:10: warning: unused variable 'fname' [-Wunused-variable,Unused 
> Entity Issue]
>char fname[PATH_MAX];
> ^
> 
> Signed-off-by: Jeremy Huddleston Sequoia 
> ---
> os/osinit.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/os/osinit.c b/os/osinit.c
> index ddd3fce..6ec2f11 100644
> --- a/os/osinit.c
> +++ b/os/osinit.c
> @@ -158,8 +158,10 @@ void
> OsInit(void)
> {
> static Bool been_here = FALSE;
> +#ifndef XQUARTZ
> static const char *devnull = "/dev/null";
> char fname[PATH_MAX];
> +#endif
> 
> if (!been_here) {
> #if !defined(WIN32) || defined(__CYGWIN__)
> -- 
> 2.6.1
> 



smime.p7s
Description: S/MIME cryptographic signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH 2/2] xorg-wrapper: fix build without libdrm

2015-10-19 Thread Samuel Thibault
Signed-off-by: Samuel Thibault 
---
 configure.ac  | 2 --
 hw/xfree86/xorg-wrapper.c | 6 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7db7187..220478a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -926,8 +926,6 @@ fi
 AM_CONDITIONAL(SYSTEMD_LOGIND, [test "x$SYSTEMD_LOGIND" = xyes])
 
 if test "x$SUID_WRAPPER" = xyes; then
-dnl The wrapper uses libdrm headers, so ensure they are available
-PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
 dnl This is a define so that if some platforms want to put the wrapper
 dnl somewhere else this can be easily changed
 AC_DEFINE_DIR(SUID_WRAPPER_DIR, libexecdir, [Where to install the Xorg 
binary and Xorg.wrap])
diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
index 22e97ad..75d120a 100644
--- a/hw/xfree86/xorg-wrapper.c
+++ b/hw/xfree86/xorg-wrapper.c
@@ -39,8 +39,10 @@
 #include 
 #endif
 #include 
+#ifdef WITH_LIBDRM
 #include 
 #include  /* For DRM_DEV_NAME */
+#endif
 
 #define CONFIG_FILE SYSCONFDIR "/X11/Xwrapper.config"
 
@@ -183,7 +185,9 @@ static int on_console(int fd)
 
 int main(int argc, char *argv[])
 {
+#ifdef WITH_LIBDRM
 struct drm_mode_card_res res;
+#endif
 char buf[PATH_MAX];
 int i, r, fd;
 int kms_cards = 0;
@@ -219,6 +223,7 @@ int main(int argc, char *argv[])
 }
 }
 
+#ifdef WITH_LIBDRM
 /* Detect if we need root rights, except when overriden by the config */
 if (needs_root_rights == -1) {
 for (i = 0; i < 16; i++) {
@@ -237,6 +242,7 @@ int main(int argc, char *argv[])
 close(fd);
 }
 }
+#endif
 
 /* If we've found cards, and all cards support kms, drop root rights */
 if (needs_root_rights == 0 || (total_cards && kms_cards == total_cards)) {
-- 
2.6.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] xorg-wrapper: when starting the server as root, reset its environment

2015-10-19 Thread Julien Cristau
On Mon, Oct 19, 2015 at 10:43:45 +0200, Hans de Goede wrote:

> Hi,
> 
> On 18-10-15 19:26, Julien Cristau wrote:
> >When the server is privileged, we shouldn't be passing the user's
> >environment directly.
> >
> >Signed-off-by: Julien Cristau 
> 
> I've no real objections against this, and I can see this being a good
> thing from a security pov, but I'm afraid this may cause regressions.
> 
> Before we had the wrapper the server itself used to be suid-root,
> and none of the code for dealing with that has been removed (the server
> can still be build that way). So I would expect the server to sanitize
> its environment itself...
> 
> So I've 2 questions:
> 
> 1) Is there any concrete reason why this is necessary ?

Enabling logind support means pulling in libdbus, which I didn't want to
do without addressing
https://bugs.freedesktop.org/show_bug.cgi?id=52202
https://bugs.freedesktop.org/show_bug.cgi?id=83849

Cheers,
Julien
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xorg-wrapper: fix build without libdrm

2015-10-19 Thread Samuel Thibault
Mark Kettenis, le Mon 19 Oct 2015 12:26:27 +0200, a écrit :
> > If you're doing this with certain platforms in mind, maybe
> > we need to only not check for libdrm on those platforms ?
> 
> Does it make sense at all to use the wrapper on platforms without drm?

We need some setuid wrapper, yes, and we'd like to be able to configure
whether all users can run it, or only users which are loggued on the
console.

Samuel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xorg-wrapper: fix build without libdrm

2015-10-19 Thread Hans de Goede

Hi,

On 19-10-15 14:00, Samuel Thibault wrote:

Mark Kettenis, le Mon 19 Oct 2015 12:26:27 +0200, a écrit :

If you're doing this with certain platforms in mind, maybe
we need to only not check for libdrm on those platforms ?


Does it make sense at all to use the wrapper on platforms without drm?


We need some setuid wrapper, yes, and we'd like to be able to configure
whether all users can run it, or only users which are loggued on the
console.


We == hurd developers / users here, right ?

I'm not against taking a patch to make this work for you, I'm just
not convinced that unconditionally dropping the libdrm check is a good
idea. I agree that most people who need the wrapper should always be
building with libdrm anyways, but I would like to keep enforcing that.

To me hurd is the exception here. So maybe change the patch to drop
the configure libdrm check for hurd ? If that is done I'm fine with the
#ifdef LIBDRM in the wrapper itself.

Regards,

Hans
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] xorg-wrapper: when starting the server as root, reset its environment

2015-10-19 Thread Hans de Goede

Hi,

On 19-10-15 12:57, Julien Cristau wrote:

On Mon, Oct 19, 2015 at 10:43:45 +0200, Hans de Goede wrote:


Hi,

On 18-10-15 19:26, Julien Cristau wrote:

When the server is privileged, we shouldn't be passing the user's
environment directly.

Signed-off-by: Julien Cristau 


I've no real objections against this, and I can see this being a good
thing from a security pov, but I'm afraid this may cause regressions.

Before we had the wrapper the server itself used to be suid-root,
and none of the code for dealing with that has been removed (the server
can still be build that way). So I would expect the server to sanitize
its environment itself...

So I've 2 questions:

1) Is there any concrete reason why this is necessary ?


Enabling logind support means pulling in libdbus, which I didn't want to
do without addressing
https://bugs.freedesktop.org/show_bug.cgi?id=52202
https://bugs.freedesktop.org/show_bug.cgi?id=83849


Ok, that is a very valid reason, can you do a v2 with these bug links .
this rationale added to the commit message ?

I'm still a bit worried there may be some fallout, but I believe the
above reasons are strong enough to just go for it and see if it breaks
anything.

Regards,

Hans
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xorg-wrapper: fix build without libdrm

2015-10-19 Thread Samuel Thibault
Hans de Goede, le Mon 19 Oct 2015 14:40:46 +0200, a écrit :
> To me hurd is the exception here. So maybe change the patch to drop
> the configure libdrm check for hurd ?

Like is done for cygwin and darwin? Sure.

> If that is done I'm fine with the #ifdef LIBDRM in the wrapper itself.

I have pushed that to my tree on 

git+ssh://people.freedesktop.org/~sthibaul/xserver-hurd.git

branch master-wrapper-nodrm

and will resubmit here.

Samuel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH 1/2] hurd: disable detecting drm

2015-10-19 Thread Samuel Thibault
Signed-off-by: Samuel Thibault 
---
 configure.ac | 5 +
 1 file changed, 5 insertions(+)

diff --git a/configure.ac b/configure.ac
index e434720..7db7187 100644
--- a/configure.ac
+++ b/configure.ac
@@ -752,6 +752,11 @@ case $host_os in
XF86VIDMODE=no
fi
;;
+   gnu*)
+   DRM=no
+   DRI2=no
+   DRI3=no
+   ;;
*) XQUARTZ=no ;;
 esac
 
-- 
2.6.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xorg-wrapper: fix build without libdrm

2015-10-19 Thread Hans de Goede

Hi,

On 19-10-15 10:53, Samuel Thibault wrote:

Hans de Goede, le Mon 19 Oct 2015 10:44:30 +0200, a écrit :

@@ -237,6 +242,7 @@ int main(int argc, char *argv[])
  close(fd);
  }
  }
+#endif



This turns needs_root_rights=auto into needs_root_rights=yes do we really want 
that
when not building with libdrm ?


When not building with libdrm we can't detect if it needs root rights.


Right, but I'm not sure that means that just running as root then is the right
thing. I agree it will ensure that everything just works, but from a security
pov it just feels wrong.

In which case would you want to build without libdrm anyways ? Can you
explain the use-case for this patch ?

Regards,

Hans
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xorg-wrapper: fix build without libdrm

2015-10-19 Thread Samuel Thibault
Hans de Goede, le Mon 19 Oct 2015 10:56:26 +0200, a écrit :
> In which case would you want to build without libdrm anyways ? Can you
> explain the use-case for this patch ?

Systems with no drm support, simply :)

Samuel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] xorg-wrapper: when starting the server as root, reset its environment

2015-10-19 Thread Hans de Goede

Hi,

On 18-10-15 19:26, Julien Cristau wrote:

When the server is privileged, we shouldn't be passing the user's
environment directly.

Signed-off-by: Julien Cristau 


I've no real objections against this, and I can see this being a good
thing from a security pov, but I'm afraid this may cause regressions.

Before we had the wrapper the server itself used to be suid-root,
and none of the code for dealing with that has been removed (the server
can still be build that way). So I would expect the server to sanitize
its environment itself...

So I've 2 questions:

1) Is there any concrete reason why this is necessary ?
2) Does anyone know of any use-cases this may break ?

Regards,

Hans




---
  hw/xfree86/xorg-wrapper.c | 6 +-
  1 file changed, 5 insertions(+), 1 deletion(-)

It's possible some variables should be passed, in which case we could
use a whitelist; in my testing this patch seemed to work, though.

diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
index 22e97ad..d6efb23 100644
--- a/hw/xfree86/xorg-wrapper.c
+++ b/hw/xfree86/xorg-wrapper.c
@@ -190,6 +190,7 @@ int main(int argc, char *argv[])
  int total_cards = 0;
  int allowed = CONSOLE_ONLY;
  int needs_root_rights = -1;
+char *const envp[1] = { NULL, };

  progname = argv[0];

@@ -265,7 +266,10 @@ int main(int argc, char *argv[])
  }

  argv[0] = buf;
-(void) execv(argv[0], argv);
+if (getuid() == geteuid())
+(void) execv(argv[0], argv);
+else
+(void) execve(argv[0], argv, envp);
  fprintf(stderr, "%s: Failed to execute %s: %s\n",
  progname, buf, strerror(errno));
  exit(1);


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xorg-wrapper: fix build without libdrm

2015-10-19 Thread Hans de Goede

Hi,

On 18-10-15 18:48, Samuel Thibault wrote:

Signed-off-by: Samuel Thibault 
---
  configure.ac  | 2 --
  hw/xfree86/xorg-wrapper.c | 6 ++
  2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index e434720..818026f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -921,8 +921,6 @@ fi
  AM_CONDITIONAL(SYSTEMD_LOGIND, [test "x$SYSTEMD_LOGIND" = xyes])

  if test "x$SUID_WRAPPER" = xyes; then
-dnl The wrapper uses libdrm headers, so ensure they are available
-PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
  dnl This is a define so that if some platforms want to put the wrapper
  dnl somewhere else this can be easily changed
  AC_DEFINE_DIR(SUID_WRAPPER_DIR, libexecdir, [Where to install the 
Xorg binary and Xorg.wrap])
diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
index 22e97ad..75d120a 100644
--- a/hw/xfree86/xorg-wrapper.c
+++ b/hw/xfree86/xorg-wrapper.c
@@ -39,8 +39,10 @@
  #include 
  #endif
  #include 
+#ifdef WITH_LIBDRM
  #include 
  #include  /* For DRM_DEV_NAME */
+#endif

  #define CONFIG_FILE SYSCONFDIR "/X11/Xwrapper.config"

@@ -183,7 +185,9 @@ static int on_console(int fd)

  int main(int argc, char *argv[])
  {
+#ifdef WITH_LIBDRM
  struct drm_mode_card_res res;
+#endif
  char buf[PATH_MAX];
  int i, r, fd;
  int kms_cards = 0;
@@ -219,6 +223,7 @@ int main(int argc, char *argv[])
  }
  }

+#ifdef WITH_LIBDRM
  /* Detect if we need root rights, except when overriden by the config */
  if (needs_root_rights == -1) {
  for (i = 0; i < 16; i++) {
@@ -237,6 +242,7 @@ int main(int argc, char *argv[])
  close(fd);
  }
  }
+#endif



This turns needs_root_rights=auto into needs_root_rights=yes do we really want 
that
when not building with libdrm ?

Regards,

Hans
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xorg-wrapper: fix build without libdrm

2015-10-19 Thread Samuel Thibault
Hans de Goede, le Mon 19 Oct 2015 10:56:26 +0200, a écrit :
> On 19-10-15 10:53, Samuel Thibault wrote:
> >Hans de Goede, le Mon 19 Oct 2015 10:44:30 +0200, a écrit :
> >>>@@ -237,6 +242,7 @@ int main(int argc, char *argv[])
> >>>  close(fd);
> >>>  }
> >>>  }
> >>>+#endif
> >>>
> >>
> >>This turns needs_root_rights=auto into needs_root_rights=yes do we really 
> >>want that
> >>when not building with libdrm ?
> >
> >When not building with libdrm we can't detect if it needs root rights.
> 
> Right, but I'm not sure that means that just running as root then is the right
> thing. I agree it will ensure that everything just works, but from a security
> pov it just feels wrong.

Well, when building without libdrm (and thus without kms), execution
without root will just not work at all.

Samuel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xorg-wrapper: fix build without libdrm

2015-10-19 Thread Hans de Goede

Hi,

On 19-10-15 11:03, Samuel Thibault wrote:

Hans de Goede, le Mon 19 Oct 2015 10:56:26 +0200, a écrit :

In which case would you want to build without libdrm anyways ? Can you
explain the use-case for this patch ?


Systems with no drm support, simply :)


Actually I do not think it is that simple, e.g. IIRC the openbsd
people have their own solution for non requiring root rights.

Also with your patch people may accidentally end up build the
root-wrapper on Linux without libdrm resulting in a root-wrapper
which will just always launch the xserver as root.

If you're doing this with certain platforms in mind, maybe
we need to only not check for libdrm on those platforms ?

Regards,

Hans
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xorg-wrapper: fix build without libdrm

2015-10-19 Thread Samuel Thibault
Samuel Thibault, le Mon 19 Oct 2015 11:25:08 +0200, a écrit :
> Hans de Goede, le Mon 19 Oct 2015 11:14:21 +0200, a écrit :
> > On 19-10-15 11:03, Samuel Thibault wrote:
> > >Hans de Goede, le Mon 19 Oct 2015 10:56:26 +0200, a écrit :
> > >>In which case would you want to build without libdrm anyways ? Can you
> > >>explain the use-case for this patch ?
> > >
> > >Systems with no drm support, simply :)
> > 
> > Actually I do not think it is that simple, e.g. IIRC the openbsd
> > people have their own solution for non requiring root rights.
> 
> I don't see where this happens on the xorg wrapper.

Ah, but I guess they just don't use the xorg wrapper then.

Samuel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xorg-wrapper: fix build without libdrm

2015-10-19 Thread Samuel Thibault
Hans de Goede, le Mon 19 Oct 2015 10:44:30 +0200, a écrit :
> >@@ -237,6 +242,7 @@ int main(int argc, char *argv[])
> >  close(fd);
> >  }
> >  }
> >+#endif
> >
> 
> This turns needs_root_rights=auto into needs_root_rights=yes do we really 
> want that
> when not building with libdrm ?

When not building with libdrm we can't detect if it needs root rights.
AIUI XORG_DRIVER_MODESETTING is only enabled when building with drm,
which needs libdrm.

Samuel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xorg-wrapper: fix build without libdrm

2015-10-19 Thread Samuel Thibault
Hans de Goede, le Mon 19 Oct 2015 11:14:21 +0200, a écrit :
> On 19-10-15 11:03, Samuel Thibault wrote:
> >Hans de Goede, le Mon 19 Oct 2015 10:56:26 +0200, a écrit :
> >>In which case would you want to build without libdrm anyways ? Can you
> >>explain the use-case for this patch ?
> >
> >Systems with no drm support, simply :)
> 
> Actually I do not think it is that simple, e.g. IIRC the openbsd
> people have their own solution for non requiring root rights.

I don't see where this happens on the xorg wrapper.

> Also with your patch people may accidentally end up build the
> root-wrapper on Linux without libdrm resulting in a root-wrapper
> which will just always launch the xserver as root.

Which will be needed anyway if they want to see the X server working at
all on Linux.

> If you're doing this with certain platforms in mind, maybe
> we need to only not check for libdrm on those platforms ?

You mean hardcoding the set of such platforms inside xorg-wrapper.c?

Well, that'd be at least cygwin (though the wrapper is probably useless
there), darwin, hurd.

Samuel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver v2] xorg-wrapper: when starting the server as root, reset its environment

2015-10-19 Thread Hans de Goede

Hi,

On 19-10-15 15:42, Julien Cristau wrote:

When the server is privileged, we shouldn't be passing the user's
environment directly.

Clearing the environment is recommended by the libdbus maintainers, see
https://bugs.freedesktop.org/show_bug.cgi?id=52202

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83849
Signed-off-by: Julien Cristau 


Looks good to me:

Reviewed-by: Hans de Goede 

Adam, can you pick this one up please ?

Regards,

Hans




v2: rename envp to empty_envp (Jeremy)
---
  hw/xfree86/xorg-wrapper.c | 6 +-
  1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
index 22e97ad..f2c7c2b 100644
--- a/hw/xfree86/xorg-wrapper.c
+++ b/hw/xfree86/xorg-wrapper.c
@@ -190,6 +190,7 @@ int main(int argc, char *argv[])
  int total_cards = 0;
  int allowed = CONSOLE_ONLY;
  int needs_root_rights = -1;
+char *const empty_envp[1] = { NULL, };

  progname = argv[0];

@@ -265,7 +266,10 @@ int main(int argc, char *argv[])
  }

  argv[0] = buf;
-(void) execv(argv[0], argv);
+if (getuid() == geteuid())
+(void) execv(argv[0], argv);
+else
+(void) execve(argv[0], argv, empty_envp);
  fprintf(stderr, "%s: Failed to execute %s: %s\n",
  progname, buf, strerror(errno));
  exit(1);


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver v2] xorg-wrapper: when starting the server as root, reset its environment

2015-10-19 Thread Julien Cristau
When the server is privileged, we shouldn't be passing the user's
environment directly.

Clearing the environment is recommended by the libdbus maintainers, see
https://bugs.freedesktop.org/show_bug.cgi?id=52202

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83849
Signed-off-by: Julien Cristau 

v2: rename envp to empty_envp (Jeremy)
---
 hw/xfree86/xorg-wrapper.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
index 22e97ad..f2c7c2b 100644
--- a/hw/xfree86/xorg-wrapper.c
+++ b/hw/xfree86/xorg-wrapper.c
@@ -190,6 +190,7 @@ int main(int argc, char *argv[])
 int total_cards = 0;
 int allowed = CONSOLE_ONLY;
 int needs_root_rights = -1;
+char *const empty_envp[1] = { NULL, };
 
 progname = argv[0];
 
@@ -265,7 +266,10 @@ int main(int argc, char *argv[])
 }
 
 argv[0] = buf;
-(void) execv(argv[0], argv);
+if (getuid() == geteuid())
+(void) execv(argv[0], argv);
+else
+(void) execve(argv[0], argv, empty_envp);
 fprintf(stderr, "%s: Failed to execute %s: %s\n",
 progname, buf, strerror(errno));
 exit(1);
-- 
2.6.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Backport fix for exposing core and ES contexts on Xwayland to the next stable release

2015-10-19 Thread Emmanuel Gil Peyrot
Hello,

The current stable Xorg server release, 1.17.2, doesn’t support the
creation of a core profile OpenGL context, or of a GLES context, only
exposing compatibility profiles instead (so 3.0 on Mesa, see [1]).

This is a request to cherry-pick commit 2d719433 [2] from master to the
next 1.17 branch release.

Tested-by: Emmanuel Gil Peyrot 

[1] https://bugs.freedesktop.org/show_bug.cgi?id=92218
[2] http://cgit.freedesktop.org/xorg/xserver/commit/?id=2d719433

Thanks,

-- 
Emmanuel Gil Peyrot
Collabora Ltd.
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH 1/2] hurd: disable detecting drm

2015-10-19 Thread Hans de Goede

Hi,

On 19-10-15 14:47, Samuel Thibault wrote:

Signed-off-by: Samuel Thibault 


OK, re-checking the LIBDRM deps this should work, so this series is:

Reviewed-by: Hans de Goede 

Adam, can you pick these 2 up ?

Regards,

Hans



---
  configure.ac | 5 +
  1 file changed, 5 insertions(+)

diff --git a/configure.ac b/configure.ac
index e434720..7db7187 100644
--- a/configure.ac
+++ b/configure.ac
@@ -752,6 +752,11 @@ case $host_os in
XF86VIDMODE=no
fi
;;
+   gnu*)
+   DRM=no
+   DRI2=no
+   DRI3=no
+   ;;
*) XQUARTZ=no ;;
  esac



___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xquartz 04/10] randr: Silence -Wshift-negative-value warnings

2015-10-19 Thread Adam Jackson
On Wed, 2015-10-14 at 15:44 -0700, Jeremy Huddleston Sequoia wrote:
> > On Oct 14, 2015, at 15:33, Alan Coopersmith  wrote:
> > 
> > On 10/14/15 03:13 PM, Jeremy Huddleston Sequoia wrote:
> > > rrtransform.c:199:23: warning: shifting a negative signed value
> > > is undefined [-Wshift-negative-value,Semantic Issue]
> > > rot_cos = F(-1);
> > 
> > 
> > > -rot_cos = F(-1);
> > > +rot_cos = F(~0u);
> > 
> > Is -1 guaranteed to be ~0u on all platforms?   Or just all the ones
> > we know and care about?
> 
> I'm pretty certain that ~0u and -1 are the same bit patterns on all
> platforms.  I can't think of a reason why they wouldn't be.

On a ones' complement machine, (uint8_t)-1 is 0b1110.  On a signed-
magnitude machine, (uint8_t)-1 is 0b1001.  But I think you're
significantly more likely to encounter a PDP-endian machine than a non-
two's-complement machine at this point, and there's plenty of other
places in xserver where we're assuming two's complement, e.g.:

fb/fb.h:#define FB_ALLONES  ((FbBits) -1)

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH v2 4/4] osinit: Silence -Wunused-variable warnings

2015-10-19 Thread Adam Jackson
On Sun, 2015-10-18 at 23:14 -0700, Jeremy Huddleston Sequoia wrote:
> Actually, only this last one is "v2".
> 
> The others I just still need a Reviewed-by: for, but they're
> unchanged from earlier.  Sorry for any confusion.

These last four all look fine.  I've added my r-b to those, and merged 
all ten:

remote: I: patch #61890 updated using rev 
610dd8a58a75bb6a5b7d7abbae476d1cc4be519e.
remote: I: patch #61889 updated using rev 
9f0fcd14b52f8481cbb3b3b9c6e06f64ff003cc8.
remote: I: patch #61888 updated using rev 
85eb90ea45e89033b97bf71a13c5c70fec8f6871.
remote: I: patch #61892 updated using rev 
aa73d587fece225753d8e6b8773a9c8b85823bd9.
remote: I: patch #61887 updated using rev 
a7a00e4bd8153e0386c7e58d6b30a7a96f15fdb0.
remote: I: patch #61894 updated using rev 
9a2a05a9a7ba02921fa29844c4cad41243c41326.
remote: I: patch #61886 updated using rev 
5dc415048e4091b18cd7d123ebeae8f95ed5a4f5.
remote: I: patch #61895 updated using rev 
e09875701b980b8c4578fb310a922c9934c34eef.
remote: I: patch #61891 updated using rev 
0a5d54f721de7e3ab3b6f4b080190a92bbe3429b.
remote: I: patch #62177 updated using rev 
ec6294116cc41ff1c3be081b626952fb7e614244.
remote: I: 10 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   4513f92..ec62941  master -> master

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xquartz 04/10] randr: Silence -Wshift-negative-value warnings

2015-10-19 Thread Jeremy Huddleston Sequoia

> On Oct 19, 2015, at 08:31, Adam Jackson  wrote:
> 
> On Wed, 2015-10-14 at 15:44 -0700, Jeremy Huddleston Sequoia wrote:
>>> On Oct 14, 2015, at 15:33, Alan Coopersmith  wrote:
>>> 
>>> On 10/14/15 03:13 PM, Jeremy Huddleston Sequoia wrote:
 rrtransform.c:199:23: warning: shifting a negative signed value
 is undefined [-Wshift-negative-value,Semantic Issue]
 rot_cos = F(-1);
>>> 
>>> 
 -rot_cos = F(-1);
 +rot_cos = F(~0u);
>>> 
>>> Is -1 guaranteed to be ~0u on all platforms?   Or just all the ones
>>> we know and care about?
>> 
>> I'm pretty certain that ~0u and -1 are the same bit patterns on all
>> platforms.  I can't think of a reason why they wouldn't be.
> 
> On a ones' complement machine, (uint8_t)-1 is 0b1110.  On a signed-
> magnitude machine, (uint8_t)-1 is 0b1001.  But I think you're
> significantly more likely to encounter a PDP-endian machine than a non-
> two's-complement machine at this point, and there's plenty of other
> places in xserver where we're assuming two's complement, e.g.:
> 
> fb/fb.h:#define FB_ALLONES  ((FbBits) -1)

True.  I should have been explicit that I was talking about two's complement 
platforms when I said "all".  I just can't imagine anyone actually trying to 
support anything other than two's complement.  That would be insanely crazy.

smime.p7s
Description: S/MIME cryptographic signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: X server commit process

2015-10-19 Thread Adam Jackson
On Fri, 2015-10-16 at 23:39 -0700, Keith Packard wrote:
> Jeremy Huddleston Sequoia  writes:
> 
> > What is the current process for pulling into release branches?  Are
> > the breakdowns the same, or is someone specific going to manage
> > release branches?
> 
> We didn't discuss making any changes, and I think we can probably leave
> that up to the branch managers if they want to try a multi-person commit
> cabal like master has?

For 1.17.x I'm happy to have Eric/Alan/Peter/Keith push too, and for
that matter I'd pretty much trust any platform maintainer within their
code, though with the usual "get it in master then cherry-pick" caveat;
would prefer it, in fact, since I don't really have win32/osx/bsd handy
to test.

I don't think there's anyone currently working on 1.16 or older.

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PULL] XQuartz -- Fix launching with ASan

2015-10-19 Thread Jeremy Huddleston Sequoia
Hey ajax,

Thanks for merging the warning fixes I sent.  I was actually going to just roll 
them into this pull-request once they were reviewed, but now it's just down to 
two XQuartz changes.

Thanks,
Jeremy


The following changes since commit ec6294116cc41ff1c3be081b626952fb7e614244:

  osinit: Silence -Wunused-variable warnings (2015-10-19 11:52:05 -0400)

are available in the git repository at:

  git://people.freedesktop.org/~jeremyhu/xserver 

for you to fetch changes up to 27ad21254f257bac6c647315d749ee69f20c24e0:

  XQuartz: Cleanup formatting of DarwinEQInit that was butchered by automation 
a few years ago (2015-10-19 09:06:22 -0700)


Jeremy Huddleston Sequoia (2):
  XQuartz: Make sure that darwin_all_modifier_mask_additions is 0-terminated
  XQuartz: Cleanup formatting of DarwinEQInit that was butchered by 
automation a few years ago

 hw/xquartz/darwinEvents.c | 11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH 1/2] hurd: disable detecting drm

2015-10-19 Thread Adam Jackson
On Mon, 2015-10-19 at 15:03 +0200, Hans de Goede wrote:
> Hi,
> 
> On 19-10-15 14:47, Samuel Thibault wrote:
> > Signed-off-by: Samuel Thibault 
> 
> OK, re-checking the LIBDRM deps this should work, so this series is:
> 
> Reviewed-by: Hans de Goede 
> 
> Adam, can you pick these 2 up ?

Merged:

remote: Updating patchwork state for 
http://patchwork.freedesktop.org/project/Xorg/list/
remote: I: patch #62193 updated using rev 
a4cd8ee5f8e8de776c7f764656770311cdbde0d2.
remote: I: patch #62155 updated using rev 
08c4912406b965bbac0a3a52413c374a073c051b.
remote: I: 2 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   ec62941..08c4912  master -> master

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 01/24] fonts: Continue when font calls return Suspended more than once

2015-10-19 Thread Adam Jackson
On Mon, 2015-09-21 at 07:16 +0100, Keith Packard wrote:
> Patch 3ab6cd31cbdf8095b2948034fce5fb645422d8da fixed Xinerama
> interactions with font servers by not putting clients to sleep
> multiple times. However, it introduced additional changes dealing with
> libXfont routine returning Suspended more than once for the same
> request. This additional change was to abandon processing of the
> current request and free the closure data by jumping to
> 'xinerama_sleep' in each of the functions.

Merged:

remote: I: patch #59294 updated using rev 
f9a04d19aef77bf787b8d322305a6971d24a6ba1.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   5b582a4..f9a04d1  master -> master

The rest of this series will have to wait until after 1.18 due to API
changes (with the possible exception of the animcur change, but I'm not
sure that's valuable enough on its own to bother).

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH:libX11] Get rid of some extraneous ; at the end of C source lines

2015-10-19 Thread Adam Jackson
On Tue, 2015-09-29 at 00:26 +0200, Thomas Klausner wrote:
> Reviewed-by: Thomas Klausner 

Merged:

remote: I: patch #60532 updated using rev 
dbcb847a08c44d99e4e1de2ba777d63238fb0e03.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/lib/libX11
   121a1ba..dbcb847  master -> master

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH libXi] Don't use raw serial numbers in XIEvents

2015-10-19 Thread Peter Hutterer
On Mon, Oct 19, 2015 at 04:28:12PM -0700, Jasper St. Pierre wrote:
> On Sun, Oct 18, 2015 at 7:59 PM, Peter Hutterer
>  wrote:
> > cookie->serial is an Xlib contoction, provided by _XSetLastRequestRead(). 
> > This
> 
> I assume this is meant to read "in->sequenceNumber is an Xlib
> concoction"? Otherwise, it doesn't make sense.

no, in->serialNumber is the raw 16-bit serial number on the wire.
cookie->serial something that's cooked up inside Xlib and a combination of
last_request_read and the raw serialNumber.

the rest of Xlib uses that cooked up number (e.g. core X events), the XI2
events stick out because they use the raw serial number, which may be
different.

Cheers,
   Peter

> > serial may be different to the raw serial number from the wire protocol.
> > This causes issues when the raw serial is used to e.g. compare the event to
> > other non-XI events.
> >
> > Use the cookie's serial number instead.
> >
> > https://bugzilla.gnome.org/show_bug.cgi?id=756649
> >
> > See also https://bugs.freedesktop.org/show_bug.cgi?id=64687
> >
> > Signed-off-by: Peter Hutterer 
> > ---
> >  src/XExtInt.c | 16 
> >  1 file changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/src/XExtInt.c b/src/XExtInt.c
> > index 672d69a..a35fcc6 100644
> > --- a/src/XExtInt.c
> > +++ b/src/XExtInt.c
> > @@ -1521,7 +1521,7 @@ wireToDeviceEvent(xXIDeviceEvent *in, 
> > XGenericEventCookie* cookie)
> >  out = next_block(_lib, sizeof(XIDeviceEvent));
> >  out->display = cookie->display;
> >  out->type = in->type;
> > -out->serial = in->sequenceNumber;
> > +out->serial = cookie->serial;
> >  out->extension = in->extension;
> >  out->evtype = in->evtype;
> >  out->send_event = ((in->type & 0x80) != 0);
> > @@ -1794,7 +1794,7 @@ wireToDeviceChangedEvent(xXIDeviceChangedEvent *in, 
> > XGenericEventCookie *cookie)
> >  cookie->data = out = malloc(sizeof(XIDeviceChangedEvent) + len);
> >
> >  out->type = in->type;
> > -out->serial = in->sequenceNumber;
> > +out->serial = cookie->serial;
> >  out->display = cookie->display;
> >  out->extension = in->extension;
> >  out->evtype = in->evtype;
> > @@ -1827,7 +1827,7 @@ wireToHierarchyChangedEvent(xXIHierarchyEvent *in, 
> > XGenericEventCookie *cookie)
> >  out->info   = (XIHierarchyInfo*)[1];
> >  out->display= cookie->display;
> >  out->type   = in->type;
> > -out->serial = in->sequenceNumber;
> > +out->serial = cookie->serial;
> >  out->extension  = in->extension;
> >  out->evtype = in->evtype;
> >  out->send_event = ((in->type & 0x80) != 0);
> > @@ -1868,7 +1868,7 @@ wireToRawEvent(XExtDisplayInfo *info, xXIRawEvent 
> > *in, XGenericEventCookie *cook
> >
> >  out = next_block(, sizeof(XIRawEvent));
> >  out->type   = in->type;
> > -out->serial = in->sequenceNumber;
> > +out->serial = cookie->serial;
> >  out->display= cookie->display;
> >  out->extension  = in->extension;
> >  out->evtype = in->evtype;
> > @@ -1919,7 +1919,7 @@ wireToEnterLeave(xXIEnterEvent *in, 
> > XGenericEventCookie *cookie)
> >  out->buttons.mask = (unsigned char*)[1];
> >
> >  out->type   = in->type;
> > -out->serial = in->sequenceNumber;
> > +out->serial = cookie->serial;
> >  out->display= cookie->display;
> >  out->extension  = in->extension;
> >  out->evtype = in->evtype;
> > @@ -1962,7 +1962,7 @@ wireToPropertyEvent(xXIPropertyEvent *in, 
> > XGenericEventCookie *cookie)
> >  cookie->data = out;
> >
> >  out->type   = in->type;
> > -out->serial = in->sequenceNumber;
> > +out->serial = cookie->serial;
> >  out->extension  = in->extension;
> >  out->evtype = in->evtype;
> >  out->send_event = ((in->type & 0x80) != 0);
> > @@ -1983,7 +1983,7 @@ wireToTouchOwnershipEvent(xXITouchOwnershipEvent *in,
> >  cookie->data = out;
> >
> >  out->type   = in->type;
> > -out->serial = in->sequenceNumber;
> > +out->serial = cookie->serial;
> >  out->display= cookie->display;
> >  out->extension  = in->extension;
> >  out->evtype = in->evtype;
> > @@ -2011,7 +2011,7 @@ wireToBarrierEvent(xXIBarrierEvent *in, 
> > XGenericEventCookie *cookie)
> >
> >  out->display= cookie->display;
> >  out->type   = in->type;
> > -out->serial = in->sequenceNumber;
> > +out->serial = cookie->serial;
> >  out->extension  = in->extension;
> >  out->evtype = in->evtype;
> >  out->send_event = ((in->type & 0x80) != 0);
> > --
> > 2.4.3
> >
> > ___
> > xorg-devel@lists.x.org: X.Org development
> > Archives: http://lists.x.org/archives/xorg-devel
> > Info: 

Re: [PATCH libXi] Don't use raw serial numbers in XIEvents

2015-10-19 Thread Jasper St. Pierre
On Sun, Oct 18, 2015 at 7:59 PM, Peter Hutterer
 wrote:
> cookie->serial is an Xlib contoction, provided by _XSetLastRequestRead(). This

I assume this is meant to read "in->sequenceNumber is an Xlib
concoction"? Otherwise, it doesn't make sense.

> serial may be different to the raw serial number from the wire protocol.
> This causes issues when the raw serial is used to e.g. compare the event to
> other non-XI events.
>
> Use the cookie's serial number instead.
>
> https://bugzilla.gnome.org/show_bug.cgi?id=756649
>
> See also https://bugs.freedesktop.org/show_bug.cgi?id=64687
>
> Signed-off-by: Peter Hutterer 
> ---
>  src/XExtInt.c | 16 
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/src/XExtInt.c b/src/XExtInt.c
> index 672d69a..a35fcc6 100644
> --- a/src/XExtInt.c
> +++ b/src/XExtInt.c
> @@ -1521,7 +1521,7 @@ wireToDeviceEvent(xXIDeviceEvent *in, 
> XGenericEventCookie* cookie)
>  out = next_block(_lib, sizeof(XIDeviceEvent));
>  out->display = cookie->display;
>  out->type = in->type;
> -out->serial = in->sequenceNumber;
> +out->serial = cookie->serial;
>  out->extension = in->extension;
>  out->evtype = in->evtype;
>  out->send_event = ((in->type & 0x80) != 0);
> @@ -1794,7 +1794,7 @@ wireToDeviceChangedEvent(xXIDeviceChangedEvent *in, 
> XGenericEventCookie *cookie)
>  cookie->data = out = malloc(sizeof(XIDeviceChangedEvent) + len);
>
>  out->type = in->type;
> -out->serial = in->sequenceNumber;
> +out->serial = cookie->serial;
>  out->display = cookie->display;
>  out->extension = in->extension;
>  out->evtype = in->evtype;
> @@ -1827,7 +1827,7 @@ wireToHierarchyChangedEvent(xXIHierarchyEvent *in, 
> XGenericEventCookie *cookie)
>  out->info   = (XIHierarchyInfo*)[1];
>  out->display= cookie->display;
>  out->type   = in->type;
> -out->serial = in->sequenceNumber;
> +out->serial = cookie->serial;
>  out->extension  = in->extension;
>  out->evtype = in->evtype;
>  out->send_event = ((in->type & 0x80) != 0);
> @@ -1868,7 +1868,7 @@ wireToRawEvent(XExtDisplayInfo *info, xXIRawEvent *in, 
> XGenericEventCookie *cook
>
>  out = next_block(, sizeof(XIRawEvent));
>  out->type   = in->type;
> -out->serial = in->sequenceNumber;
> +out->serial = cookie->serial;
>  out->display= cookie->display;
>  out->extension  = in->extension;
>  out->evtype = in->evtype;
> @@ -1919,7 +1919,7 @@ wireToEnterLeave(xXIEnterEvent *in, XGenericEventCookie 
> *cookie)
>  out->buttons.mask = (unsigned char*)[1];
>
>  out->type   = in->type;
> -out->serial = in->sequenceNumber;
> +out->serial = cookie->serial;
>  out->display= cookie->display;
>  out->extension  = in->extension;
>  out->evtype = in->evtype;
> @@ -1962,7 +1962,7 @@ wireToPropertyEvent(xXIPropertyEvent *in, 
> XGenericEventCookie *cookie)
>  cookie->data = out;
>
>  out->type   = in->type;
> -out->serial = in->sequenceNumber;
> +out->serial = cookie->serial;
>  out->extension  = in->extension;
>  out->evtype = in->evtype;
>  out->send_event = ((in->type & 0x80) != 0);
> @@ -1983,7 +1983,7 @@ wireToTouchOwnershipEvent(xXITouchOwnershipEvent *in,
>  cookie->data = out;
>
>  out->type   = in->type;
> -out->serial = in->sequenceNumber;
> +out->serial = cookie->serial;
>  out->display= cookie->display;
>  out->extension  = in->extension;
>  out->evtype = in->evtype;
> @@ -2011,7 +2011,7 @@ wireToBarrierEvent(xXIBarrierEvent *in, 
> XGenericEventCookie *cookie)
>
>  out->display= cookie->display;
>  out->type   = in->type;
> -out->serial = in->sequenceNumber;
> +out->serial = cookie->serial;
>  out->extension  = in->extension;
>  out->evtype = in->evtype;
>  out->send_event = ((in->type & 0x80) != 0);
> --
> 2.4.3
>
> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel



-- 
  Jasper
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: X server commit process

2015-10-19 Thread Jeremy Huddleston Sequoia

> On Oct 19, 2015, at 08:56, Julien Cristau  wrote:
> 
> On Mon, Oct 19, 2015 at 11:47:09 -0400, Adam Jackson wrote:
> 
>> I don't think there's anyone currently working on 1.16 or older.
>> 
> I'm still interested in 1.16 as that's what Debian 8 ships, but at this
> point I guess it's going to be mostly CVE fixes, if anything.

I just shipped XQuartz 2.7.8 based on 1.16.4, but that will likely be the last 
1.16 based release I do.

--Jeremy



smime.p7s
Description: S/MIME cryptographic signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver v2] xorg-wrapper: when starting the server as root, reset its environment

2015-10-19 Thread Adam Jackson
On Mon, 2015-10-19 at 16:01 +0200, Hans de Goede wrote:
> Hi,
> 
> On 19-10-15 15:42, Julien Cristau wrote:
> > When the server is privileged, we shouldn't be passing the user's
> > environment directly.
> > 
> > Clearing the environment is recommended by the libdbus maintainers,
> > see
> > https://bugs.freedesktop.org/show_bug.cgi?id=52202
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83849
> > Signed-off-by: Julien Cristau 
> 
> Looks good to me:
> 
> Reviewed-by: Hans de Goede 
> 
> Adam, can you pick this one up please ?

Merged:

remote: I: patch #62203 updated using rev 
1d4aa672424d8b1629fda11400b88607b5066965.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   08c4912..1d4aa67  master -> master

- ajax

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PULL] XQuartz -- Fix launching with ASan

2015-10-19 Thread Adam Jackson
On Mon, 2015-10-19 at 09:15 -0700, Jeremy Huddleston Sequoia wrote:
> Hey ajax,
> 
> Thanks for merging the warning fixes I sent.  I was actually going to
> just roll them into this pull-request once they were reviewed, but
> now it's just down to two XQuartz changes.

No problem, I'm trying to be proactive about merging things that look
sane and get review rather than waiting for pull requests, since I know
I often don't get around to sending my own pull requests promptly.

Merged:

To ssh://git.freedesktop.org/git/xorg/xserver
   1d4aa67..5b582a4  master -> master

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel