Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1597746lqz; Mon, 1 Apr 2024 10:56:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0EPK0TZq89+K/SGBE7QEfoD5xySyqVINhXGcGOnALXBMavPqc8xnCvWxHsuqKBwh746czmikFds7MQIeMypl1fkZ609wynMw5zmapJQ== X-Google-Smtp-Source: AGHT+IEPpPOUye8W7x8O+r9fMcne6MTCKcwS4pT4LKrUhMzQ9tcB0G8TRVs1b05gAYLqeUQvGImw X-Received: by 2002:a05:6a00:cc5:b0:6ea:d114:5f05 with SMTP id b5-20020a056a000cc500b006ead1145f05mr11475224pfv.34.1711994182570; Mon, 01 Apr 2024 10:56:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711994182; cv=pass; d=google.com; s=arc-20160816; b=fhWH14BLkMuzpSiRUqRozXEKZEo7TNAa6qGOWTr/2PPGwuoyv7cUeI6ctGfLq9qNh+ vLptHGyXiZ1hWC3OxNCUG7rcfry+HHZrfkzCCh+Bz94cHQzu6IvtwQqhdIWUj0R/fe38 P8lHfRdagbx2SNSiEe458QCSVIgnKFxiLPGlhD3xE65ACIOYlNO79qSJBInuXnus896b gmucxEt83BL58uKPf19GDqmOdGDtLYEm5pSs1Y6Swlh0MIwI01RoLsSC+zcWrUNsSy2q /hLv7mFJgC8t6usMd0sqLtjBvxBcpDdYikcL6+s2T136VYF/eEadcAcGtO3XYzhLCoud Na9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Ayg8yEodnyIkhrNKh0vWxZ555hD22ZpFvhWL8Rikvao=; fh=4kNrOjSXRq6aKzFeg38bVT5jIbLpo5TUuYH026JxQcg=; b=ehGeZVTJqKFJL5XflIPaHV1SE/evOdNMmo72QqRZLh6goLAPVOnm6k6ldkw1IwqNU7 4z0Ajg3TvWzMdR0s+dkqy1bwIQ2k+bqpbGKWZrpPsJNI7AJBgRt9uUGRIC5QvGYtAtYx 0W68L/AOTgnbES3IpIMaW/fMvLboOziSN8GE6NfBCAWg8SdCTQ/T2Y1n+9htqcRqvM1D 4LflgNJVNcNWiBsPdl88G3Y8EAXye5Eb5OSW5aFvWpXACCyx+ALLCRGWODNiF0lKKuxb HtYYnGa2l/gciJvN2dgL8MQL6HTJ616C+i/NkIdx+0x2+wB/R7cNhwZleEa0uiOYzzDe cIcQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=La2OO3yl; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-126926-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126926-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p14-20020a635b0e000000b005d8505c96e1si9271232pgb.423.2024.04.01.10.56.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 10:56:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126926-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=La2OO3yl; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-126926-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126926-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0E3AC2826BD for ; Mon, 1 Apr 2024 17:56:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A3EE04E1D5; Mon, 1 Apr 2024 17:56:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="La2OO3yl" Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBC201DFE3 for ; Mon, 1 Apr 2024 17:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711994170; cv=none; b=gxQZLgtQXNxzUGcGcmuf/jHiUH8okXGUEsCA9O8cgWs2D48BlkS+ZB02922EI6tZ5VrCExrwRzGIrb2WQDM3qZJr0AL14McjhJYrDTFtyAeZgfnhKKae67UzVHC25ifIjX7ntxBGvhB8f/6dO8HRMepQpDLbU5jVU9rN7SAqSDM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711994170; c=relaxed/simple; bh=fJ3mDYlOFdsxP5e3NSHYMyBrX3fsoPQq5tmWrO4oCpg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=siqZ6DSlAAl8Z36iF+s97fXZjmkGKP5yFJnK+rojJhAF+/fKB1tiJ7PavZh8z7wyx89z+TFoYI92PIyUQ9e8tTXZNk+mXoPsiBoIfV7iXi4/SYwUZoE1hah48NOcPjlngfjOxFbW9VJmVZgab/lvzbAoSeMiuqZRGLqHWkDU8kk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=La2OO3yl; arc=none smtp.client-ip=209.85.128.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-6143fd4c182so28966657b3.0 for ; Mon, 01 Apr 2024 10:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1711994167; x=1712598967; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Ayg8yEodnyIkhrNKh0vWxZ555hD22ZpFvhWL8Rikvao=; b=La2OO3ylCdYIFPVA3jXXm6oenj1aweY8q87bO0Ib7DBSHhMrxT73tScAvjg9KbUwW0 518LczmaGyah+E4JgHdbyxSrUF7++zrIMRmAz3vwvAKSPtw2Xyj1XUXZVGCMkv4JHUsD YjJdUKFNzF69ThurIJ5lf/FkYzA7dtzXcvQ1g5e/pesIoj6hyrQuRQ048q3QvC09HO3R eUWrQIxib3Byc4A00Ravnsuxe+AwBFz8bDbgl5CnoMCMthovkO3h7GIztw2ZenYFjvJr ThW8Vd9nQVB5AcrRvzh/ynAwsYoStF5n6zoone9flnGkSMCOasQth32PaBDuBu1OLGzs jBmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711994167; x=1712598967; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ayg8yEodnyIkhrNKh0vWxZ555hD22ZpFvhWL8Rikvao=; b=TcuTmYBW+iRCbNeB1LSa6J0eLvKSiC6hNtkZFD52THku+OxtAlNXmuCsMX+Q1U4DQM sVy8kirGHtkQQW1g7ojuKP+9d//y/ZDU5YZhBFFy3WWvaiaizcGhrOgC7/PGVKCEKtta L+PZNmF284MUZ/6tLbjAc5HNGy+EUlnJyurXp4Zcd6Yj+OUmA5ZIZ3+2riUkGpAXN6gX kSilep7yJPUAnRxmNrgxRKGBMXKmIpJA6vFSv7Z7xpK+cibwxrIzgo4t9qtj/zVXaTKY 7QeOQWkNDOgYStHab8bQwE5MJg/QFayZgjU3SeohJUMklhGbUY1BMwsBeJ8xzVWAE3sr hJ7A== X-Forwarded-Encrypted: i=1; AJvYcCW8bNa9wjGTO/lIxEvA3ACNA9hyhi4Q/arrKlRqASKWoJ7/f5psacau2/8jhnsjKXRGp7hbXu5oLdgWFMVrrlotp/AMC/7mSfq5BKXA X-Gm-Message-State: AOJu0YxwL/COvt37PUnVAFWjkeuUeBorFVRg3sA7BPAFvTs8AD0CvyVG pez3xkqPCQTVWxfLeXBVRvGO+VtSagERTkC71CuMLvfxFAdNnXcC5aly1eHTR7KDRDW+k9ry5ps sJgucQ5q+ZRgPJQi2hC0LP06h7k56cGts45/gBQ== X-Received: by 2002:a0d:c984:0:b0:611:a5b:337f with SMTP id l126-20020a0dc984000000b006110a5b337fmr9528979ywd.10.1711994165573; Mon, 01 Apr 2024 10:56:05 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240329044459.3990638-1-debug@rivosinc.com> <20240329044459.3990638-28-debug@rivosinc.com> <4b38393a-f69d-4a77-a896-b6cd42c7edcf@collabora.com> In-Reply-To: From: Deepak Gupta Date: Mon, 1 Apr 2024 10:55:54 -0700 Message-ID: Subject: Re: [PATCH v2 27/27] kselftest/riscv: kselftest for user mode cfi To: Muhammad Usama Anjum Cc: paul.walmsley@sifive.com, rick.p.edgecombe@intel.com, broonie@kernel.org, Szabolcs.Nagy@arm.com, kito.cheng@sifive.com, keescook@chromium.org, ajones@ventanamicro.com, conor.dooley@microchip.com, cleger@rivosinc.com, atishp@atishpatra.org, alex@ghiti.fr, bjorn@rivosinc.com, alexghiti@rivosinc.com, samuel.holland@sifive.com, conor@kernel.org, linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, corbet@lwn.net, tech-j-ext@lists.risc-v.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, oleg@redhat.com, akpm@linux-foundation.org, arnd@arndb.de, ebiederm@xmission.com, Liam.Howlett@oracle.com, vbabka@suse.cz, lstoakes@gmail.com, shuah@kernel.org, brauner@kernel.org, andy.chiu@sifive.com, jerry.shih@sifive.com, hankuan.chen@sifive.com, greentime.hu@sifive.com, evan@rivosinc.com, xiao.w.wang@intel.com, charlie@rivosinc.com, apatel@ventanamicro.com, mchitale@ventanamicro.com, dbarboza@ventanamicro.com, sameo@rivosinc.com, shikemeng@huaweicloud.com, willy@infradead.org, vincent.chen@sifive.com, guoren@kernel.org, samitolvanen@google.com, songshuaishuai@tinylab.org, gerg@kernel.org, heiko@sntech.de, bhe@redhat.com, jeeheng.sia@starfivetech.com, cyy@cyyself.name, maskray@google.com, ancientmodern4@gmail.com, mathis.salmen@matsal.de, cuiyunhui@bytedance.com, bgray@linux.ibm.com, mpe@ellerman.id.au, baruch@tkos.co.il, alx@kernel.org, david@redhat.com, catalin.marinas@arm.com, revest@chromium.org, josh@joshtriplett.org, shr@devkernel.io, deller@gmx.de, omosnace@redhat.com, ojeda@kernel.org, jhubbard@nvidia.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 1, 2024 at 10:34=E2=80=AFAM Deepak Gupta w= rote: > > On Mon, Apr 1, 2024 at 2:48=E2=80=AFAM Muhammad Usama Anjum > wrote: > > > > >>> Signed-off-by: Deepak Gupta > > >>> --- > > >>> tools/testing/selftests/riscv/Makefile | 2 +- > > >>> tools/testing/selftests/riscv/cfi/Makefile | 10 + > > >>> .../testing/selftests/riscv/cfi/cfi_rv_test.h | 85 ++++ > > >>> .../selftests/riscv/cfi/riscv_cfi_test.c | 91 +++++ > > >>> .../testing/selftests/riscv/cfi/shadowstack.c | 376 ++++++++++++++= ++++ > > >>> .../testing/selftests/riscv/cfi/shadowstack.h | 39 ++ > > >> Please add generated binaries in the .gitignore files. > > > > > > hmm... > > > I don't see binary as part of the patch. Which file are you referring > > > to here being binary? > > shadowstack would be generated by the build. Create a .gitignore file a= nd > > add it there. For example, look at > > tools/testing/selftests/riscv/vector/.gitignore to understand. > > It's `shadowstack.c` (a C source file) and not a binary file. Nevermind. I think what you want me to do is add a rule in `.gitignore`. I was thinking otherwise (that somehow you're seeing a binary file in patch set). Thanks. Will do that in the next iteration.