Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146089068
D14672.id40219.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D14672.id40219.diff
View Options
Index: sys/dev/aac/aac.c
===================================================================
--- sys/dev/aac/aac.c
+++ sys/dev/aac/aac.c
@@ -38,6 +38,7 @@
#define AAC_DRIVERNAME "aac"
#include "opt_aac.h"
+#include "opt_compat.h"
/* #include <stddef.h> */
#include <sys/param.h>
@@ -45,7 +46,9 @@
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/kthread.h>
+#include <sys/proc.h>
#include <sys/sysctl.h>
+#include <sys/sysent.h>
#include <sys/poll.h>
#include <sys/ioccom.h>
@@ -3521,7 +3524,19 @@
fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "");
- if ((error = copyin(arg, &agf, sizeof(agf))) == 0) {
+#ifdef COMPAT_FREEBSD32
+ if (SV_CURPROC_FLAG(SV_ILP32)) {
+ struct get_adapter_fib_ioctl32 agf32;
+ error = copyin(arg, &agf32, sizeof(agf32));
+ if (error == 0) {
+ agf.AdapterFibContext = agf32.AdapterFibContext;
+ agf.Wait = agf32.Wait;
+ agf.AifFib = (caddr_t)(uintptr_t)agf32.AifFib;
+ }
+ } else
+#endif
+ error = copyin(arg, &agf, sizeof(agf));
+ if (error == 0) {
for (ctx = sc->fibctx; ctx; ctx = ctx->next) {
if (agf.AdapterFibContext == ctx->unique)
break;
Index: sys/dev/aacraid/aacraid.c
===================================================================
--- sys/dev/aacraid/aacraid.c
+++ sys/dev/aacraid/aacraid.c
@@ -39,6 +39,7 @@
#define AAC_DRIVERNAME "aacraid"
#include "opt_aacraid.h"
+#include "opt_compat.h"
/* #include <stddef.h> */
#include <sys/param.h>
@@ -46,7 +47,9 @@
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/kthread.h>
+#include <sys/proc.h>
#include <sys/sysctl.h>
+#include <sys/sysent.h>
#include <sys/poll.h>
#include <sys/ioccom.h>
@@ -3381,7 +3384,19 @@
fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "");
mtx_lock(&sc->aac_io_lock);
- if ((error = copyin(arg, &agf, sizeof(agf))) == 0) {
+#ifdef COMPAT_FREEBSD32
+ if (SV_CURPROC_FLAG(SV_ILP32)) {
+ struct get_adapter_fib_ioctl32 agf32;
+ error = copyin(arg, &agf32, sizeof(agf32));
+ if (error == 0) {
+ agf.AdapterFibContext = agf32.AdapterFibContext;
+ agf.Wait = agf32.Wait;
+ agf.AifFib = (caddr_t)(uintptr_t)agf32.AifFib;
+ }
+ } else
+#endif
+ error = copyin(arg, &agf, sizeof(agf));
+ if (error == 0) {
for (ctx = sc->fibctx; ctx; ctx = ctx->next) {
if (agf.AdapterFibContext == ctx->unique)
break;
Index: sys/sys/aac_ioctl.h
===================================================================
--- sys/sys/aac_ioctl.h
+++ sys/sys/aac_ioctl.h
@@ -175,6 +175,14 @@
caddr_t AifFib;
};
+#ifdef _KERNEL
+struct get_adapter_fib_ioctl32 {
+ u_int32_t AdapterFibContext;
+ int Wait;
+ u_int32_t AifFib;
+};
+#endif
+
struct aac_query_disk {
int32_t ContainerNumber;
int32_t Bus;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 28, 5:29 PM (11 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29058368
Default Alt Text
D14672.id40219.diff (2 KB)
Attached To
Mode
D14672: Fix FSACTL_GET_NEXT_ADAPTER_FIB under 32-bit compat.
Attached
Detach File
Event Timeline
Log In to Comment