From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08C6047127B for ; Wed, 22 Jul 2026 07:55:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784706916; cv=none; b=Wq50d0xz8Xb0o1En7Q58+l+9Cmnu7mbkDI9Z/7XcNE6eSqOgiklnQr1FRRUUBNAawlODBKM5ky/dUFF8v1ytljxQ8NlJdIPcGduim0G/+vW0RqoV2Ufh1Tyh55jui0zs1B7y+q5er5aoEl7/T0T+OyGvHxyohwB/7i31sBj0a/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784706916; c=relaxed/simple; bh=/jhWO19k63IWNEJIXXkHwAvsLZbwvJv2P59C+GufRe0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=adNwMuZ50W5dmsYSOElvxJX5v2lICB69OEv8Jw/fO556LDqk0YgNISbfArXv+d0UIxgxYyk+15w6GsGu+ZyLgqmbNfNxKsm+ymlCIjT3rap3vna0jHQTwLX18Ko9KgyweLk5emnfPiYMVKCDRMfWRJosExi5iwuJVtwM1fqgL9I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=axKw+PkW; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="axKw+PkW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784706914; 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=JEHOJ2bzJwJy+o2sep7JfQ5jyg3etVDtYri7Q0U3JXs=; b=axKw+PkW5e2Pg5teqZHTEcIE78qxhgQMnvpnAnrj06wdWYTDD6z8oilox8sjob6dqjnGtE PCT/avGrmgqPJDaJiKx0Uii+m2fBHkbzH1J9uee3/Vj9x2+9Elh0WESNxRFINTXTRPZVKF BBKN3a7vrmJTCuwpr/s+0cA/C5NYcpU= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-260-cR6fRZaFPPa31tJj9Q-Ggg-1; Wed, 22 Jul 2026 03:55:09 -0400 X-MC-Unique: cR6fRZaFPPa31tJj9Q-Ggg-1 X-Mimecast-MFC-AGG-ID: cR6fRZaFPPa31tJj9Q-Ggg_1784706905 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 433721956067; Wed, 22 Jul 2026 07:55:03 +0000 (UTC) Received: from fweimer-oldenburg.csb.redhat.com (unknown [10.47.238.119]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8DAD81800902; Wed, 22 Jul 2026 07:54:48 +0000 (UTC) From: Florian Weimer To: "Dmitry V. Levin" Cc: Mukesh Kumar Chaurasiya , maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, chleroy@kernel.org, ryabinin.a.a@gmail.com, glider@google.com, andreyknvl@gmail.com, dvyukov@google.com, vincenzo.frascino@arm.com, oleg@redhat.com, kees@kernel.org, luto@amacapital.net, wad@chromium.org, mchauras@linux.ibm.com, thuth@redhat.com, ruanjinjie@huawei.com, sshegde@linux.ibm.com, akpm@linux-foundation.org, charlie@rivosinc.com, deller@gmx.de, macro@orcam.me.uk, segher@kernel.crashing.org, peterz@infradead.org, bigeasy@linutronix.de, namcao@linutronix.de, tglx@linutronix.de, mark.barnett@arm.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com Subject: Re: [PATCH v4 5/8] powerpc: add exit_flags field in pt_regs In-Reply-To: <20260722070155.GA11808@strace.io> (Dmitry V. Levin's message of "Wed, 22 Jul 2026 10:01:55 +0300") References: <20260123073916.956498-1-mkchauras@linux.ibm.com> <20260123073916.956498-6-mkchauras@linux.ibm.com> <20260722070155.GA11808@strace.io> Date: Wed, 22 Jul 2026 09:54:43 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 * Dmitry V. Levin: > On Fri, Jan 23, 2026 at 01:09:13PM +0530, Mukesh Kumar Chaurasiya wrote: >> From: Mukesh Kumar Chaurasiya >> >> Add a new field `exit_flags` in the pt_regs structure. This field will hold >> the flags set during interrupt or syscall execution that are required during >> exit to user mode. > > Apparently, this change breaks PTRACE_GETREGS as the latter has no means > to communicate the size of struct pt_regs being written to userspace. > > As result, the kernel with this patch will write to userpsace 32 more > bytes than before, and unless the userspace is re-compiled with the latest > ptrace.h, 32 bytes of userspace memory after struct pt_regs will be > overwritten. > > This issue was detected by strace test suite, specifically, the test that > checks whether the actual number of bytes written by > ptrace(PTRACE_GETREGS) matches sizeof(struct pt_regs), and that test failed > with runtime version v7.1 and headers version v7.2-rc1. I think this needs to be reverted because it breaks existing ptrace users. This isn't like iptables, where kernel updates did mandate specific versions of the userspace tools. Thanks, Florian