Bug#693659: vmix floating-point mode does not use proper API on Linux
Control: severity -1 grave Hi, On Wed, Dec 05, 2012 at 06:50:17PM -0500, Michael Gilbert wrote: control: severity -1 wishlist control: tag -1 upstream control: reopen -1 Reopening since the issue was worked around rather than fixed. This should really be addressed upstream, so it should be forwarded there by someone with more interest than myself. The workaround was reverted (and the fix never entered testing), so I guess the original bug (which Ben marked as grave) is still present. So I'm increasing the severity back to grave. If I misunderstood the situation, feel free to downgrade again. Cheers, Ivo -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#693659: vmix floating-point mode does not use proper API on Linux
control: severity -1 wishlist control: retitle -1 oss4: switch back to vmix floating-point mode once it uses proper api On Fri, Dec 14, 2012 at 12:01 PM, Ivo De Decker wrote: If I misunderstood the situation, feel free to downgrade again. Apologies, but you have. Like I said, the issue was worked around, and that itself needs to be pushed to tpu. I'll do that. Best wishes, Mike -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#693659: vmix floating-point mode does not use proper API on Linux
control: severity -1 wishlist control: tag -1 upstream control: reopen -1 Reopening since the issue was worked around rather than fixed. This should really be addressed upstream, so it should be forwarded there by someone with more interest than myself. Thanks, Mike -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#693659: vmix floating-point mode does not use proper API on Linux
Hi, I've prepared an nmu based on the patch. See attached. Let me know if you want to upload it, or I'll do so in a couple days. Best wishes, Mike oss4.patch Description: Binary data
Bug#693659: vmix floating-point mode does not use proper API on Linux
Hi, On Sat, 24 Nov 2012 04:36:43 -0500 Michael Gilbert mgilb...@debian.org wrote: Hi, I've prepared an nmu based on the patch. See attached. Let me know if you want to upload it, or I'll do so in a couple days. I will not have time to properly test that patch right now. If you use it it doesn't break anything for you, feel free to upload your NMU. Best wishes, Mike Best regards, Sébastien signature.asc Description: PGP signature
Bug#693659: vmix floating-point mode does not use proper API on Linux
Hi, Just a side note, the +nmuX notation is meant for native packages, for a non-native you should add .X after the debian version. So for this NMU it should be 4.2-build2007-1.1 Kind regards Laurent Bigonville -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#693659: vmix floating-point mode does not use proper API on Linux
On Sat, Nov 24, 2012 at 11:06 AM, Laurent Bigonville wrote: Hi, Just a side note, the +nmuX notation is meant for native packages, for a non-native you should add .X after the debian version. So for this NMU it should be 4.2-build2007-1.1 Actually that's only a devref guideline. +nmuN is another option. The reference documents are going to be updated to clarify this: http://bugs.debian.org/542288 Best wishes, Mike -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#693659: vmix floating-point mode does not use proper API on Linux
Control: tag -1 patch Hi, consider the attached patch. Thanks, Roland Description: Use Linux API for floating-point mode This patch adds kernel_fpu_begin() and kernel_fpu_end() calls to oss_fp_check(), oss_fp_save() and oss_fp_restore(). Author: Roland Stigge sti...@antcom.de Bug-Debian: http://bugs.debian.org/693659 --- setup/Linux/oss/build/osscore.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) --- oss4-4.2-build2007.orig/setup/Linux/oss/build/osscore.c +++ oss4-4.2-build2007/setup/Linux/oss/build/osscore.c @@ -31,6 +31,9 @@ typedef int *ioctl_arg; #include linux/irq.h #include linux/sched.h #include linux/interrupt.h +#ifdef CONFIG_OSS_VMIX_FLOAT +#include asm/i387.h +#endif #undef strlen #undef strcpy #define strlen oss_strlen @@ -1840,20 +1843,26 @@ oss_fp_check (void) oss_native_word flags_reg; + kernel_fpu_begin(); + local_save_flags (flags_reg); flags_reg = ~FLAGS_ID; local_irq_restore (flags_reg); local_save_flags (flags_reg); - if (flags_reg FLAGS_ID) + if (flags_reg FLAGS_ID) { +kernel_fpu_end(); return 0; + } flags_reg |= FLAGS_ID; local_irq_restore (flags_reg); local_save_flags (flags_reg); - if (!(flags_reg FLAGS_ID)) + if (!(flags_reg FLAGS_ID)) { +kernel_fpu_end(); return 0; + } #define CPUID_FXSR (124) #define CPUID_SSE (125) @@ -1861,8 +1870,10 @@ oss_fp_check (void) cpuid (1, eax, ebx, ecx, edx); - if (!(edx CPUID_FXSR)) + if (!(edx CPUID_FXSR)) { +kernel_fpu_end(); return -1; + } /* * Older machines require different FP handling than the latest ones. Use the SSE @@ -1871,12 +1882,15 @@ oss_fp_check (void) if (!(edx CPUID_SSE)) old_arch = 1; + kernel_fpu_end(); + return 1; } void oss_fp_save (short *envbuf, unsigned int flags[]) { + kernel_fpu_begin(); flags[0] = read_cr0 (); write_cr0 (flags[0] ~0x0e); /* Clear CR0.TS/MP/EM */ @@ -1894,11 +1908,13 @@ oss_fp_save (short *envbuf, unsigned int write_mxcsr (0x1f80); } flags[2] = read_cr0 (); + kernel_fpu_end(); } void oss_fp_restore (short *envbuf, unsigned int flags[]) { + kernel_fpu_begin(); asm (fwait); if (old_arch) { @@ -1910,6 +1926,7 @@ oss_fp_restore (short *envbuf, unsigned write_cr4 (flags[1]); /* Restore cr4 */ } write_cr0 (flags[0]); /* Restore cr0 */ + kernel_fpu_end(); } #endif
Bug#693659: vmix floating-point mode does not use proper API on Linux
Source: oss4 Version: 4.2-build2006-2 Severity: grave The functions oss_fp_check(), oss_fp_save() and oss_fp_restore() manipulate control registers without disabling preemption. This can result in corrupting the FPU state of other tasks, hence the high severity. They should be changed to use the API declared in asm/i387.h. Ben. -- System Information: Debian Release: wheezy/sid APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: i386 (x86_64) Foreign Architectures: amd64 Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org