From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74855C433EF for ; Sun, 5 Dec 2021 07:26:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7FD1D6B007D; Sun, 5 Dec 2021 02:26:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 786026B0080; Sun, 5 Dec 2021 02:26:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 626BD6B0081; Sun, 5 Dec 2021 02:26:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0135.hostedemail.com [216.40.44.135]) by kanga.kvack.org (Postfix) with ESMTP id 4FDD26B007D for ; Sun, 5 Dec 2021 02:26:13 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id EF9CB8249980 for ; Sun, 5 Dec 2021 07:26:02 +0000 (UTC) X-FDA: 78882906564.23.CE3F818 Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by imf12.hostedemail.com (Postfix) with ESMTP id ACE16100009D for ; Sun, 5 Dec 2021 07:26:02 +0000 (UTC) Received: by mail-qk1-f175.google.com with SMTP id d2so8101870qki.12 for ; Sat, 04 Dec 2021 23:26:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zowSszGCjMgYZHdPz1ZCQ1VnEOEblLnUPR7Gj0ga0Vs=; b=H8L2+8nVJ1TzoM56VfiynvmoGFyaKEcyjMd1peEexDpDjB9ClTekh46kJx5dHglpsN LEnfx63YLMZOjFknCW+9ZNJocppmoS3NwNLzYuv7CvaeJvq0RXniwrT+olAZ9h/3aOD/ 8VL6fGXO3kxlVOTdYGfWjhHcWlb/AN0MEBYJ1H+8lrYCxV1yN63EAYVLHaDO1k4OrLQ4 vVQppnxQ5JynrTKFam9ElX1hiZGq1BA6v4jh9D/Al6M140wUyxGa2TtFyVM9On32QaXP rhe+1LJWKyiL9g6Ddc8BJQNrENHUyco6Kyd2O+6yZ7lo0TWWojZGsKlKtFsUy97h2MbY VjAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zowSszGCjMgYZHdPz1ZCQ1VnEOEblLnUPR7Gj0ga0Vs=; b=6IC+UJDwcE2S3ftCtOCeLQ8+THJbsSKljx7v/7Al/hf9MwDwg2kFCiE0OwC1spDLmk XvDX+HyY/OB++P4awnHQlitFvCArrThIbdKsXchJgPU3H75+avKFL/imszQz/Cw4j1VS itYMT1TWAbsM3XUnnM05htywkocLABIctM9sQ99ZqceZ0Cvuihi9/T0iCK83YppYEoqT xsiAVJr6yzlYDtojrBR/CqKb7e/VC/5ctUupTvZ9ILVdU2ZTWzKoEyq2tWhTrCb5DFlX S+ji4a15btoyG4hqh1SmCbdIQOgECC6ycaN+Nr9vX9MnXlwGPQJMIuh1Y2RhrTa/n9Q7 UyVg== X-Gm-Message-State: AOAM533CX4LeKZGgMjFHTew4qR+SgFPbyqiFmObA4QTL/fBZEYRkg2ok 0TcF9v8YbKN2Tym5a9+6F7AYdQnf3F90sJ0o3zM= X-Google-Smtp-Source: ABdhPJxJLKvaTSR4/NERlECHBcz96OgqGrG1jCo7M7WsfQN7m2yL5KJ1ECd+GDH+HUX2k6HIT1BhZZN0LElX5ftUrQ4= X-Received: by 2002:a05:620a:2148:: with SMTP id m8mr26529583qkm.435.1638689161996; Sat, 04 Dec 2021 23:26:01 -0800 (PST) MIME-Version: 1.0 References: <20211204095256.78042-1-laoar.shao@gmail.com> <20211204095256.78042-6-laoar.shao@gmail.com> In-Reply-To: From: Yafang Shao Date: Sun, 5 Dec 2021 15:25:27 +0800 Message-ID: Subject: Re: [PATCH -mm 5/5] bpf/progs: replace hard-coded 16 with TASK_COMM_LEN To: Alexei Starovoitov Cc: Andrew Morton , Steven Rostedt , Kees Cook , Petr Mladek , David Hildenbrand , Arnaldo Carvalho de Melo , Andrii Nakryiko , linux-mm , bpf , "linux-perf-use." , Linux-Fsdevel , LKML , Mathieu Desnoyers , Michal Miroslaw , Peter Zijlstra , Matthew Wilcox , Al Viro Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: ACE16100009D X-Stat-Signature: iig4i8xeh9p3hofa5pcccyg133345bkr Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=H8L2+8nV; spf=pass (imf12.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.222.175 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1638689162-996026 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, Dec 5, 2021 at 11:13 AM Alexei Starovoitov wrote: > > On Sat, Dec 4, 2021 at 6:45 PM Yafang Shao wrote: > > > > On Sun, Dec 5, 2021 at 12:44 AM Alexei Starovoitov > > wrote: > > > > > > On Sat, Dec 4, 2021 at 1:53 AM Yafang Shao wrote: > > > > > > > > static int process_sample(void *ctx, void *data, size_t len) > > > > { > > > > - struct sample *s = data; > > > > + struct sample_ringbuf *s = data; > > > > > > This is becoming pointless churn. > > > Nack. > > > > > > > index 145028b52ad8..7b1bb73c3501 100644 > > > > --- a/tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c > > > > +++ b/tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c > > > > @@ -1,8 +1,7 @@ > > > > // SPDX-License-Identifier: GPL-2.0 > > > > // Copyright (c) 2019 Facebook > > > > > > > > -#include > > > > -#include > > > > +#include > > > > #include > > > > #include > > > > #include > > > > @@ -23,11 +22,11 @@ struct core_reloc_kernel_output { > > > > int comm_len; > > > > }; > > > > > > > > -struct task_struct { > > > > +struct task_struct_reloc { > > > > > > Churn that is not even compile tested. > > > > It is strange that I have successfully compiled it.... > > Below is the compile log, > > > > $ cat make.log | grep test_core_reloc_kernel > > CLNG-BPF [test_maps] test_core_reloc_kernel.o > > GEN-SKEL [test_progs] test_core_reloc_kernel.skel.h > > CLNG-BPF [test_maps] test_core_reloc_kernel.o > > GEN-SKEL [test_progs-no_alu32] test_core_reloc_kernel.skel.h > > > > Also there's no error in the compile log. > > and ran the tests too? My bad. I thought it was just a name change, which will work well if it can be compiled successfully. But it seems the task_struct in this file is a dummy struct, which will be relocated to the real task_struct defined in the kernel. We can't include vmlinux.h in this file, as it is for the relocation test. -- Thanks Yafang