Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2753689rdb; Wed, 4 Oct 2023 10:20:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOem1G4kASblXuUF2DlE+vTrSlFSWd2N7JoqQj9xKJuypkYk9226PqkOO/9IdtK+SQaxY+ X-Received: by 2002:a05:6a20:3d02:b0:13d:1d14:6693 with SMTP id y2-20020a056a203d0200b0013d1d146693mr3262180pzi.45.1696440000152; Wed, 04 Oct 2023 10:20:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696440000; cv=none; d=google.com; s=arc-20160816; b=yYYSTTtUTT2HMz2jQgpVHzG9mCfPHLS0ImvAKiNuPnvZP/zd+pj9v9sVDN+a1021Un Xoo+by850+2yz3o36cxNQP2KaIHNmnLGV0uTuW+R/PWVRcZi5nDHgIIcOjgnGMTgcDc7 yEIrp730m0kvtkZNDcGXI/8y2qT1zSPB5U+d4sLNbOPawzOjgP0CUJzlozAtqP50otDj HSQQwJbAsN8LsBZgyjeSXW80bdHl0vUdrieRKPAhK6m6YEtKUo3bP4KAmof2iAJgvF0t Cp2JOG9A63KUJoFzy4AJY4ylANP/Al/UsrWuvYlT/EU+rE6+WyypSqQv7ppx+EMUsksC 9/6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=hktkQ8e02XAmCHESfpaCyX2Rd3CJA7zbCGndca64RZI=; fh=eOziKcNq06JwcHeIsHUzECVtKTDzbs0glotKcUnQVv4=; b=wM4VDERZ6kUqDyPrQAQhRkKRLCCXgR5+fD60F/Fgcrsk6gQHhRoWeI1xXZGYQfNYVq Kgnt6RtAaxEwyNUNSxHUJ1Lc0K8U6mq7GH3bigroDN3qVzW+NdoQk7xcmwzVmmFix79j yi8tiU7hBRh9bBdwHTyNNaxc4EBzGeZxa31W4PulCZvMpDmTvNwycsW6JFHbj4OO0a3Z AOxR6dZ5Jqsr+1K8cYiuGyqWKUHlNoz0A8xg9ZvCJn8rPJaucGCi0gcEFNszG0dTcSru OgePRglaVtLTDwQcz8+9Jeb/dMI6m+3OCZVIZwxly1q7eBtILVhJLAMfANxwZbpKvuKe as4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gjqL3T2x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id t9-20020a170902e84900b001b8039317cesi4484150plg.301.2023.10.04.10.19.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 10:20:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gjqL3T2x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 8DA3F81B5AB4; Wed, 4 Oct 2023 10:19:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233656AbjJDRTJ (ORCPT + 99 others); Wed, 4 Oct 2023 13:19:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233674AbjJDRTI (ORCPT ); Wed, 4 Oct 2023 13:19:08 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8C559E for ; Wed, 4 Oct 2023 10:19:05 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19FDCC43397; Wed, 4 Oct 2023 17:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696439945; bh=hktkQ8e02XAmCHESfpaCyX2Rd3CJA7zbCGndca64RZI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=gjqL3T2xDqdV4NtxF0Ius5ZzqObjYEqWFrBD1tm+E83UkL9Y3tyiZybLdYlaa+oTT Z2ZPYoQRaV3LAD7RfO77yArupx8PgjJZau0sRzPrBz/sFHs0dlEFONqpiDaxnVHYRB gdzgwBQN0rciUnaidlAXj6pllXqrjAbsppJbmojVOsQqOM1gPiIYsg/MPT52qV7R+o SqpHeB8iUdFbLGa/KReWMX2Di/3b9evEtyvy+HTPF3G+Ebs6OiAYhH/Y7Zlq1lYhQG 4JReTy2RoMkOGDWMvJOMrV8l+R5CykMdXPaQJ/4zD6LVuoGPV00qI8/2DQdTkK5/hz sbqZQid26XmGQ== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: =?utf-8?Q?Cl=C3=A9ment_L=C3=A9ger?= , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: =?utf-8?Q?Cl=C3=A9ment_L=C3=A9ger?= , Atish Patra , Andrew Jones , Evan Green , =?utf-8?Q?Bj=C3=B6rn?= Topel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Ron Minnich , Daniel Maslowski , Conor Dooley Subject: Re: [PATCH v2 8/8] riscv: add support for PR_SET_UNALIGN and PR_GET_UNALIGN In-Reply-To: <20231004151405.521596-9-cleger@rivosinc.com> References: <20231004151405.521596-1-cleger@rivosinc.com> <20231004151405.521596-9-cleger@rivosinc.com> Date: Wed, 04 Oct 2023 19:19:03 +0200 Message-ID: <871qeauwzc.fsf@all.your.base.are.belong.to.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 04 Oct 2023 10:19:56 -0700 (PDT) Cl=C3=A9ment L=C3=A9ger writes: > Now that trap support is ready to handle misalignment errors in S-mode, > allow the user to control the behavior of misaligned accesses using > prctl(PR_SET_UNALIGN). Add an align_ctl flag in thread_struct which > will be used to determine if we should SIGBUS the process or not on > such fault. > > Signed-off-by: Cl=C3=A9ment L=C3=A9ger Reviewed-by: Bj=C3=B6rn T=C3=B6pel