lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210618061516.662-26-jslaby@suse.cz>
Date:   Fri, 18 Jun 2021 08:14:31 +0200
From:   Jiri Slaby <jslaby@...e.cz>
To:     gregkh@...uxfoundation.org
Cc:     linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 25/70] mxser: remove MOXA_ASPP_LSTATUS ioctl

1) The semantics are defined exactly nowhere.
2) The ioctl definition was never exposed to userspace, so noone should
   actually be reliably using this.
3) It's not even mentioned in any of the mxser utilities.

Provided the above, remove this mxser-special ioctl.

Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
 drivers/tty/mxser.c | 25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 68c2f2346dcf..38e12ff17529 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -64,16 +64,9 @@
 #define OP_MODE_MASK		3
 
 #define MOXA_ASPP_OQUEUE	(MOXA + 70)
-#define MOXA_ASPP_LSTATUS	(MOXA + 74)
 
 /* --------------------------------------------------- */
 
-#define NPPI_NOTIFY_PARITY	0x01
-#define NPPI_NOTIFY_FRAMING	0x02
-#define NPPI_NOTIFY_HW_OVERRUN	0x04
-#define NPPI_NOTIFY_SW_OVERRUN	0x08
-#define NPPI_NOTIFY_BREAK	0x10
-
 /*
  * Follow just what Moxa Must chip defines.
  *
@@ -304,7 +297,6 @@ struct mxser_port {
 	unsigned char ldisc_stop_rx;
 
 	int custom_divisor;
-	unsigned char err_shadow;
 
 	struct async_icount icount; /* kernel counters for 4 input interrupts */
 	unsigned int timeout;
@@ -1601,13 +1593,6 @@ static int mxser_ioctl(struct tty_struct *tty,
 
 		return put_user(len, (int __user *)argp);
 	}
-	case MOXA_ASPP_LSTATUS: {
-		if (put_user(info->err_shadow, (unsigned char __user *)argp))
-			return -EFAULT;
-
-		info->err_shadow = 0;
-		return 0;
-	}
 	default:
 		return -ENOIOCTLCMD;
 	}
@@ -2033,15 +2018,6 @@ static bool mxser_port_isr(struct mxser_port *port)
 
 	status = inb(port->ioaddr + UART_LSR);
 
-	if (status & UART_LSR_PE)
-		port->err_shadow |= NPPI_NOTIFY_PARITY;
-	if (status & UART_LSR_FE)
-		port->err_shadow |= NPPI_NOTIFY_FRAMING;
-	if (status & UART_LSR_OE)
-		port->err_shadow |= NPPI_NOTIFY_HW_OVERRUN;
-	if (status & UART_LSR_BI)
-		port->err_shadow |= NPPI_NOTIFY_BREAK;
-
 	if (port->board->must_hwid) {
 		if (iir == MOXA_MUST_IIR_GDA ||
 		    iir == MOXA_MUST_IIR_RDA ||
@@ -2172,7 +2148,6 @@ static int mxser_initbrd(struct mxser_board *brd)
 		info->port.close_delay = 5 * HZ / 10;
 		info->port.closing_wait = 30 * HZ;
 		info->normal_termios = mxvar_sdriver->init_termios;
-		info->err_shadow = 0;
 		spin_lock_init(&info->slock);
 
 		/* before set INT ISR, disable all int */
-- 
2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ