OpenCloudOS-Kernel/drivers/infiniband/hw/qib
Viresh Kumar 7ee23491b3 RDMA/qib: Validate ->show()/store() callbacks before calling them
The permissions of the read-only or write-only sysfs files can be
changed (as root) and the user can then try to read a write-only file or
write to a read-only file which will lead to kernel crash here.

Protect against that by always validating the show/store callbacks.

Link: https://lore.kernel.org/r/d45cc26361a174ae12dbb86c994ef334d257924b.1573096807.git.viresh.kumar@linaro.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-11-14 11:49:15 -04:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qib.h qib: Convert qib_unit_table to XArray 2019-04-01 13:31:35 -03:00
qib_6120_regs.h
qib_7220.h Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
qib_7220_regs.h
qib_7322_regs.h
qib_common.h infiniband/qib: Fix typo in comment 2019-04-22 14:08:15 -03:00
qib_debugfs.c infiniband: qib: no need to check return value of debugfs_create functions 2019-01-24 09:22:29 -07:00
qib_debugfs.h IB/qib: Convert opcode counters to per-context 2013-06-21 17:19:50 -07:00
qib_diag.c RDMA: Use u64_to_user_ptr everywhere 2018-03-29 13:42:29 -06:00
qib_driver.c qib: Convert qib_unit_table to XArray 2019-04-01 13:31:35 -03:00
qib_eeprom.c IB/{hfi1, qib}: Fix a concurrency issue with device name in logging 2018-01-05 13:34:55 -05:00
qib_file_ops.c RDMA/qib: Unneeded variable ret 2019-07-25 13:53:45 -03:00
qib_fs.c infiniband: don't bother with d_delete() 2019-09-03 09:30:55 -04:00
qib_iba6120.c RDMA/qib: Delete extra line 2019-11-06 15:19:33 -04:00
qib_iba7220.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
qib_iba7322.c 5.2 Merge Window pull request 2019-05-09 09:02:46 -07:00
qib_init.c qib: Convert qib_unit_table to XArray 2019-04-01 13:31:35 -03:00
qib_intr.c IB/qib: Convert timers to use timer_setup() 2017-10-09 12:19:41 -04:00
qib_mad.c RDMA: Change MAD processing function to remove extra casting and parameter 2019-11-12 20:20:15 -04:00
qib_mad.h IB/core: Add core header changes needed for OPA 2015-08-28 22:54:50 -04:00
qib_pcie.c IB/qib: fix spelling mistake "colescing" -> "coalescing" 2018-11-26 16:45:06 -07:00
qib_pio_copy.c
qib_qp.c IB/{rdmavt, hfi1, qib}: Add helpers to hide SWQE WR details 2019-06-28 22:34:26 -03:00
qib_qsfp.c IB/qib: Remove empty function 2017-01-24 16:20:37 -05:00
qib_qsfp.h IB/qib: Remove empty function 2017-01-24 16:20:37 -05:00
qib_rc.c IB/{rdmavt, hfi1, qib}: Add a counter for credit waits 2019-09-13 16:59:55 -03:00
qib_ruc.c IB/{hfi1, qib, rdmavt}: Move ruc_loopback to rdmavt 2018-10-03 16:38:28 -06:00
qib_sd7220.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
qib_sdma.c IB/{hfi1, qib, rvt} Cleanup open coded sge usage 2019-01-30 14:22:32 -05:00
qib_sysfs.c RDMA/qib: Validate ->show()/store() callbacks before calling them 2019-11-14 11:49:15 -04:00
qib_twsi.c IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
qib_tx.c Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
qib_uc.c IB/{hfi1, qib, rdmavt}: Put qp in error state when cq is full 2019-06-28 22:34:26 -03:00
qib_ud.c IB/{rdmavt, hfi1, qib}: Add helpers to hide SWQE WR details 2019-06-28 22:34:26 -03:00
qib_user_pages.c mm/gup: add make_dirty arg to put_user_pages_dirty_lock() 2019-09-24 15:54:08 -07:00
qib_user_sdma.c IB/qib: Use struct_size() helper 2019-05-30 15:40:50 -03:00
qib_user_sdma.h
qib_verbs.c Linux 5.2-rc6 2019-06-28 21:18:23 -03:00
qib_verbs.h RDMA: Change MAD processing function to remove extra casting and parameter 2019-11-12 20:20:15 -04:00
qib_wc_ppc64.c
qib_wc_x86_64.c IB/qib: fix test of unsigned variable 2015-05-12 13:55:41 -04:00