Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102954411
D29391.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D29391.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/asm/uaccess.h b/sys/compat/linuxkpi/common/include/asm/uaccess.h
--- a/sys/compat/linuxkpi/common/include/asm/uaccess.h
+++ b/sys/compat/linuxkpi/common/include/asm/uaccess.h
@@ -52,11 +52,7 @@
#define __copy_from_user(...) copy_from_user(__VA_ARGS__)
#define __copy_in_user(...) copy_from_user(__VA_ARGS__)
-#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 50000
#define user_access_begin(ptr, len) access_ok(ptr, len)
-#else
-#define user_access_begin() do { } while (0)
-#endif
#define user_access_end() do { } while (0)
#define unsafe_get_user(x, ptr, err) do { \
diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h
--- a/sys/compat/linuxkpi/common/include/linux/compiler.h
+++ b/sys/compat/linuxkpi/common/include/linux/compiler.h
@@ -81,11 +81,8 @@
#define barrier() __asm__ __volatile__("": : :"memory")
-#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 50000
-/* Moved from drm_os_freebsd.h */
#define lower_32_bits(n) ((u32)(n))
#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
-#endif
#define ___PASTE(a,b) a##b
#define __PASTE(a,b) ___PASTE(a,b)
diff --git a/sys/compat/linuxkpi/common/include/linux/uaccess.h b/sys/compat/linuxkpi/common/include/linux/uaccess.h
--- a/sys/compat/linuxkpi/common/include/linux/uaccess.h
+++ b/sys/compat/linuxkpi/common/include/linux/uaccess.h
@@ -61,11 +61,7 @@
#define put_user(_x, _p) __put_user(_x, _p)
#define clear_user(...) linux_clear_user(__VA_ARGS__)
-#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 50000
#define access_ok(a,b) linux_access_ok(a,b)
-#else
-#define access_ok(a,b,c) linux_access_ok(b,c)
-#endif
extern int linux_copyin(const void *uaddr, void *kaddr, size_t len);
extern int linux_copyout(const void *kaddr, void *uaddr, size_t len);
diff --git a/sys/dev/pms/freebsd/driver/common/lxencrypt.c b/sys/dev/pms/freebsd/driver/common/lxencrypt.c
--- a/sys/dev/pms/freebsd/driver/common/lxencrypt.c
+++ b/sys/dev/pms/freebsd/driver/common/lxencrypt.c
@@ -838,7 +838,7 @@
printf("%s: Add kek at index 0x%x wrapper 0x%x format 0x%x\n", __FUNCTION__, kek_add->kekIndex, kek_add->wrapperKekIndex, kek_add->blobFormat);
/* Copy kek_blob from user pointer to local buffer */
- if(access_ok(VERIFY_READ, kek_add->EncryptKekBlob, sizeof(kek_blob))) {
+ if(access_ok(kek_add->EncryptKekBlob, sizeof(kek_blob))) {
printf("%s: Starting copy from user %p to kernel %p\n", __FUNCTION__, kek_add->EncryptKekBlob, &kek_blob);
if((rv = copy_from_user(&kek_blob, kek_add->EncryptKekBlob, sizeof(kek_blob))) != 0) {
printf("%s: Copy error, %d left\n", __FUNCTION__, rv);
@@ -873,7 +873,7 @@
printf("%s: Add dek at index 0x%x, table %x, kek index %x, blob format %x, entry size %x\n", __FUNCTION__, dek_index, dek_table, kek_index, blob_format, entry_sz);
/* Copy dek_blob from user pointer to local buffer */
- if(access_ok(VERIFY_READ, dek_add->dekBlob, sizeof(dek_blob))) {
+ if(access_ok(dek_add->dekBlob, sizeof(dek_blob))) {
printf("%s: Starting copy from user %p to kernel %p\n", __FUNCTION__, dek_add->dekBlob, &dek_blob);
if((rv = copy_from_user(&dek_blob, dek_add->dekBlob, sizeof(dek_blob))) != 0) {
printf("%s: Copy error, %d left\n", __FUNCTION__, rv);
diff --git a/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c b/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c
--- a/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c
+++ b/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c
@@ -856,8 +856,7 @@
goto out;
}
- if (!access_ok(VERIFY_WRITE,
- (void __user *) (unsigned long) ex_hdr.response,
+ if (!access_ok((void __user *) (unsigned long) ex_hdr.response,
(hdr.out_words + ex_hdr.provider_out_words) * 8)) {
ret = -EFAULT;
goto out;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 4:05 AM (21 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14729881
Default Alt Text
D29391.diff (4 KB)
Attached To
Mode
D29391: LinuxKPI: remove < 5.0 version support
Attached
Detach File
Event Timeline
Log In to Comment