aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2022-04-14 22:44:02 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2022-04-15 15:06:04 +0000
commit9c90bfcd319c4342fd55310d876976399184a910 (patch)
tree4ef902fc5abc9dd23af7b10681327e7553c54496
parent9fce8d4140370ca8bc03d6a5668fb64a040c00fc (diff)
downloadsrc-9c90bfcd319c4342fd55310d876976399184a910.tar.gz
src-9c90bfcd319c4342fd55310d876976399184a910.zip
Remove 11.x ABI compat for kernel dump ioctls
This code was marked gone_in(13), so its time has passed. The only consumer of this interface is dumpon(8). We do not maintain strict backwards compatibility for this utility because a) it can't/shouldn't be used from a jail or chroot and b) it is highly specific interface unique to FreeBSD. The host's (presumably more up-to-date) copy of dumpon(8) should be used to configure kernel dump devices. Reviewed by: markj, emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D34913
-rw-r--r--sys/dev/null/null.c5
-rw-r--r--sys/geom/geom_dev.c17
-rw-r--r--sys/netinet/netdump/netdump_client.c15
-rw-r--r--sys/sys/disk.h6
4 files changed, 0 insertions, 43 deletions
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c
index cae470a3bcc4..54b648bbf086 100644
--- a/sys/dev/null/null.c
+++ b/sys/dev/null/null.c
@@ -109,11 +109,6 @@ null_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data __unused,
error = 0;
switch (cmd) {
-#ifdef COMPAT_FREEBSD11
- case DIOCSKERNELDUMP_FREEBSD11:
- gone_in(13, "FreeBSD 11.x ABI compat");
- /* FALLTHROUGH */
-#endif
#ifdef COMPAT_FREEBSD12
case DIOCSKERNELDUMP_FREEBSD12:
if (cmd == DIOCSKERNELDUMP_FREEBSD12)
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index b94df9fcda67..574cfa9f0215 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -570,23 +570,6 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread
if (error == 0 && *(u_int *)data == 0)
error = ENOENT;
break;
-#ifdef COMPAT_FREEBSD11
- case DIOCSKERNELDUMP_FREEBSD11:
- {
- struct diocskerneldump_arg kda;
-
- gone_in(13, "FreeBSD 11.x ABI compat");
-
- bzero(&kda, sizeof(kda));
- kda.kda_encryption = KERNELDUMP_ENC_NONE;
- kda.kda_index = (*(u_int *)data ? 0 : KDA_REMOVE_ALL);
- if (kda.kda_index == KDA_REMOVE_ALL)
- error = dumper_remove(devtoname(dev), &kda);
- else
- error = g_dev_setdumpdev(dev, &kda);
- break;
- }
-#endif
#ifdef COMPAT_FREEBSD12
case DIOCSKERNELDUMP_FREEBSD12:
{
diff --git a/sys/netinet/netdump/netdump_client.c b/sys/netinet/netdump/netdump_client.c
index d6fd7db364b8..5a1b10316860 100644
--- a/sys/netinet/netdump/netdump_client.c
+++ b/sys/netinet/netdump/netdump_client.c
@@ -500,9 +500,6 @@ netdump_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr,
struct dumperinfo dumper;
uint8_t *encryptedkey;
int error;
-#ifdef COMPAT_FREEBSD11
- u_int u;
-#endif
#ifdef COMPAT_FREEBSD12
struct diocskerneldump_arg_freebsd12 *kda12;
struct netdump_conf_freebsd12 *conf12;
@@ -513,18 +510,6 @@ netdump_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr,
NETDUMP_WLOCK();
switch (cmd) {
-#ifdef COMPAT_FREEBSD11
- case DIOCSKERNELDUMP_FREEBSD11:
- gone_in(13, "11.x ABI compatibility");
- u = *(u_int *)addr;
- if (u != 0) {
- error = ENXIO;
- break;
- }
- if (netdump_enabled())
- netdump_unconfigure();
- break;
-#endif
#ifdef COMPAT_FREEBSD12
/*
* Used by dumpon(8) in 12.x for clearing previous
diff --git a/sys/sys/disk.h b/sys/sys/disk.h
index 043a02c2d304..ce79dcad9566 100644
--- a/sys/sys/disk.h
+++ b/sys/sys/disk.h
@@ -58,12 +58,6 @@ void disk_err(struct bio *bp, const char *what, int blkdone, int nl);
* disk label formats. Don't use it unless you have to.
*/
-#define DIOCSKERNELDUMP_FREEBSD11 _IOW('d', 133, u_int)
- /*
- * Enable/Disable (the argument is boolean) the device for kernel
- * core dumps.
- */
-
#define DIOCGFLUSH _IO('d', 135) /* Flush write cache */
/*
* Flush write cache of the device.