From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 8D1A7386F442 for ; Tue, 7 May 2024 16:08:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D1A7386F442 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8D1A7386F442 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715098099; cv=none; b=MLvjhpalZ01Vg9pFJzya/SI31WrNyq6UaH75lL6/meAWF/7IM4hnFMpftgkDalcWJOnPkYUAN7JIOnAowIUJhLU6zMy0ofyCDXzuKxHAuMNW7Nf19wJMcaZOH+aFrSTlDN1VFU201WyTVkWFaEis6vENhSi/7WG7cZkx90AiAj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715098099; c=relaxed/simple; bh=XcUfM0YpRKB6rU2rMgfjiR2yWhlG0jqlxVEGADpe+IU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=UgZWgJNLtGCDHyXriusRoBojbn+0MQWPihC4WFUnoulpLHHVkyAdRCrAEA3lO7LVDiIrPn3LMPtSfBN7O0nYuNZNHRyGXy6kKYRr9UucXh88kPuHNgd14rI3dWJlQc+620e+dvbpuhz5zH0ZqSH6ABk+KgM+iKO4I9BwCHeQKmU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715098097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/VQYaEUDyDkoAr18BHDuFBSNzS9C4ulu++A7SxP0/GQ=; b=a2d/rM1dmLEIpDOleh08UWFAZuDAoPXt+Fm5Yd1xHkVbiAk6rSOCt9lFta1yZfa96T7sFp WQzj/1K+3kxG8VsDepkRhjGxKPO+H0DIthwAgyCxLYcjXUmPf0q+dpU5HSquwBDjlwea19 1eb8GJGYKnbSB4IFZLJGmN3+LlgCIjc= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-74-VspeZv4XNHu0mJu2iIYAuw-1; Tue, 07 May 2024 12:08:15 -0400 X-MC-Unique: VspeZv4XNHu0mJu2iIYAuw-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-34dc34c758fso1833973f8f.0 for ; Tue, 07 May 2024 09:08:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715098094; x=1715702894; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/VQYaEUDyDkoAr18BHDuFBSNzS9C4ulu++A7SxP0/GQ=; b=fvlMFq74aOL7JyIFIVzRQc+nsFITILiZEeTZ968fS3nn0LicxDjsu7jsQBYN1MBrlS vTdnt00XYnrubn1uJSbI/4LUA0ekuawJ3/dEBBFfY7V6FEP4RhZ/8pVrHkhEeQa50Rpe 787kVSU7z97ewfdtOGm6bMzYYMGf0tSrsWpupNvVnQyNyA5Lsh7g7JNlC6wWz06D7dT+ b8cZ94EoZNBaDHaivXI/mUwLzlL9MIcUI8/ILBcoPczM0Wfhqt13wrUEjkEnT16bpNrr MscC3BuxnuQnUgJX84/D7WRm4XIBeNUXqlg+eVUnkGMNwo1f4g6b8/uCXRw4C2+8ZVe+ 3oow== X-Forwarded-Encrypted: i=1; AJvYcCUPKHDMvb6CjxkT3kpfB3sQ4aJsutwGzfDfHGiIEVK6f5aD6xF4FOJLzpFe3N3GwIHL8X/saLPNa9IUW8BURm88WnhMdTXOq8gJ0g== X-Gm-Message-State: AOJu0YwVwZJJrU0CvMWUf3PUQxYbU9epb3VFZ+eUzcw1k/EmZ/djne3d tm+tP9KTNrkE/Zs/q6K3XrAprfzqg64indiZr5MjpB1rlch8BBT2/2/sM0EMnm9jFuYFdj6e6VD xWATXuyLOnoM78094L5X3j17tPAQQYhbEFhhrnEuLmWPMPkSmPqBKMpm0k4w= X-Received: by 2002:a5d:4b44:0:b0:349:c40c:393 with SMTP id ffacd0b85a97d-34fcaddf709mr167433f8f.3.1715098093959; Tue, 07 May 2024 09:08:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGIFAgojsi0wWUrKs5HFN3nvQm4sYXimPuS6opFyR9gEWoBQvp5nnDm5to5nijT04EMGZLEtg== X-Received: by 2002:a5d:4b44:0:b0:349:c40c:393 with SMTP id ffacd0b85a97d-34fcaddf709mr167411f8f.3.1715098093343; Tue, 07 May 2024 09:08:13 -0700 (PDT) Received: from localhost ([31.111.84.240]) by smtp.gmail.com with ESMTPSA id l7-20020a5d5267000000b0034dd13d7a5esm13235042wrc.65.2024.05.07.09.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:08:13 -0700 (PDT) From: Andrew Burgess To: "Willgerodt, Felix" , "gdb-patches@sourceware.org" Cc: John Baldwin Subject: RE: [PATCHv5 08/11] gdb/arch: assert that X86_XSTATE_MPX is not set for x32 In-Reply-To: References: <79e267edd3cdd68d87fef81d2a5fdf73b22b25be.1714143669.git.aburgess@redhat.com> Date: Tue, 07 May 2024 17:08:12 +0100 Message-ID: <87edadtxjn.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: "Willgerodt, Felix" writes: >> -----Original Message----- >> From: Andrew Burgess >> Sent: Freitag, 26. April 2024 17:02 >> To: gdb-patches@sourceware.org >> Cc: Andrew Burgess ; Willgerodt, Felix >> ; John Baldwin >> Subject: [PATCHv5 08/11] gdb/arch: assert that X86_XSTATE_MPX is not set for >> x32 >> >> While rebasing this series past this commit: >> >> commit 4bb20a6244b7091a9a7a2ae35dfbd7e8db27550a >> Date: Wed Mar 20 04:13:18 2024 -0700 >> >> gdbserver: Clear X86_XSTATE_MPX bits in xcr0 on x32 >> >> I worried that there could be other paths that might result in an xcr0 >> value which has X86_XSTATE_MPX set in x32 mode. As everyone >> eventually calls amd64_create_target_description to build their target >> description, I figured we could assert in here that if X86_XSTATE_MPX >> is set then we should not be an x32 target, this will uncover any >> other bugs in this area. >> >> I'm not currently able to build/run any x32 binaries, so I have no way >> to test this, but the author of commit 4bb20a6244b7091 did test this >> series with that assert in place and didn't see any problems. >> >> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31511 >> --- >> gdb/arch/amd64.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> > > GDB was also checking this somewhere when I reviewed H.J.'s patch. > Though it doesn't hurt to have it here in my eyes. > > Approved-By: Felix Willgerodt As this commit is only loosely tied to the rest of the series I've gone ahead and pushed this to upstream. Thanks, Andrew