Changeset 7130 in vbox for trunk/src/VBox
- Timestamp:
- Feb 25, 2008 4:44:45 PM (17 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c
r7035 r7130 630 630 631 631 /** 632 * Helper for supdrvIOCtl. Check if pszStr contains any character of pszChars. 633 * We would use strpbrk here if this function would be contained in the RedHat kABI white 634 * list, see http://www.kerneldrivers.org/RHEL5. 635 * 636 * @return 1 if pszStr does contain any character of pszChars, 0 otherwise. 637 * @param pszStr String to check 638 * @param pszChars Character set 639 */ 640 static int supdrvCheckInvalidChar(const char *pszStr, const char *pszChars) 641 { 642 int chCur; 643 while ((chCur = *pszStr++) != '\0') 644 { 645 int ch; 646 const char *psz = pszChars; 647 while ((ch = *psz++) != '\0') 648 if (ch == chCur) 649 return 1; 650 651 } 652 return 0; 653 } 654 655 656 /** 632 657 * I/O Control worker. 633 658 * … … 896 921 REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.szName[0]); 897 922 REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, memchr(pReq->u.In.szName, '\0', sizeof(pReq->u.In.szName))); 898 REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, !s trpbrk(pReq->u.In.szName, ";:()[]{}/\\|&*%#@!~`\"'"));923 REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, !supdrvCheckInvalidChar(pReq->u.In.szName, ";:()[]{}/\\|&*%#@!~`\"'")); 899 924 900 925 /* execute */ -
trunk/src/VBox/HostDrivers/Support/linux/Makefile
r7032 r7130 196 196 endif 197 197 KFLAGS := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX 198 ifdef VBOX_REDHAT_KABI 199 KFLAGS += -DVBOX_REDHAT_KABI 200 endif 198 201 ifndef CONFIG_VBOXDRV_FIXEDMAJOR 199 202 KFLAGS += -DCONFIG_VBOXDRV_AS_MISC -
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r7014 r7130 204 204 */ 205 205 # if defined(RT_ARCH_AMD64) 206 # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 21) 206 # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 21) && !defined(VBOX_REDHAT_KABI) 207 207 # define DO_DISABLE_NMI 1 208 208 # endif … … 506 506 * we don't allow to setup an NMI watchdog. 507 507 */ 508 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) 508 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && !defined(VBOX_REDHAT_KABI) 509 509 /* 510 510 * First test: NMI actiated? Works only works with Linux 2.6 -- 2.4 does not export … … 569 569 goto nmi_activated; 570 570 # endif 571 # endif /* >= 2.6.0 */571 # endif /* >= 2.6.0 && !defined(VBOX_REDHAT_KABI) */ 572 572 573 573 /* … … 598 598 return -EINVAL; 599 599 # else /* < 2.6.19 */ 600 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) 600 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && !defined(VBOX_REDHAT_KABI) 601 601 nmi_activated: 602 602 # endif … … 1399 1399 { 1400 1400 #ifdef CONFIG_SMP 1401 # if defined(num_present_cpus) 1401 # if defined(num_present_cpus) && !defined(VBOX_REDHAT_KABI) 1402 1402 return num_present_cpus(); 1403 # elif defined(num_ online_cpus)1404 return num_ online_cpus();1403 # elif defined(num_possible_cpus) 1404 return num_possible_cpus(); 1405 1405 # else 1406 1406 return smp_num_cpus;
Note:
See TracChangeset
for help on using the changeset viewer.