summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorDavid Laight <david.laight.linux@gmail.com>2025-11-19 22:41:23 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-21 18:16:11 +0100
commit6c84a61ac023d581b4b9fcfa44532eaf15946f56 (patch)
treefe0da719da21350dc555cdff67ebf94c66ee1454 /tools/perf/scripts/python/bin
parent719f3df3e113e03d2c8cf324827da1fd17a9bd8f (diff)
downloadkernel-6c84a61ac023d581b4b9fcfa44532eaf15946f56.tar.gz
drivers/tty/vt: use umin() instead of min_t(u16, ...) for row/col limits
The row/column bounds (for a screen window box) are changed from 'offset one' to 'offset zero' and bound to the screen size using: v->xs = min_t(u16, v->xs - 1, vc->vc_cols - 1); This has the side effect of converting zero to the limit. A check I'm adding to min_t() reports that (u16)(v->xs - 1) (etc) discards signiticant bits (because v->xs is promoted to 'int' before the addition). If v->xs is zero (it comes from userspace) it converts -1 to 0xffff. This is then bounded to 'vc->vc_cols - 1' which will be fine. Replace with: v->xs = umin(v->xs - 1, vc->vc_cols - 1); which again converts a -1 to unsigned - this time to 0xffffffff, with the same overall effect. Whether zero is meant to mean the 'maximum size' is unknown. I can't find any documentation for the ioctl and it pre-dates git. Detected by an extra check added to min_t(). Signed-off-by: David Laight <david.laight.linux@gmail.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://patch.msgid.link/20251119224140.8616-28-david.laight.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
='/distro/kernel/commit/drivers/gpu/drm/radeon/r600_blit_kms.c?id=441921d5309cfe098747d9840fd71bdc6ca2a93b'>drm/radeon: embed struct drm_gem_objectDaniel Vetter 2011-02-14drm/radeon/kms: use linear aligned for 6xx/7xx bo blitsAlex Deucher 2011-02-14drm/radeon/kms: 6xx/7xx big endian fixesCédric Cano 2010-11-18drm/radeon/kms: fix alignment when allocating buffersAlex Deucher 2010-10-19Merge branch 'drm-fixes' of /home/airlied/kernel/linux-2.6 into drm-core-nextDave Airlie 2010-10-12drm/radeon/kms: avoid corner case issue with unmappable vram V2Jerome Glisse 2010-10-06drm/radeon/kms: make sure blit addr masks are 64 bitAlex Deucher 2010-10-06drm/radeon/kms: add drm blit support for evergreenAlex Deucher 2010-10-06drm/radeon/kms: clean up r6xx/r7xx blit init (v2)Alex Deucher 2010-09-13drm/radeon: add some missing copyright headersAlex Deucher 2010-04-06drm/radeon/kms: simplify & improve GPU reset V2Jerome Glisse 2010-03-01drm/radeon: use ALIGN instead of open coding itMatt Turner 2010-02-18drm/radeon/kms: remove HDP flushes from fence emit (v2)Alex Deucher 2010-02-16drm/radeon/kms: fix indirect buffer management V2Jerome Glisse 2010-02-09drm/radeon/kms/r600: reduce gpu cache flushingAlex Deucher 2010-02-01drm/radeon/kms: Bailout of blit if error happen & protect with mutex V3Jerome Glisse 2010-01-14drm/radeon/kms: Fix r600 blit cleanup pathJerome Glisse 2010-01-08drm/radeon/kms: Schedule host path read cache flush through the ring V2Jerome Glisse 2009-12-02drm/radeon/kms: Rework radeon object handlingJerome Glisse 2009-12-02drm/radeon/kms: Add support for interrupts on r6xx/r7xx chips (v3)Alex Deucher 2009-11-06drm/radeon/kms/r600: fix rs880 support v2Alex Deucher 2009-10-12drm/radeon: Revert "drm/r600: avoid assigning vb twice in blit code"Dave Airlie 2009-10-08drm/r600: avoid assigning vb twice in blit codeRobert Noland 2009-09-23drm/radeon/r600: set correct pitch for 4 byte copyAndre Maasikas 2009-09-18drm/radeon/r600: fix some issues with suspend/resume.Dave Airlie 2009-09-18drm/r600/kms: fixup number of loops per blit calculation.Dave Airlie 2009-09-16drm/radeon/kms: IB locking dumps out a lockdep ordering issueDave Airlie 2009-09-12drm/radeon/kms/r600: fix blit dword count for non r6xxAlex Deucher 2009-09-10drm/radeon/kms/r600: fix blit supportAlex Deucher 2009-09-08drm/radeon/kms: add r600 KMS supportJerome Glisse