git: d15267582d6e - stable/13 - Remove 11.x ABI compat for kernel dump ioctls
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 18 Apr 2022 15:03:36 UTC
The branch stable/13 has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=d15267582d6ef6af239e59f21b9e8c44de3daffa
commit d15267582d6ef6af239e59f21b9e8c44de3daffa
Author: Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2022-04-14 22:44:02 +0000
Commit: Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2022-04-18 14:51:40 +0000
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
(cherry picked from commit 9c90bfcd319c4342fd55310d876976399184a910)
---
sys/dev/null/null.c | 5 -----
sys/geom/geom_dev.c | 17 -----------------
sys/netinet/netdump/netdump_client.c | 15 ---------------
sys/sys/disk.h | 6 ------
4 files changed, 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 06a833c20c07..7b9d260bff44 100644
--- a/sys/netinet/netdump/netdump_client.c
+++ b/sys/netinet/netdump/netdump_client.c
@@ -466,9 +466,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;
@@ -479,18 +476,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.