From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) (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 742E242EED7 for ; Wed, 5 Aug 2026 13:23:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785936186; cv=none; b=ZtWIL6Fb6xN2mt9FdqsDIWv+yMq1or0jrk/Djhxqs/zeyV9JesLgD4x2n7kHjZmJFFA0ipGd7aUAc6Db4jqursR5MKNKHEw5DOeUvhJF/rP31ZJJbDGHhsc9ywcQCVSCirq3mRv8vlQK7nafe/rSsI0Op8lJ+SsgkgRqIVeb7iI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785936186; c=relaxed/simple; bh=x2Ap70EhmANNwZ9W2cmWHvdmGNIxKuEoXGZmjAhV6+Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=U2iJNpTJMoBztk/2TrqZr8BqOVJLBstNiBsbcjh76SoNUMBFGdCLi2Ulu5flNhd9tPMriwn2TbfgYMIqa3VwPP7IkPCQuab35Gy8YIq1I6kSAfpeK7ocf38Z6VHbIC2j1B8R0ZnBUaFcucPnlU3KolBN6YqZO/3cwoj/m1D9rVY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=r7Fpa1HT; arc=none smtp.client-ip=115.124.30.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="r7Fpa1HT" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1785936182; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=dH8ip1mRIJGjDV6SLU11tCmimn4ilOn1eL8+M31kjd0=; b=r7Fpa1HTcfGq3MERTY+/HR8cyTYyo937Cu6ZMh3cXQAWsygUJoXcgyqEyfa2gHK54V5j883HlNzdEvEOxMcr16JVB4v/j02EAVWDaPS5/UgM0w8hH4bH7DSEeW3o09CFpigcqRhph5dT0WSGdYxbw9dp39v7BrcZHnKBAWdTu5c= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045098064;MF=cp0613@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0X8REb64_1785936177; Received: from DESKTOP-S9E58SO.localdomain(mailfrom:cp0613@linux.alibaba.com fp:SMTPD_---0X8REb64_1785936177 cluster:ay36) by smtp.aliyun-inc.com; Wed, 05 Aug 2026 21:23:01 +0800 From: Chen Pei To: Himanshu Chauhan , linux-riscv@lists.infradead.org Cc: qingfang.deng@linux.dev, alex@ghiti.fr, aou@eecs.berkeley.edu, palmer@dabbelt.com, pjw@kernel.org, shuah@kernel.org, linux-kernel@vger.kernel.org, thecharlesjenkins@gmail.com, jtaubepe@redhat.com Subject: Re: [PATCH v6 3/5] riscv: ptrace support for hardware break/watchpoints Date: Wed, 5 Aug 2026 21:22:52 +0800 Message-ID: <20260805132256.918-1-cp0613@linux.alibaba.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260803134913.2013674-4-himanshu.chauhan@oss.qualcomm.com> References: <20260803134913.2013674-1-himanshu.chauhan@oss.qualcomm.com> <20260803134913.2013674-4-himanshu.chauhan@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit > +struct __riscv_hwdebug_state { > + unsigned long addr; > + unsigned long type; > + unsigned long len; > + unsigned long ctrl; > +} __packed; Hi Himanshu, Two suggestions about the new UAPI structure added in this patch. 1) Consider __u64 instead of 'unsigned long': its size differs between rv32 and rv64, so the layout would not be stable across 32-bit and 64-bit userspace (e.g. a future COMPAT path). __u64 keeps the layout identical for both. 2) With all members the same width there is no interior padding, so __packed can be dropped. The struct user_hwdebug_state above already uses fixed-width types; defining this one the same way would be consistent. Best regards, Pei -- Chen Pei