Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1776568ybk; Thu, 21 May 2020 15:12:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6HTII4EfG4KEMxPhJKYz2Mwyl0pSa4JIWO0aWAE9FRgyCXUh5JvuSvi8EDToPgsHfg/ZI X-Received: by 2002:a17:906:4a8b:: with SMTP id x11mr5378955eju.107.1590099157222; Thu, 21 May 2020 15:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590099157; cv=none; d=google.com; s=arc-20160816; b=CWxsnqM5P/lwjiTm2HPwjytY5BlIXniy5qIHPGI+D7bwtdTZ9xT1A6IVy/9soVlhW0 isdt2I+9/1/UJDeIniG2u5SVhAnkxhsFoZ9WQeUog2BxtRog5sTt5gxwuww07sQzjYQL SgppBn2cA48nVPIFO71Z49sSvJTgToUC7Hi8SgKC7Fi8+pRbI0pwTTGbdJfGl7JBq4PQ o1db/meNIl0MujcKicj5JZI63yo5mhQAHteOoUdfKue2MWmEkbslmEtuxpSjlWvR0eSv Nh4Kp+JMwWbrOGuGMtxQ1ZufB0QHgeUr0Rmy35PIs52nf3QjkR8M1lQVpG90eesolQLG uVYA== 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=cY8bWJYAziC6DykutTES7fh6tr7JoLymaKn0aTQJgAA=; b=qNeR42jSbUf2jQp7FcD7l+rNhJ6Ms/KL+xachboP9zL5Rv4nYtzOp8XYfbq6FSGUUU SfWmjw+5VLY80d5pr2fIBsAp1uoF1v0Cud+Y57hNBauuECGvvYNmEOqB+syqN/SRM9rA X0ip2f2lZXCqoGauhZClG/kTnOebkkcX9xuU3Q63asldD8k53H40A1B6yZOq4irB11TE CdPpZaHaUpZRjrHu9SWyCsUW9oL1SoT3hV1YEnzq5Hyvcn3vFE21JtOMxcnxARcv1+Nx lrTnU1zgIcc0Rt3dOQpbKETd5Srdp9RLDPiRYzjZHFff2Huz+DgfIpRniG8t0UwgyG74 mavA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oZBWHO6M; 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 ec15si3940471ejb.286.2020.05.21.15.12.14; Thu, 21 May 2020 15:12:37 -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=oZBWHO6M; 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 S1730679AbgEUWKv (ORCPT + 99 others); Thu, 21 May 2020 18:10:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728701AbgEUWKu (ORCPT ); Thu, 21 May 2020 18:10:50 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70688C061A0E; Thu, 21 May 2020 15:10:50 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id n11so3428006qkn.8; Thu, 21 May 2020 15:10: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=cY8bWJYAziC6DykutTES7fh6tr7JoLymaKn0aTQJgAA=; b=oZBWHO6MlDik/xfnpMWKRcWYwij9zTcWmbH9JuSmErAy7WB07e1TiF4dmrbYGrUrqE qfRPZudJxSJMEBbPTN71bDZdMWPCrJkbvu8G7XGoSbB0Kx34lsholiAsXcWwqN10JtAU iOCFxhlFjbpIHLaFaQJOBJAm68LmJFbPxQgZuVSKrSYMQSv1COiw2SUduvBiHjvsxcll SIQaO4hysm74vwz4ag6lDgfbljYQ6gTEO0Fln/KDw5G3EyoU4W7ba+OEbrCIfHydiwYn pXBLSiowmepxk4ogSoo4Ab+GKnE6jOcIyJP+L+T59F2DnNwEODLueAcdNSCaAW5tjuuP lBTg== 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=cY8bWJYAziC6DykutTES7fh6tr7JoLymaKn0aTQJgAA=; b=Iqwnql0sBCYQt1OKGCkBTzWU9dAPGEizA1ZYNv8/EOhJKWrYc3s8FETsQmO+1m2doJ ajvFEHK/IMMuNPL8j+Fyn4OkhKQDQpSdSVMSg8GdyR/o/6uZVjNizbkIbgvyNyYfaZ20 EeaBSEbO3zK13Y6hShEQ9LqrRRLaXxDlRwlkfdXwtB//o77OKHyUJy908AbESx2dHK1d 8gbCtIyzKBqWe0Bx2UvPeyaom2ACT4TpYB5kJOguFS5xc32L9HIc4wWQWWo5gavq5Lbl 21hGx+dA+EqbEVNsBHieTYwXDwPyonVSbmO5ZsXkMyK5bwCpj7+DrIj3OEun5+OADQ2v mr7Q== X-Gm-Message-State: AOAM533Sx79UpA27RUtHfZKZs/fLVMcdIHdsAT0D6fA52IcY5DL+/t4P BEVKaJrBgR9e1OQI4kEGoyquZU7vIXH3BxmYH4g= X-Received: by 2002:a05:620a:2049:: with SMTP id d9mr13093079qka.449.1590099049726; Thu, 21 May 2020 15:10:49 -0700 (PDT) MIME-Version: 1.0 References: <20200521152301.2587579-1-hch@lst.de> <20200521152301.2587579-13-hch@lst.de> In-Reply-To: <20200521152301.2587579-13-hch@lst.de> From: Andrii Nakryiko Date: Thu, 21 May 2020 15:10:38 -0700 Message-ID: Subject: Re: [PATCH 12/23] bpf: handle the compat string in bpf_trace_copy_string better To: Christoph Hellwig Cc: x86@kernel.org, Alexei Starovoitov , Daniel Borkmann , Masami Hiramatsu , Linus Torvalds , Andrew Morton , linux-parisc@vger.kernel.org, linux-um@lists.infradead.org, Networking , bpf , linux-mm@kvack.org, open list 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, May 21, 2020 at 8:24 AM Christoph Hellwig wrote: > > User the proper helper for kernel or userspace addresses based on > TASK_SIZE instead of the dangerous strncpy_from_unsafe function. > > Signed-off-by: Christoph Hellwig > --- Acked-by: Andrii Nakryiko > kernel/trace/bpf_trace.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > [...]