Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys VOP_BMAP() may be called via ioctl(FIOGETBMAP) on any vn...
details: https://anonhg.NetBSD.org/src/rev/d261f851faa2
branches: trunk
changeset: 984230:d261f851faa2
user: chs <chs%NetBSD.org@localhost>
date: Mon Jun 28 17:52:12 2021 +0000
description:
VOP_BMAP() may be called via ioctl(FIOGETBMAP) on any vnode that applications
can open. change various pseudo-fs *_bmap methods return an error instead of
panic.
Reported-by: syzbot+8289a3eaf2ba60958c87%syzkaller.appspotmail.com@localhost
diffstat:
sys/fs/ptyfs/ptyfs_vnops.c | 6 +++---
sys/miscfs/fdesc/fdesc_vnops.c | 6 +++---
sys/miscfs/kernfs/kernfs_vnops.c | 6 +++---
sys/miscfs/procfs/procfs_vnops.c | 6 +++---
4 files changed, 12 insertions(+), 12 deletions(-)
diffs (108 lines):
diff -r f6b779ee9384 -r d261f851faa2 sys/fs/ptyfs/ptyfs_vnops.c
--- a/sys/fs/ptyfs/ptyfs_vnops.c Mon Jun 28 11:27:00 2021 +0000
+++ b/sys/fs/ptyfs/ptyfs_vnops.c Mon Jun 28 17:52:12 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ptyfs_vnops.c,v 1.62 2020/11/27 14:43:57 christos Exp $ */
+/* $NetBSD: ptyfs_vnops.c,v 1.63 2021/06/28 17:52:12 chs Exp $ */
/*
* Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.62 2020/11/27 14:43:57 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.63 2021/06/28 17:52:12 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -144,7 +144,7 @@
int ptyfs_inactive (void *);
#define ptyfs_lock genfs_lock
#define ptyfs_unlock genfs_unlock
-#define ptyfs_bmap genfs_badop
+#define ptyfs_bmap genfs_eopnotsupp
#define ptyfs_strategy genfs_badop
int ptyfs_print (void *);
int ptyfs_pathconf (void *);
diff -r f6b779ee9384 -r d261f851faa2 sys/miscfs/fdesc/fdesc_vnops.c
--- a/sys/miscfs/fdesc/fdesc_vnops.c Mon Jun 28 11:27:00 2021 +0000
+++ b/sys/miscfs/fdesc/fdesc_vnops.c Mon Jun 28 17:52:12 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdesc_vnops.c,v 1.135 2021/05/01 15:08:14 hannken Exp $ */
+/* $NetBSD: fdesc_vnops.c,v 1.136 2021/06/28 17:52:13 chs Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.135 2021/05/01 15:08:14 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.136 2021/06/28 17:52:13 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -104,7 +104,7 @@
int fdesc_reclaim(void *);
#define fdesc_lock genfs_lock
#define fdesc_unlock genfs_unlock
-#define fdesc_bmap genfs_badop
+#define fdesc_bmap genfs_eopnotsupp
#define fdesc_strategy genfs_badop
int fdesc_print(void *);
int fdesc_pathconf(void *);
diff -r f6b779ee9384 -r d261f851faa2 sys/miscfs/kernfs/kernfs_vnops.c
--- a/sys/miscfs/kernfs/kernfs_vnops.c Mon Jun 28 11:27:00 2021 +0000
+++ b/sys/miscfs/kernfs/kernfs_vnops.c Mon Jun 28 17:52:12 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernfs_vnops.c,v 1.166 2020/06/27 17:29:19 christos Exp $ */
+/* $NetBSD: kernfs_vnops.c,v 1.167 2021/06/28 17:52:13 chs Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.166 2020/06/27 17:29:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.167 2021/06/28 17:52:13 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -166,7 +166,7 @@
#define kernfs_lock genfs_lock
#define kernfs_unlock genfs_unlock
#define kernfs_bmap genfs_badop
-#define kernfs_strategy genfs_badop
+#define kernfs_strategy genfs_eopnotsupp
int kernfs_print(void *);
#define kernfs_islocked genfs_islocked
int kernfs_pathconf(void *);
diff -r f6b779ee9384 -r d261f851faa2 sys/miscfs/procfs/procfs_vnops.c
--- a/sys/miscfs/procfs/procfs_vnops.c Mon Jun 28 11:27:00 2021 +0000
+++ b/sys/miscfs/procfs/procfs_vnops.c Mon Jun 28 17:52:12 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_vnops.c,v 1.215 2020/06/27 17:29:19 christos Exp $ */
+/* $NetBSD: procfs_vnops.c,v 1.216 2021/06/28 17:52:13 chs Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.215 2020/06/27 17:29:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.216 2021/06/28 17:52:13 chs Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -237,7 +237,7 @@
int procfs_reclaim(void *);
#define procfs_lock genfs_lock
#define procfs_unlock genfs_unlock
-#define procfs_bmap genfs_badop
+#define procfs_bmap genfs_eopnotsupp
#define procfs_strategy genfs_badop
int procfs_print(void *);
int procfs_pathconf(void *);
Home |
Main Index |
Thread Index |
Old Index