Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3439371ybd; Fri, 28 Jun 2019 08:38:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxivB2b5pXCvoJuc8bfcw0dAAC0S1ZPg6CWR0qJn/qIMzz062LFLaifnz6s6ho/+SCQpaFS X-Received: by 2002:a63:b10:: with SMTP id 16mr9655272pgl.336.1561736295070; Fri, 28 Jun 2019 08:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561736295; cv=none; d=google.com; s=arc-20160816; b=claHLu644zuMW9Q+6WKcyXjtnnqhryOf2V8wCrr2ZsDEpAyeQNuQx4/gb0ZjOi9V3u E3GsZDQgeWppzBaQdRM+0z3mLQ2VfaL2gO8rY4sa5d9k9qboe/H+jw1JyXMyk3wWupgh rKhBGJF1qBlUoQOj4nd1AmmFV1OsnqTOC5opjSzoRQmijS1YkebSy/tputMgoHRCB3JI usiGftzJiR+j0Y3R3uGamJcJlnsSBHzbgcum5cMHHXdluj9UDKwTAmeXE6KhCqeRSBbl Py1TBYwM9KCwthEVq5Wruzx1ffjdWrlzNlEFj88YpbM0RfPj7eDI6iS5ze7+1FCm86Xf yPPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=IUj3ptRMzaukymG+xceLi+gsEHWFcj5E/f35gnVJiSE=; b=hDwNV749c0KH+YdIczoN8cC45HCrPAK7J8uBv4usPhVrHKJSqjQwWIhXJA/zh6E7NZ AGSrMw93WsWXI9G6BdKuK0oz8DjPiv4cyjLVqhTe+trCgJHhKx0nryTosVpR1H90VTiB LV6Y75Dhm+lajoKUlpjTDuwTiBAwUGykemg760Ufw0dItRN9ImiNjrpvZXTZdQTCjM0R NOwOC0y9WEvlXrw8JNvqrs08A7+Ar8BuE7NE9mNFtk7Q/MUo7gXoNlME6wl2n6PmTnmU x+70Pc0ieonpkfJBNVwdJYRLPFDFx0CouUnR/JEYYELiIgZcVhwbRYrxbO5GO78MAskA HpJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LJq6pJ+F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6si2428416pji.71.2019.06.28.08.37.58; Fri, 28 Jun 2019 08:38:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LJq6pJ+F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726894AbfF1PhP (ORCPT + 99 others); Fri, 28 Jun 2019 11:37:15 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:46454 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726657AbfF1PhP (ORCPT ); Fri, 28 Jun 2019 11:37:15 -0400 Received: by mail-lj1-f195.google.com with SMTP id v24so6405763ljg.13 for ; Fri, 28 Jun 2019 08:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IUj3ptRMzaukymG+xceLi+gsEHWFcj5E/f35gnVJiSE=; b=LJq6pJ+FrT6Gv82x4QXduFV77cTjQbB0oF5ZelSpGngVmQZIWBkK+tNce2vAkN3yGW yG58ptcbjt6t7b3pngIv/PNhsx0DUfkDKD6Kiza6UfxgQqEFNWIYu2ZVbbk5bt9ooGCr hM/jGbpLHEUjLxKXO92LlkL32Wtsy9dlxYLPXwpxuFrzodwOxAVjAuhuIuYDRnIHPG9o 6ZVNfjlofvde1mOsE/p4O5yAmfSSEIjKRtWIoSfp2bricCvYt3Vf0XIJoCqRtU8h+Xj+ K+3GRH+4gO63296M6vs/fuinRrx1vR01PN+1FY1WxytzfzhFVFrkZTBI32ntJ4aYINEn 6RRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IUj3ptRMzaukymG+xceLi+gsEHWFcj5E/f35gnVJiSE=; b=L5Pn8Rm3FaVDNz/fm6L8ATkjPLiZF5NFdBM35ogoeQp0p6lTAMgl48E8qa4cVUMzQT sp91UYo1p/Xkw97Ajic4tp3RQamgPn2tIO7+khpD0ERta1Xi9xzmGIon4z5s+H7yFgfI oHPU0wzhPgzLftLD4e6g1oXKCNdTqk5hY9aBK3tEAhr1wE7Aq8iszMQpUTNF07OyVsRM rJrziiXd+QumBKeRPUonS3wpX0Da1S86UvjLYX3VNUWjPO+/kSnclPcrctTKBVN0b8oG /0Vb4tr+AE4JaDEpYCBDsu8PGCpOWwe8vffm3eCAAP02oEktosSYkLEbLaV8UEn4kccV y+QA== X-Gm-Message-State: APjAAAXS0n8d5wKuAuqCRI7y+z2hxiiXaVn+6hKCnjSpFiqhnVYy4ZjH jkut7KwoyuvYb/GrpoXBc/sU8nIn9nvRgog45fk= X-Received: by 2002:a2e:9dca:: with SMTP id x10mr5185206ljj.17.1561736232869; Fri, 28 Jun 2019 08:37:12 -0700 (PDT) MIME-Version: 1.0 References: <881939122b88f32be4c374d248c09d7527a87e35.1561685471.git.jpoimboe@redhat.com> In-Reply-To: <881939122b88f32be4c374d248c09d7527a87e35.1561685471.git.jpoimboe@redhat.com> From: Alexei Starovoitov Date: Fri, 28 Jun 2019 08:37:01 -0700 Message-ID: Subject: Re: [PATCH v4 2/2] bpf: Fix ORC unwinding in non-JIT BPF code To: Josh Poimboeuf Cc: X86 ML , LKML , Peter Zijlstra , Song Liu , Kairui Song , Steven Rostedt , Thomas Gleixner , Borislav Petkov , Ingo Molnar , Alexei Starovoitov , Daniel Borkmann Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 27, 2019 at 6:51 PM Josh Poimboeuf wrote: > > Objtool previously ignored ___bpf_prog_run() because it didn't > understand the jump table. This resulted in the ORC unwinder not being > able to unwind through non-JIT BPF code. > > Now that objtool knows how to read jump tables, remove the whitelist and > annotate the jump table so objtool can recognize it. > > Also add an additional "const" to the jump table definition to clarify > that the text pointers are constant. Otherwise GCC sets the section > writable flag and the assembler spits out warnings. > > Fixes: d15d356887e7 ("perf/x86: Make perf callchains work without CONFIG_FRAME_POINTER") > Reported-by: Song Liu > Signed-off-by: Josh Poimboeuf I'm traveling atm, but the set looks good. Acked-by: Alexei Starovoitov If tip maintainers can route it to Linus quickly then please send the whole thing via tip tree. Or we can send these two patches via bpf tree early next week.