[PATCH] test/input: Replace negative architecture test by test for 64-bit
The test for double-aligned members in dix_valuator_alloc() currently depends on if !defined(__i386__) !defined(__sh__). This covers m68k, where it fails. According to the comment, the test should be limited to 64-bit platforms only. Hence check if sizeof(long) == 8 instead. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org --- Untested for now test/input.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/input.c b/test/input.c index be988a4..ed29bdc 100644 --- a/test/input.c +++ b/test/input.c @@ -1384,11 +1384,11 @@ dix_valuator_alloc(void) assert(v); assert(v-numAxes == num_axes); -#if !defined(__i386__) !defined(__sh__) -/* must be double-aligned on 64 bit */ -assert(((void *) v-axisVal - (void *) v) % sizeof(double) == 0); -assert(((void *) v-axes - (void *) v) % sizeof(double) == 0); -#endif +if (sizeof(long) == 8) { +/* must be double-aligned on 64 bit */ +assert(((void *) v-axisVal - (void *) v) % sizeof(double) == 0); +assert(((void *) v-axes - (void *) v) % sizeof(double) == 0); +} num_axes++; } -- 1.7.0.4 ___ 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: BCM5974 touchpad issues...
On 12.02.2013 09:32, Daniel J Blueman wrote: On 12 February 2013 12:47, Peter Hutterer peter.hutte...@who-t.net wrote: please don't send out 4 emails for the same issue. My apologies; posting, subscribing and resubscribing to the right mailing list with you CCd was racing with quick moderator approval. On Mon, Feb 11, 2013 at 03:10:41PM +0800, Daniel J Blueman wrote: I'm seeing erratic click events on Broadcom 5974 touchpads (Macbook Pro 10,1) during two-finger scrolling. I was wondering what mailing list is the most relevant, and where to start to see if this is a userspace or kernel HID issue, anyone? Thanks, Daniel $ synclient Parameter settings: LeftEdge= -3898 this doesn't look right. did you set this somehow, or is this the default it comes up with? This is the default, perhaps because the BCM5974 advertises a clickpad property. RightEdge = 4428 TopEdge = 434 BottomEdge = 6146 FingerLow = 70 FingerHigh = 75 FingerPress = 257 MaxTapTime = 180 MaxTapMove = 535 MaxDoubleTapTime= 180 SingleTapTimeout= 180 ClickTime = 100 FastTaps= 0 EmulateMidButtonTime= 0 EmulateTwoFingerMinZ= 283 EmulateTwoFingerMinW= 7 VertScrollDelta = -243 HorizScrollDelta= -243 did you configure this as negative? if not, there's a bug there somewhere. Yes, to achieve the (IMHO) more natural scroll direction. either way, hard to tell without any information as to what server version or synaptics driver version you're running. xserver-xorg-input-synaptics 1.6.2 xserver-xorg 7.7 sounds like you're on debian/ubuntu, the latter doesn't say much, 'apt-cache policy xserver-xorg-core' would. -- t ___ 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] test/input: Replace negative architecture test by test for 64-bit
Geert Uytterhoeven ge...@linux-m68k.org writes: The test for double-aligned members in dix_valuator_alloc() currently depends on if !defined(__i386__) !defined(__sh__). This covers m68k, where it fails. According to the comment, the test should be limited to 64-bit platforms only. Hence check if sizeof(long) == 8 instead. MIPS N32 needs doubles to be 8 byte aligned, while it has 32 bit longs and pointers (the CPU registers are 64 bit). libxi has a similar conditional for structure padding which prevented sigbuses of all GTK3-using programs there. Should the comment be changed, or the negative test expanded? I don't know how it could be determined without checking specific architecture names. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org --- Untested for now test/input.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/input.c b/test/input.c index be988a4..ed29bdc 100644 --- a/test/input.c +++ b/test/input.c @@ -1384,11 +1384,11 @@ dix_valuator_alloc(void) assert(v); assert(v-numAxes == num_axes); -#if !defined(__i386__) !defined(__sh__) -/* must be double-aligned on 64 bit */ -assert(((void *) v-axisVal - (void *) v) % sizeof(double) == 0); -assert(((void *) v-axes - (void *) v) % sizeof(double) == 0); -#endif +if (sizeof(long) == 8) { +/* must be double-aligned on 64 bit */ +assert(((void *) v-axisVal - (void *) v) % sizeof(double) == 0); +assert(((void *) v-axes - (void *) v) % sizeof(double) == 0); +} num_axes++; } pgpz_S6XPE8cX.pgp Description: PGP 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] test/input: Replace negative architecture test by test for 64-bit
From: Geert Uytterhoeven ge...@linux-m68k.org Date: Tue, 12 Feb 2013 11:17:22 +0100 The test for double-aligned members in dix_valuator_alloc() currently depends on if !defined(__i386__) !defined(__sh__). This covers m68k, where it fails. According to the comment, the test should be limited to 64-bit platforms only. Hence check if sizeof(long) == 8 instead. Unfortunately the comment isn't accurate. There are quite a few 32-bit architectures that demand 64-bit alignment of doubles. At least arm, hppa, powerpc and sparc fall into that category. Those that only required 32-bit alignment seemed to be a minority. Even if you include m68k in that category, that's still the case. My advice would be to add __m68k__ to the list and adjust the comment to say something like: Most architectures, even 32-bit ones, require 64-bit alignment. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org --- Untested for now test/input.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/input.c b/test/input.c index be988a4..ed29bdc 100644 --- a/test/input.c +++ b/test/input.c @@ -1384,11 +1384,11 @@ dix_valuator_alloc(void) assert(v); assert(v-numAxes == num_axes); -#if !defined(__i386__) !defined(__sh__) -/* must be double-aligned on 64 bit */ -assert(((void *) v-axisVal - (void *) v) % sizeof(double) == 0); -assert(((void *) v-axes - (void *) v) % sizeof(double) == 0); -#endif +if (sizeof(long) == 8) { +/* must be double-aligned on 64 bit */ +assert(((void *) v-axisVal - (void *) v) % sizeof(double) == 0); +assert(((void *) v-axes - (void *) v) % sizeof(double) == 0); +} num_axes++; } -- 1.7.0.4 ___ 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 ___ 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] test/input: Replace negative architecture test by test for 64-bit
Am 12.02.2013 13:40, schrieb Mark Kettenis: From: Geert Uytterhoeven ge...@linux-m68k.org Date: Tue, 12 Feb 2013 11:17:22 +0100 The test for double-aligned members in dix_valuator_alloc() currently depends on if !defined(__i386__) !defined(__sh__). This covers m68k, where it fails. According to the comment, the test should be limited to 64-bit platforms only. Hence check if sizeof(long) == 8 instead. Unfortunately the comment isn't accurate. There are quite a few 32-bit architectures that demand 64-bit alignment of doubles. At least arm, hppa, powerpc and sparc fall into that category. Those that only required 32-bit alignment seemed to be a minority. Even if you include m68k in that category, that's still the case. hi all, is it possible the add something like: _FORCE_64-BIT_ALIGMENT_OF_DOUBLES_ instead of !defined(__i386__) ?? A nice additional effect would be the explanation what to archive. people are very bad of thinking inverse so it is always a good idea to avoid things like !defined. just my 2 cents, wh My advice would be to add __m68k__ to the list and adjust the comment to say something like: Most architectures, even 32-bit ones, require 64-bit alignment. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org --- Untested for now test/input.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/input.c b/test/input.c index be988a4..ed29bdc 100644 --- a/test/input.c +++ b/test/input.c @@ -1384,11 +1384,11 @@ dix_valuator_alloc(void) assert(v); assert(v-numAxes == num_axes); -#if !defined(__i386__) !defined(__sh__) -/* must be double-aligned on 64 bit */ -assert(((void *) v-axisVal - (void *) v) % sizeof(double) == 0); -assert(((void *) v-axes - (void *) v) % sizeof(double) == 0); -#endif +if (sizeof(long) == 8) { +/* must be double-aligned on 64 bit */ +assert(((void *) v-axisVal - (void *) v) % sizeof(double) == 0); +assert(((void *) v-axes - (void *) v) % sizeof(double) == 0); +} num_axes++; } -- 1.7.0.4 ___ 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 ___ 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 ___ 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] test/input: Replace negative architecture test by test for 64-bit
On Tue, Feb 12, 2013 at 1:40 PM, Mark Kettenis mark.kette...@xs4all.nl wrote: From: Geert Uytterhoeven ge...@linux-m68k.org Date: Tue, 12 Feb 2013 11:17:22 +0100 The test for double-aligned members in dix_valuator_alloc() currently depends on if !defined(__i386__) !defined(__sh__). This covers m68k, where it fails. According to the comment, the test should be limited to 64-bit platforms only. Hence check if sizeof(long) == 8 instead. Unfortunately the comment isn't accurate. There are quite a few 32-bit architectures that demand 64-bit alignment of doubles. At least arm, hppa, powerpc and sparc fall into that category. Those that only required 32-bit alignment seemed to be a minority. Even if you include m68k in that category, that's still the case. Sure there are others. But what is this test really trying to achieve? Check if the compiler applied the correct alignment rules for the architecture it compiled for? That should always be the case, besides compiler bugs. My advice would be to add __m68k__ to the list and adjust the comment to say something like: Most architectures, even 32-bit ones, require 64-bit alignment. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org --- Untested for now test/input.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/input.c b/test/input.c index be988a4..ed29bdc 100644 --- a/test/input.c +++ b/test/input.c @@ -1384,11 +1384,11 @@ dix_valuator_alloc(void) assert(v); assert(v-numAxes == num_axes); -#if !defined(__i386__) !defined(__sh__) -/* must be double-aligned on 64 bit */ -assert(((void *) v-axisVal - (void *) v) % sizeof(double) == 0); -assert(((void *) v-axes - (void *) v) % sizeof(double) == 0); -#endif +if (sizeof(long) == 8) { +/* must be double-aligned on 64 bit */ +assert(((void *) v-axisVal - (void *) v) % sizeof(double) == 0); +assert(((void *) v-axes - (void *) v) % sizeof(double) == 0); +} num_axes++; } Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say programmer or something like that. -- Linus Torvalds ___ 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] test/input: Replace negative architecture test by test for 64-bit
Sender: geert.uytterhoe...@gmail.com Date: Tue, 12 Feb 2013 14:03:50 +0100 On Tue, Feb 12, 2013 at 1:40 PM, Mark Kettenis mark.kette...@xs4all.nl wrote: From: Geert Uytterhoeven ge...@linux-m68k.org Date: Tue, 12 Feb 2013 11:17:22 +0100 The test for double-aligned members in dix_valuator_alloc() currently depends on if !defined(__i386__) !defined(__sh__). This covers m68k, where it fails. According to the comment, the test should be limited to 64-bit platforms only. Hence check if sizeof(long) == 8 instead. Unfortunately the comment isn't accurate. There are quite a few 32-bit architectures that demand 64-bit alignment of doubles. At least arm, hppa, powerpc and sparc fall into that category. Those that only required 32-bit alignment seemed to be a minority. Even if you include m68k in that category, that's still the case. Sure there are others. But what is this test really trying to achieve? An independent test of the somewhat twisted logic in the valuator implementation that tries to implement a variable-sized data structure where the variable-sized bit is properly aligned to be accessed as a double. ___ 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] test/input: Replace negative architecture test by test for 64-bit
Michał Masłowski dixit: MIPS N32 needs doubles to be 8 byte aligned, while it has 32 bit longs Hrm. Well, GCC has __alignof__ and, I think, so has C11… bye, //mirabilos -- mirabilos│ untested Natureshadow │ tut natürlich Natureshadow │ was auch sonst ... mirabilos│ fijn ☺ ___ 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
Nominations for X.Org Foundation Board of Directors are OPEN
(This was posted separately to the general X.org list.) We are seeking nominations for candidates for election to the X.Org Foundation Board of Directors. All X.Org Foundation members are eligible for election to the board. Nominations for the 2012 election are now open and will remain open until 23.59 GMT on 3 March 2013. The Board consists of directors elected from the membership. Each year, an election is held to bring the total number of directors to eight. The four members receiving the highest vote totals will serve as directors for two year terms. The directors who received two year terms starting in 2011 were Matthias Hopf, Keith Packard, Matt Dew, and Alex Deucher. They will continue to serve until their term ends in 2013. Current directors whose term expires in 2012 are Eric Anholt, Alan Coopersmith, Stuart Kreitman, and Bart Massey. A director is expected to participate in the weekly IRC meeting to discuss current business and to attend the annual meeting of the X.Org Foundation, which will be held at a location determined in advance by the Board of Directors. A member may nominate themselves or any other member they feel is qualified. Nominations should be sent to the Election Committee at elections at x.org. Nominees shall be required to be current members of the X.Org Foundation, and submit a personal statement of up to 200 words that will be provided to prospective voters. The collected statements, along with the statement of contribution to the X.Org Foundation in the members account page on http://members.x.org, will be made available to all voters to help them make their voting decisions. Nominations, membership applications or renewals and completed personal statements must be received no later than 23.59 GMT on 3 March 2013. The slate of candidates will be published 4 March 2013 and candidate QA will begin then. The deadline for Xorg membership applications and renewals is 8 March 2011. The Election Committee X.Org Foundation ___ 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:makedepend] Bug 56091 - Unsafe use of strcpy() in makedepend
Use memmove for potentially overlapping copies. Reported-by: Laurence Jupp laure...@narya.org Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- parse.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse.c b/parse.c index 2d7c95a..e5240c3 100644 --- a/parse.c +++ b/parse.c @@ -229,7 +229,7 @@ deftype (char *line, struct filepointer *filep, /* * copy the definition back to the beginning of the line. */ - strcpy (line, p); + memmove (line, p, strlen(p) + 1); break; case ELSE: case ENDIF: -- 1.7.9.2 ___ 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:makedepend] Bug 56091 - Unsafe use of strcpy() in makedepend
On Tue, Feb 12, 2013 at 06:39:07PM -0800, Alan Coopersmith wrote: Use memmove for potentially overlapping copies. Reported-by: Laurence Jupp laure...@narya.org Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com Reviewed-by: Matthieu Herrb matthieu.he...@laas.fr --- parse.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse.c b/parse.c index 2d7c95a..e5240c3 100644 --- a/parse.c +++ b/parse.c @@ -229,7 +229,7 @@ deftype (char *line, struct filepointer *filep, /* * copy the definition back to the beginning of the line. */ - strcpy (line, p); + memmove (line, p, strlen(p) + 1); break; case ELSE: case ENDIF: -- 1.7.9.2 ___ 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 -- Matthieu Herrb ___ 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