author | Rich Burridge <rich.burridge@oracle.com> |
Tue, 02 May 2017 08:26:02 -0700 | |
changeset 7960 | 80539200ddb3 |
parent 7650 | 2e39c59b83f8 |
permissions | -rw-r--r-- |
7650
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
1 |
Fix alignment problems on SPARC. Based on similar fixes found at: |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
2 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
3 |
https://lists.debian.org/debian-sparc/2012/01/msg00012.html |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
4 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
5 |
and: |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
6 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
7 |
https://www.winehq.org/pipermail/wine-patches/2011-February/098547.html |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
8 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
9 |
This change needs to be sent upstream. |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
10 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
11 |
--- snort-2.9.9.0/src/snort.c.orig 2017-01-25 10:28:13.663208245 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
12 |
+++ snort-2.9.9.0/src/snort.c 2017-01-30 13:20:41.973411707 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
13 |
@@ -847,6 +847,14 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
14 |
snort_argc = argc; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
15 |
snort_argv = argv; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
16 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
17 |
+/* |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
18 |
+ * 'ta 6' tells the kernel to synthesize any unaligned accesses this process |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
19 |
+ * makes, instead of just signalling an error and terminating the process. |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
20 |
+ */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
21 |
+#ifdef __sparc |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
22 |
+ __asm("ta 6"); |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
23 |
+#endif |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
24 |
+ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
25 |
return SnortMain(argc, argv); |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
26 |
} |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
27 |