Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xwayland for openSUSE:Factory checked in at 2022-07-13 13:44:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xwayland (Old) and /work/SRC/openSUSE:Factory/.xwayland.new.1523 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xwayland" Wed Jul 13 13:44:43 2022 rev:13 rq:988657 version:22.1.3 Changes: -------- --- /work/SRC/openSUSE:Factory/xwayland/xwayland.changes 2022-05-26 18:44:03.621177985 +0200 +++ /work/SRC/openSUSE:Factory/.xwayland.new.1523/xwayland.changes 2022-07-13 13:44:45.613978348 +0200 @@ -1,0 +2,13 @@ +Tue Jul 12 14:22:22 UTC 2022 - Stefan Dirsch <sndir...@suse.com> + +- Update to version 22.1.3 + * os: print <signal handler called> if unw_is_signal_frame() + * os: print registers in the libunwind version of xorg_backtrace() + * xwayland/present: Do not send two idle notify events for flip pixmaps + * xwayland: Fix check logic in sprite_check_lost_focus() + * xwayland: Change randr_output status when call xwl_output_remove() + * xkb: switch to array index loops to moving pointers + * xkb: swap XkbSetDeviceInfo and XkbSetDeviceInfoCheck + * xkb: add request length validation for XkbSetGeometry + +------------------------------------------------------------------- Old: ---- xwayland-22.1.2.tar.xz xwayland-22.1.2.tar.xz.sig New: ---- xwayland-22.1.3.tar.xz xwayland-22.1.3.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xwayland.spec ++++++ --- /var/tmp/diff_new_pack.wnCu7L/_old 2022-07-13 13:44:45.989978882 +0200 +++ /var/tmp/diff_new_pack.wnCu7L/_new 2022-07-13 13:44:45.993978888 +0200 @@ -24,7 +24,7 @@ %endif Name: xwayland -Version: 22.1.2 +Version: 22.1.3 Release: 0 URL: http://xorg.freedesktop.org/ Summary: X ++++++ xwayland-22.1.2.tar.xz -> xwayland-22.1.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xwayland-22.1.2/hw/xwayland/xwayland-input.c new/xwayland-22.1.3/hw/xwayland/xwayland-input.c --- old/xwayland-22.1.2/hw/xwayland/xwayland-input.c 2022-05-25 10:38:55.000000000 +0200 +++ new/xwayland-22.1.3/hw/xwayland/xwayland-input.c 2022-07-12 15:48:31.000000000 +0200 @@ -2935,7 +2935,7 @@ if (xwl_seat->focus_window == NULL && xwl_seat->last_xwindow != NullWindow && - IsParent(xwl_seat->last_xwindow, window)) + (IsParent(xwl_seat->last_xwindow, window) || xwl_seat->last_xwindow == window)) return TRUE; return FALSE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xwayland-22.1.2/hw/xwayland/xwayland-output.c new/xwayland-22.1.3/hw/xwayland/xwayland-output.c --- old/xwayland-22.1.2/hw/xwayland/xwayland-output.c 2022-05-25 10:38:55.000000000 +0200 +++ new/xwayland-22.1.3/hw/xwayland/xwayland-output.c 2022-07-12 15:48:31.000000000 +0200 @@ -827,6 +827,8 @@ xorg_list_del(&xwl_output->link); + RROutputSetConnection(xwl_output->randr_output, RR_Disconnected); + xorg_list_for_each_entry(it, &xwl_screen->output_list, link) output_get_new_size(it, &width, &height); update_screen_size(xwl_output, width, height); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xwayland-22.1.2/hw/xwayland/xwayland-present.c new/xwayland-22.1.3/hw/xwayland/xwayland-present.c --- old/xwayland-22.1.2/hw/xwayland/xwayland-present.c 2022-05-25 10:38:55.000000000 +0200 +++ new/xwayland-22.1.3/hw/xwayland/xwayland-present.c 2022-07-12 15:48:31.000000000 +0200 @@ -276,7 +276,15 @@ xwl_present_free_idle_vblank(vblank); if (xwl_present_window->flip_active) { - xwl_present_free_idle_vblank(xwl_present_window->flip_active); + struct xwl_present_event *event; + + vblank = xwl_present_window->flip_active; + event = xwl_present_event_from_id((uintptr_t)vblank); + if (event->pixmap) + xwl_present_free_idle_vblank(vblank); + else + xwl_present_free_event(event); + xwl_present_window->flip_active = NULL; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xwayland-22.1.2/meson.build new/xwayland-22.1.3/meson.build --- old/xwayland-22.1.2/meson.build 2022-05-25 10:38:55.000000000 +0200 +++ new/xwayland-22.1.3/meson.build 2022-07-12 15:48:31.000000000 +0200 @@ -3,7 +3,7 @@ 'buildtype=debugoptimized', 'c_std=gnu99', ], - version: '22.1.2', + version: '22.1.3', meson_version: '>= 0.47.0', ) release_date = '2021-07-05' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xwayland-22.1.2/os/backtrace.c new/xwayland-22.1.3/os/backtrace.c --- old/xwayland-22.1.2/os/backtrace.c 2022-05-25 10:38:55.000000000 +0200 +++ new/xwayland-22.1.3/os/backtrace.c 2022-07-12 15:48:31.000000000 +0200 @@ -40,15 +40,73 @@ #endif #include <dlfcn.h> +static void +print_registers(int frame, unw_cursor_t cursor) +{ + const struct { + const char *name; + int regnum; + } regs[] = { +#if UNW_TARGET_X86_64 + { "rax", UNW_X86_64_RAX }, + { "rbx", UNW_X86_64_RBX }, + { "rcx", UNW_X86_64_RCX }, + { "rdx", UNW_X86_64_RDX }, + { "rsi", UNW_X86_64_RSI }, + { "rdi", UNW_X86_64_RDI }, + { "rbp", UNW_X86_64_RBP }, + { "rsp", UNW_X86_64_RSP }, + { " r8", UNW_X86_64_R8 }, + { " r9", UNW_X86_64_R9 }, + { "r10", UNW_X86_64_R10 }, + { "r11", UNW_X86_64_R11 }, + { "r12", UNW_X86_64_R12 }, + { "r13", UNW_X86_64_R13 }, + { "r14", UNW_X86_64_R14 }, + { "r15", UNW_X86_64_R15 }, +#endif + }; + const int num_regs = sizeof(regs) / sizeof(*regs); + int ret, i; + + if (num_regs == 0) + return; + + /* + * Advance the cursor from the signal frame to the one that triggered the + * signal. + */ + frame++; + ret = unw_step(&cursor); + if (ret < 0) { + ErrorFSigSafe("unw_step failed: %s [%d]\n", unw_strerror(ret), ret); + return; + } + + ErrorFSigSafe("\n"); + ErrorFSigSafe("Registers at frame #%d:\n", frame); + + for (i = 0; i < num_regs; i++) { + uint64_t val; + ret = unw_get_reg(&cursor, regs[i].regnum, &val); + if (ret < 0) { + ErrorFSigSafe("unw_get_reg(%s) failed: %s [%d]\n", + regs[i].name, unw_strerror(ret), ret); + } else { + ErrorFSigSafe(" %s: 0x%" PRIx64 "\n", regs[i].name, val); + } + } +} + void xorg_backtrace(void) { - unw_cursor_t cursor; + unw_cursor_t cursor, signal_cursor; unw_context_t context; unw_word_t ip; unw_word_t off; unw_proc_info_t pip; - int ret, i = 0; + int ret, i = 0, signal_frame = -1; char procname[256]; const char *filename; Dl_info dlinfo; @@ -97,14 +155,26 @@ else filename = "?"; - ErrorFSigSafe("%u: %s (%s%s+0x%x) [%p]\n", i++, filename, procname, - ret == -UNW_ENOMEM ? "..." : "", (int)off, - (void *)(uintptr_t)(ip)); + + if (unw_is_signal_frame(&cursor)) { + signal_cursor = cursor; + signal_frame = i; + + ErrorFSigSafe("%u: <signal handler called>\n", i++); + } else { + ErrorFSigSafe("%u: %s (%s%s+0x%x) [%p]\n", i++, filename, procname, + ret == -UNW_ENOMEM ? "..." : "", (int)off, + (void *)(uintptr_t)(ip)); + } ret = unw_step(&cursor); if (ret < 0) ErrorFSigSafe("unw_step failed: %s [%d]\n", unw_strerror(ret), ret); } + + if (signal_frame >= 0) + print_registers(signal_frame, signal_cursor); + ErrorFSigSafe("\n"); } #else /* HAVE_LIBUNWIND */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xwayland-22.1.2/xkb/xkb.c new/xwayland-22.1.3/xkb/xkb.c --- old/xwayland-22.1.2/xkb/xkb.c 2022-05-25 10:38:55.000000000 +0200 +++ new/xwayland-22.1.3/xkb/xkb.c 2022-07-12 15:48:31.000000000 +0200 @@ -5157,7 +5157,7 @@ } static Status -_CheckSetDoodad(char **wire_inout, +_CheckSetDoodad(char **wire_inout, xkbSetGeometryReq *req, XkbGeometryPtr geom, XkbSectionPtr section, ClientPtr client) { char *wire; @@ -5168,6 +5168,9 @@ Status status; dWire = (xkbDoodadWireDesc *) (*wire_inout); + if (!_XkbCheckRequestBounds(client, req, dWire, dWire + 1)) + return BadLength; + any = dWire->any; wire = (char *) &dWire[1]; if (client->swapped) { @@ -5270,7 +5273,7 @@ } static Status -_CheckSetOverlay(char **wire_inout, +_CheckSetOverlay(char **wire_inout, xkbSetGeometryReq *req, XkbGeometryPtr geom, XkbSectionPtr section, ClientPtr client) { register int r; @@ -5281,6 +5284,9 @@ wire = *wire_inout; olWire = (xkbOverlayWireDesc *) wire; + if (!_XkbCheckRequestBounds(client, req, olWire, olWire + 1)) + return BadLength; + if (client->swapped) { swapl(&olWire->name); } @@ -5292,6 +5298,9 @@ xkbOverlayKeyWireDesc *kWire; XkbOverlayRowPtr row; + if (!_XkbCheckRequestBounds(client, req, rWire, rWire + 1)) + return BadLength; + if (rWire->rowUnder > section->num_rows) { client->errorValue = _XkbErrCode4(0x20, r, section->num_rows, rWire->rowUnder); @@ -5300,6 +5309,9 @@ row = XkbAddGeomOverlayRow(ol, rWire->rowUnder, rWire->nKeys); kWire = (xkbOverlayKeyWireDesc *) &rWire[1]; for (k = 0; k < rWire->nKeys; k++, kWire++) { + if (!_XkbCheckRequestBounds(client, req, kWire, kWire + 1)) + return BadLength; + if (XkbAddGeomOverlayKey(ol, row, (char *) kWire->over, (char *) kWire->under) == NULL) { @@ -5333,6 +5345,9 @@ register int r; xkbRowWireDesc *rWire; + if (!_XkbCheckRequestBounds(client, req, sWire, sWire + 1)) + return BadLength; + if (client->swapped) { swapl(&sWire->name); swaps(&sWire->top); @@ -5358,6 +5373,9 @@ XkbRowPtr row; xkbKeyWireDesc *kWire; + if (!_XkbCheckRequestBounds(client, req, rWire, rWire + 1)) + return BadLength; + if (client->swapped) { swaps(&rWire->top); swaps(&rWire->left); @@ -5369,16 +5387,19 @@ row->left = rWire->left; row->vertical = rWire->vertical; kWire = (xkbKeyWireDesc *) &rWire[1]; - for (k = 0; k < rWire->nKeys; k++) { + for (k = 0; k < rWire->nKeys; k++, kWire++) { XkbKeyPtr key; + if (!_XkbCheckRequestBounds(client, req, kWire, kWire + 1)) + return BadLength; + key = XkbAddGeomKey(row); if (!key) return BadAlloc; - memcpy(key->name.name, kWire[k].name, XkbKeyNameLength); - key->gap = kWire[k].gap; - key->shape_ndx = kWire[k].shapeNdx; - key->color_ndx = kWire[k].colorNdx; + memcpy(key->name.name, kWire->name, XkbKeyNameLength); + key->gap = kWire->gap; + key->shape_ndx = kWire->shapeNdx; + key->color_ndx = kWire->colorNdx; if (key->shape_ndx >= geom->num_shapes) { client->errorValue = _XkbErrCode3(0x10, key->shape_ndx, geom->num_shapes); @@ -5390,14 +5411,14 @@ return BadMatch; } } - rWire = (xkbRowWireDesc *) &kWire[rWire->nKeys]; + rWire = (xkbRowWireDesc *)kWire; } wire = (char *) rWire; if (sWire->nDoodads > 0) { register int d; for (d = 0; d < sWire->nDoodads; d++) { - status = _CheckSetDoodad(&wire, geom, section, client); + status = _CheckSetDoodad(&wire, req, geom, section, client); if (status != Success) return status; } @@ -5406,7 +5427,7 @@ register int o; for (o = 0; o < sWire->nOverlays; o++) { - status = _CheckSetOverlay(&wire, geom, section, client); + status = _CheckSetOverlay(&wire, req, geom, section, client); if (status != Success) return status; } @@ -5440,6 +5461,9 @@ xkbOutlineWireDesc *olWire; XkbOutlinePtr ol; + if (!_XkbCheckRequestBounds(client, req, shapeWire, shapeWire + 1)) + return BadLength; + shape = XkbAddGeomShape(geom, shapeWire->name, shapeWire->nOutlines); if (!shape) @@ -5450,21 +5474,27 @@ XkbPointPtr pt; xkbPointWireDesc *ptWire; + if (!_XkbCheckRequestBounds(client, req, olWire, olWire + 1)) + return BadLength; + ol = XkbAddGeomOutline(shape, olWire->nPoints); if (!ol) return BadAlloc; ol->corner_radius = olWire->cornerRadius; ptWire = (xkbPointWireDesc *) &olWire[1]; - for (p = 0, pt = ol->points; p < olWire->nPoints; p++, pt++) { - pt->x = ptWire[p].x; - pt->y = ptWire[p].y; + for (p = 0, pt = ol->points; p < olWire->nPoints; p++, pt++, ptWire++) { + if (!_XkbCheckRequestBounds(client, req, ptWire, ptWire + 1)) + return BadLength; + + pt->x = ptWire->x; + pt->y = ptWire->y; if (client->swapped) { swaps(&pt->x); swaps(&pt->y); } } ol->num_points = olWire->nPoints; - olWire = (xkbOutlineWireDesc *) (&ptWire[olWire->nPoints]); + olWire = (xkbOutlineWireDesc *)ptWire; } if (shapeWire->primaryNdx != XkbNoShape) shape->primary = &shape->outlines[shapeWire->primaryNdx]; @@ -5561,12 +5591,15 @@ return status; for (i = 0; i < req->nDoodads; i++) { - status = _CheckSetDoodad(&wire, geom, NULL, client); + status = _CheckSetDoodad(&wire, req, geom, NULL, client); if (status != Success) return status; } for (i = 0; i < req->nKeyAliases; i++) { + if (!_XkbCheckRequestBounds(client, req, wire, wire + XkbKeyNameLength)) + return BadLength; + if (XkbAddGeomKeyAlias(geom, &wire[XkbKeyNameLength], wire) == NULL) return BadAlloc; wire += 2 * XkbKeyNameLength; @@ -6551,7 +6584,8 @@ static char * CheckSetDeviceIndicators(char *wire, DeviceIntPtr dev, - int num, int *status_rtrn, ClientPtr client) + int num, int *status_rtrn, ClientPtr client, + xkbSetDeviceInfoReq * stuff) { xkbDeviceLedsWireDesc *ledWire; int i; @@ -6559,6 +6593,11 @@ ledWire = (xkbDeviceLedsWireDesc *) wire; for (i = 0; i < num; i++) { + if (!_XkbCheckRequestBounds(client, stuff, ledWire, ledWire + 1)) { + *status_rtrn = BadLength; + return (char *) ledWire; + } + if (client->swapped) { swaps(&ledWire->ledClass); swaps(&ledWire->ledID); @@ -6586,6 +6625,11 @@ atomWire = (CARD32 *) &ledWire[1]; if (nNames > 0) { for (n = 0; n < nNames; n++) { + if (!_XkbCheckRequestBounds(client, stuff, atomWire, atomWire + 1)) { + *status_rtrn = BadLength; + return (char *) atomWire; + } + if (client->swapped) { swapl(atomWire); } @@ -6597,6 +6641,10 @@ mapWire = (xkbIndicatorMapWireDesc *) atomWire; if (nMaps > 0) { for (n = 0; n < nMaps; n++) { + if (!_XkbCheckRequestBounds(client, stuff, mapWire, mapWire + 1)) { + *status_rtrn = BadLength; + return (char *) mapWire; + } if (client->swapped) { swaps(&mapWire->virtualMods); swapl(&mapWire->ctrls); @@ -6648,11 +6696,6 @@ xkbIndicatorMapWireDesc *mapWire; XkbSrvLedInfoPtr sli; - if (!_XkbCheckRequestBounds(client, stuff, ledWire, ledWire + 1)) { - *status_rtrn = BadLength; - return (char *) ledWire; - } - namec = mapc = statec = 0; sli = XkbFindSrvLedInfo(dev, ledWire->ledClass, ledWire->ledID, XkbXI_IndicatorMapsMask); @@ -6671,10 +6714,6 @@ memset((char *) sli->names, 0, XkbNumIndicators * sizeof(Atom)); for (n = 0, bit = 1; n < XkbNumIndicators; n++, bit <<= 1) { if (ledWire->namesPresent & bit) { - if (!_XkbCheckRequestBounds(client, stuff, atomWire, atomWire + 1)) { - *status_rtrn = BadLength; - return (char *) atomWire; - } sli->names[n] = (Atom) *atomWire; if (sli->names[n] == None) ledWire->namesPresent &= ~bit; @@ -6692,10 +6731,6 @@ if (ledWire->mapsPresent) { for (n = 0, bit = 1; n < XkbNumIndicators; n++, bit <<= 1) { if (ledWire->mapsPresent & bit) { - if (!_XkbCheckRequestBounds(client, stuff, mapWire, mapWire + 1)) { - *status_rtrn = BadLength; - return (char *) mapWire; - } sli->maps[n].flags = mapWire->flags; sli->maps[n].which_groups = mapWire->whichGroups; sli->maps[n].groups = mapWire->groups; @@ -6731,13 +6766,17 @@ } static int -_XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev, +_XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev, xkbSetDeviceInfoReq * stuff) { char *wire; wire = (char *) &stuff[1]; if (stuff->change & XkbXI_ButtonActionsMask) { + int sz = stuff->nBtns * SIZEOF(xkbActionWireDesc); + if (!_XkbCheckRequestBounds(client, stuff, wire, (char *) wire + sz)) + return BadLength; + if (!dev->button) { client->errorValue = _XkbErrCode2(XkbErr_BadClass, ButtonClass); return XkbKeyboardErrorCode; @@ -6748,13 +6787,13 @@ dev->button->numButtons); return BadMatch; } - wire += (stuff->nBtns * SIZEOF(xkbActionWireDesc)); + wire += sz; } if (stuff->change & XkbXI_IndicatorsMask) { int status = Success; wire = CheckSetDeviceIndicators(wire, dev, stuff->nDeviceLedFBs, - &status, client); + &status, client, stuff); if (status != Success) return status; } @@ -6765,8 +6804,8 @@ } static int -_XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev, - xkbSetDeviceInfoReq * stuff) +_XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev, + xkbSetDeviceInfoReq * stuff) { char *wire; xkbExtensionDeviceNotify ed; @@ -6790,8 +6829,6 @@ if (stuff->firstBtn + stuff->nBtns > nBtns) return BadValue; sz = stuff->nBtns * SIZEOF(xkbActionWireDesc); - if (!_XkbCheckRequestBounds(client, stuff, wire, (char *) wire + sz)) - return BadLength; memcpy((char *) &acts[stuff->firstBtn], (char *) wire, sz); wire += sz; ed.reason |= XkbXI_ButtonActionsMask;