Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1241469rdb; Wed, 20 Sep 2023 03:59:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFy2cLVn5kg+taxlTj2y/7uIdceh7aULZqQsG768R4ZKuC2q2CWq6Zgm2XcakIQfjfBfJOm X-Received: by 2002:a05:6a21:18f:b0:157:64e4:4260 with SMTP id le15-20020a056a21018f00b0015764e44260mr2961583pzb.9.1695207555631; Wed, 20 Sep 2023 03:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695207555; cv=none; d=google.com; s=arc-20160816; b=TP0bu4KKmEBGqshpZ5zDOYTpFhoUX7VBWvNjtL5xnCVs2loSjmt1m49fqtxhROaDZU /TTepfDsZmpmEzVoZvA07v9Jk0YJGt9ztrz0yHAuFVtM29NDB8eNFzJ0YdMOafHmGfER YaLYWou/jQZA1bi6Yx51RtQ6OUaNFxHbjKuPNiHdiMg+tV4MlX0KjKxAPHHH51tSgDLJ P4A86bCy78a1mQnUcnfV9rBlL25l/Fy9ivBNss4qKkQAAASonsnW0i3mwiec5mYixDG8 DNSCskzmYkjAB+05lBucxNrMcIcU9DJPvSXyWAqfeWztfacXoevedi8hh/uTwR1sf0uF t/pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=JuLstdULL+9O12ksEVrhOrE8xohHCriozL2R7kr9wsU=; fh=o5BNXZP4TG0AvgpH6jp/abXnE246AMwxQ2zk4qfLOUM=; b=fOfImsNHwWMpVDTyJqHwFAgWLQhHTJHj/xHkBTKof8Hr5Y4VTefAy2AFsT1uVTRxxm EEX4knWsqtFYEH2UE1Vpm99IfqU9hsJjPvxSSNkMusT76NZf28eb02I2YDEyqn7P46+c S1RzXtMBTdzUkw+lM7VR3NbRdXxlBRiTJ3RbFKR6GHVTCPe6Ohj6+FEL1SXIkhGdSaWL iv8igp9y1Qz+yJdTTZG0Rg4Oo0OBCO1jC0Jz7Iu36QlRvZxNwdDh/u1xcRkbm62+dSbH KkJQhZcFWgJPwm8FbupKSOWKiun+mN9DiurukNXQKqgr/nZm4+WEjPvtIZSXtLdxIrZG OMuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MWPgFZOK; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id pi13-20020a17090b1e4d00b00263638bb354si1420576pjb.93.2023.09.20.03.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 03:59:15 -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=@gmail.com header.s=20230601 header.b=MWPgFZOK; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 74C2E81356AE; Wed, 20 Sep 2023 02:58:49 -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 S234238AbjITJ6j (ORCPT + 99 others); Wed, 20 Sep 2023 05:58:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234319AbjITJ6f (ORCPT ); Wed, 20 Sep 2023 05:58:35 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 388F2F1 for ; Wed, 20 Sep 2023 02:58:22 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id 4fb4d7f45d1cf-5308430052fso6644385a12.1 for ; Wed, 20 Sep 2023 02:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695203900; x=1695808700; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JuLstdULL+9O12ksEVrhOrE8xohHCriozL2R7kr9wsU=; b=MWPgFZOKpyi90rllEY2JHAETeGoUbT9EwaY1cgFARFZacloXrQMpgwBm6+D+8P0tOa vucBv3fFrC2G9irFnNxCPYuoHbaCBBWzEseAbhY/5kodqVNFNR+xH5KFnE8OKY5nP5mB QRFQZ8VG4F6d+Yc761JnYH1qEgKyv19uaQs84WIrOfuUVDehhqEJTyQoGMTPGmUpWb3R VxjHBoL5USKoscbmICDZTxhBCbYRWfVckbiAv9trlglIAVxI/V8kRFSm4S22x3Uf2Wgl bgCYpVpMivzxE8j80fGlLZ+P5oJDCN8bG5BuxFbLLnMMQS/XZoTWig+0+5/H0B4Fze2h XwWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695203900; x=1695808700; h=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=JuLstdULL+9O12ksEVrhOrE8xohHCriozL2R7kr9wsU=; b=XJlMu+vtrG2iPR1m/ExIcrznvkCqPsLd8HVz5Xs+nfrrh8dzyg9ikQIw2EwoJaMwvA JPOGyAtNqXo5DCtpFeIb11SBjTb0S3FP3Ka+xDg6LQ8kry2fsrBFcjjw0iaqVq+jlzzP u1dcE80BvKd3TmvJ12rXgluE2pR4tLr9LAVM3Pb/mX0JskOUIYgYIwfaJNaJ/koD0ypD lcrmnOOPZZ+jNPcCxqj5wWdnX6Ja74r+2S2zaoZL29nEHYoJ89wJx5bM6JnNObxk18tw a8n4eUYTj4j3EEaiTufwxptjRZzTW2u/0Xa26FSR5m8Z6Jja9WrP75ysCJlWxp2maWMa n8cg== X-Gm-Message-State: AOJu0Yw4PgGtU0jyCvBjqf8vHGrHW7U8LP1d+I3eytjEP9hYQutudSlR KFSh2j0grETkSIDrawq62ZijyOo8LOc9nKPOud8= X-Received: by 2002:aa7:dace:0:b0:52d:212d:78ee with SMTP id x14-20020aa7dace000000b0052d212d78eemr1591973eds.25.1695203900414; Wed, 20 Sep 2023 02:58:20 -0700 (PDT) MIME-Version: 1.0 References: <20230920041446.300415-1-koba.ko@canonical.com> In-Reply-To: <20230920041446.300415-1-koba.ko@canonical.com> From: Kumar Kartikeya Dwivedi Date: Wed, 20 Sep 2023 11:57:44 +0200 Message-ID: Subject: Re: [PATCH] x86/arch: Fix access invalid member when disable CONFIG_UNWINDER_ORC To: Koba Ko Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, Alexei Starovoitov Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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, 20 Sep 2023 02:58:49 -0700 (PDT) On Wed, 20 Sept 2023 at 06:14, Koba Ko wrote: > > CONFIG_UNWINDER_DRAME_POINTER doesn't have bp and sp members. > this leads the compilation error when only enable CONFIG_UNWINDER_DRAME_POINTER. > > arch/x86/net/bpf_jit_comp.c:3022:72: error: 'struct unwind_state' has no member named > 'sp'; did you mean 'bp'? > 3022 | if (!addr || !consume_fn(cookie, (u64)addr, (u64)state.sp, (u64)state.bp)) > > Fixes: f18b03fabaa9 ("bpf: Implement BPF exceptions") > Signed-off-by: Koba Ko > --- Hi Koba, Sincere apologies for the build breakage. This is fixed now in bpf-next, and I believe it will soon make its way into net-next and linux-next. https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=5bfdb4fbf348f9e1935a6e9c64e7f60cb913fb21 > arch/x86/net/bpf_jit_comp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c > index 84005f2114e09..db2b09949d407 100644 > --- a/arch/x86/net/bpf_jit_comp.c > +++ b/arch/x86/net/bpf_jit_comp.c > @@ -3012,7 +3012,7 @@ bool bpf_jit_supports_exceptions(void) > > void arch_bpf_stack_walk(bool (*consume_fn)(void *cookie, u64 ip, u64 sp, u64 bp), void *cookie) > { > -#if defined(CONFIG_UNWINDER_ORC) || defined(CONFIG_UNWINDER_FRAME_POINTER) > +#if defined(CONFIG_UNWINDER_ORC) > struct unwind_state state; > unsigned long addr; > > -- > 2.34.1 >