Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp647695pxa; Tue, 4 Aug 2020 14:33:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaQ99ajqLpvUMgez5K1jMn0evjDDdnKun3nZF1JHtNhYEqa+iM/fvMB/oqHb7l5j0q3NFo X-Received: by 2002:a17:906:1f88:: with SMTP id t8mr84814ejr.241.1596576781138; Tue, 04 Aug 2020 14:33:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596576781; cv=none; d=google.com; s=arc-20160816; b=LIlWPESf5kX0hyznaQ2aKY9eLK2gXZXZvWd6XnYgJh3CPNreR2Dna5scqherI1viR3 UNA8jGEVvHj/7x/Ssha5vzFnd7/WA3K5j/LW9BT+MjWWrPHwPHQfi1jRvOgLxaG78K7M 2LoHTW0dUTj4rstyCVqa+uJ9WoF14IRg0xOoWifdj+mqhQmxqkNEMDLtAdvopC4Xv95T yEaDSVbYzIKaY8xC6r96n0Ger8G4B/7XTlrFxJPTwUzIykUEL1oOV8NALpVgzVrIqYOf S2d3sfi4/6eZDES+DslYIrUOiEc6/M6nK3m/Lw0OIPh7SV+Ua0Bik6jcGH81ARtJ7DMN wXCw== 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=W3QS3vREL+OGPzaf7RIBdYaJjzMFsT+3SjNXgpLt9fk=; b=pMk6Ufj6GgnJW8KEiY/OZU9XFhGcbiOJaZYNOFFEdGqC7ndlq5P6J6DTX0Myoxm5Lx HLgjxWh1TxKex1Zcb7+mjF2lo18Zhs0B5z7MERQSbX9yl9L/6zzqo++fuwmjmnAPnrko llQvN67q31B1xMyWqOl1UX2WjkoxWP1/5AJGc9o58uptEyPVxW7KvwSIhpCf6R2ireng XP53ZtjHQXK50sh/VNVcwExFbVcRKTu1QlXIr+zuhM9f35yR0izWKWBUgJotKFrtq82x E3g/2fBeK7PgKKE3y46JH2fbp6IJMZjSL8NBKhmSCep/XsgvwV8yriUJQAzyrYDj8laA OgFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mFd5qQ8t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id dk2si12705209edb.542.2020.08.04.14.32.38; Tue, 04 Aug 2020 14:33:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mFd5qQ8t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727968AbgHDVbv (ORCPT + 99 others); Tue, 4 Aug 2020 17:31:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727773AbgHDVbv (ORCPT ); Tue, 4 Aug 2020 17:31:51 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC913C06174A for ; Tue, 4 Aug 2020 14:31:50 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id d188so15372225pfd.2 for ; Tue, 04 Aug 2020 14:31:50 -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=W3QS3vREL+OGPzaf7RIBdYaJjzMFsT+3SjNXgpLt9fk=; b=mFd5qQ8tzzrkgBfDYCuVTkNO0cPUkZsSmxxNqWq2CEkZhOrKXHPHPi3Q+7lzeO4p3e ghXJkQySD5yLmVvD8r7XINHDU10rIvTeenJ3F/KFKSUmslpaG9Re1QTO2JYnvz+hKnAn SmJ0pzmLK43qypzPhgSoOeajmMSCsZ3fctfac/m7m2AagE3KtL0Hv4HTyzl0P+Y6ZXXd 74Oe84MEiP+N0Uf9AezgRySv3yP+5mr/z+HNhYXbO5GNdHtaR2tSeAUuyS997XW3IT35 RztOtlbI6tUbh1LIvWN2TotikdOF2wyLuCfeOfKlusWxStfCI8+++v2k2RRkYjTUG8CN Emgg== 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=W3QS3vREL+OGPzaf7RIBdYaJjzMFsT+3SjNXgpLt9fk=; b=uKJwdeEUVlkXNbPuM5ghDM73jLBsDF6EyuySP3xzDA30PP7AzX2FFaTkTvQB2j7UKn hbK6fbtaYtLAcH0U7ErTcoxLRd97GTcTl8GKdMgBiY/8g5ld9OC032y1AbJfbnjDltiK FpGDODgzhOur62SsyivmDIMiMVPlX9kG8SrvZJyzaVLaNaJF9yuIdyKwixPK5cRriU/G EtlfosCyOV5eJZv3wUJmLfRvcE+S9Xbzv0wfQ13skPsgolFk0cHzczvlE/9ae+Txm4S6 eRZ39fHKOr0m1E1YhOsyE9gFvqPX0F2D2ZgPN5uBbGnARvz2curjf/D/Rbp3pBbIaXQQ dc2Q== X-Gm-Message-State: AOAM53298SX8vGG4qlb+aaBps/W0ICVYyygdvipTXGQr5ZVBi+ilgWgj 0UdRI0J+ParDB5J3IwhGeLdIUmDE7ji2WD/tXZs= X-Received: by 2002:a05:6a00:1488:: with SMTP id v8mr315828pfu.275.1596576710558; Tue, 04 Aug 2020 14:31:50 -0700 (PDT) MIME-Version: 1.0 References: <20200731025617.16243-1-yao.jin@linux.intel.com> In-Reply-To: <20200731025617.16243-1-yao.jin@linux.intel.com> From: Max Filippov Date: Tue, 4 Aug 2020 14:31:39 -0700 Message-ID: Subject: Re: [PATCH v1 1/2] Missing instruction_pointer_set() instances To: Jin Yao Cc: Peter Zijlstra , Ingo Molnar , Oleg Nesterov , Arnaldo Carvalho de Melo , jolsa@kernel.org, LKML , Andi Kleen , kan.liang@intel.com, yao.jin@intel.com, alexander.shishkin@linux.intel.com, Mark Rutland 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, Jul 30, 2020 at 7:59 PM Jin Yao wrote: > > There is a potential security issue that perf kernel samples > may be leaked even though kernel sampling is disabled. For fixing > the potential leakage, the idea is to use instruction_pointer_set > to set invalid ip address in leaked perf samples in some cases. > > But instruction_pointer_set is missing on some architectures. > Define instruction_pointer_set for these architectures. > > Signed-off-by: Jin Yao > --- > arch/alpha/include/asm/ptrace.h | 6 ++++++ > arch/arc/include/asm/ptrace.h | 6 ++++++ > arch/nds32/include/asm/ptrace.h | 7 +++++++ > arch/xtensa/include/asm/ptrace.h | 6 ++++++ > 4 files changed, 25 insertions(+) For xtensa: Acked-by: Max Filippov -- Thanks. -- Max