Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4400195rwb; Mon, 16 Jan 2023 23:46:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXvoXfu58Q0YXf4LOf2NVVCr6kKwSSR2ORFgru3ttTAema/jSjRHfB/KKyLowydaEZMcOtrP X-Received: by 2002:a17:902:eec6:b0:191:35c9:db30 with SMTP id h6-20020a170902eec600b0019135c9db30mr2797090plb.5.1673941578084; Mon, 16 Jan 2023 23:46:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673941578; cv=pass; d=google.com; s=arc-20160816; b=igBqkwIUfR0aPpBZ3UiV9/XfqnmVa1c/03v0LVzx/TpMBkejlNjmVl7XAGr7MFTGXw qUt8xRZ8y9C/RzXIshGlobZnkjGsQUoP3nXx01OrmnAmLuIsw0hSYjazwj7iENHPAEMO w2p2unscAV3/GODeMzOiygMZJ3AT/obvhIlOMw/WzS4f6vewTezeMyhJpTOVT2+2Qzxm XIO8KVsiR/X1qSoVpcOzPzM3tcdc+Xs009tNMk6OYJsnpJjjquJrpeZcjWAZimhvTiXX t+oQUg1IO7DJ+2g4t8CSUSCWv3MIZYz9kuDqwNo1zFkHwtwGXVgmMZYVrat6VUmKB5eu PziA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=24Ss++lBoQmebOrKM2MDp1xR1pDz+ZThcMPNrK9eXEQ=; b=SDy7yEO9rwI3f9f5iDSq5fSlknP7fsHpheh/2jjMlsvO1whKmMbngS5H393df/ji7K swpK7mFuMTKucand4TKM4NYBXQg/g3ftOWukpVAadBv9SLXtl6S1+USoLPPNN7coxP2e t1y7ebp+CPtnqQR090Cq1eJI00I/15WxMdFhASOedIMGcSRDSFSJPWHlBrQdT3lKfF5q 345f2juqC6YM58z39KrzYkuuLOwEiN/wsdbd5znjask2ImDLkaq8XM8uP3m3vDXlYLdQ hP5KNbO4HCaPjh/E6aMpk0xyvDMFa7LPPODGaP5YF2+faS6DTcAM3MczEePVvw+aVKrK ISuA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@meta.com header.s=s2048-2021-q4 header.b=GBy9tctn; arc=pass (i=1 spf=pass spfdomain=meta.com dkim=pass dkdomain=meta.com dmarc=pass fromdomain=meta.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=meta.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020a170902d70a00b00194892b8649si7088390ply.330.2023.01.16.23.46.11; Mon, 16 Jan 2023 23:46:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@meta.com header.s=s2048-2021-q4 header.b=GBy9tctn; arc=pass (i=1 spf=pass spfdomain=meta.com dkim=pass dkdomain=meta.com dmarc=pass fromdomain=meta.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=meta.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235795AbjAQHFt (ORCPT + 49 others); Tue, 17 Jan 2023 02:05:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235116AbjAQHFr (ORCPT ); Tue, 17 Jan 2023 02:05:47 -0500 Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07590BB9E; Mon, 16 Jan 2023 23:05:45 -0800 (PST) Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.17.1.19/8.17.1.19) with ESMTP id 30H70pSx031655; Mon, 16 Jan 2023 23:05:21 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=s2048-2021-q4; bh=24Ss++lBoQmebOrKM2MDp1xR1pDz+ZThcMPNrK9eXEQ=; b=GBy9tctnztzftSSMkyPt9gufif1Qjz4yVD01rwwq7eY5q+NaBk9vUqn9NB2ARYwp6qjx Au5+5TPCUJfP7kO9jReInRIGH/KqaoTT2D+E5GIpVEi292azI4SwiR/ZGlr78KxGcQHS H382wpbXgMcR/i1rEYzxVtqODxcmTqy1X/KyZ/29Y8GFlNzB1bk0aXGaavsJeor4QYJ5 CLTZmQp+D4H9FzSJA0zPkuRZqKcXAAYWvIBg2UYb7Pfh4vRpIU6BrC4L6W4MjE8enRYg yB3qppN3EJP4f07foJH8eZ07lDs7san+grHGInazLL5Gqk7Ozmgg2jc3YNVnoFFlhqv7 7Q== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2170.outbound.protection.outlook.com [104.47.55.170]) by m0001303.ppops.net (PPS) with ESMTPS id 3n3ry4u3xt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Jan 2023 23:05:21 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FTJ9cd2wYWZa6w5Q9Lwen6NU3r8vq7nKF+wA/WCNsvqBlDXJi4/Bg0RhPhJ9WhzpwKqK0qPPpq8HlsRg1xlrtExs/rmbzpCbhBlmXardGhxfUvMWg7QZyL4hCMnh9Cel3srq6EQRQTYIf5Nez5JO32OnO3cGhKfmRWWGF07ybrzuu/ZbQExE8YIf+S4W64MmrKuqg8oPo5dqVTQs/KT7UEuGVXvuHtvVWky8ePwFRRLoBwmOXFFhQDaU7FaIe40iIGilT6Yku329DFIT5d+BS8m7fYoB2oT3MxYB/muHxc5KAz9PopfFB6OUD2dTe0g12LyNfg3xYizRWxmK9SAcwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=24Ss++lBoQmebOrKM2MDp1xR1pDz+ZThcMPNrK9eXEQ=; b=A1X3FULii5z0+pxfhmBgiVQMgem/6wHeEH9sE0AEBKWOGDwHbIzwngTIMQArfs6z3MwPR8HTA9PNWV8G+TupBW27TCytdE8qKrYowk4uN7aDbsYukzTDCyPhqROdp9P6hbaTDQSu2DNhH6PyYdz3FyS9CvWHULSQzDb42ojAiEQRToFzFe/oHPu8WJPHGu8FOvxjzDgJg3ADG2YU22Wu6Oj3dMFXRJ0Pm4BIqkl8U4HmYq3pvWDxN4apBMq9HsDzEufaWuCfUejLkKUxBu4zCcrCFD+zdmiyVWx5vbTYX7mffCaQ76165BwfYGpfjQVtJmw5+oZpdp7u3uQYn1kOMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=meta.com; dmarc=pass action=none header.from=meta.com; dkim=pass header.d=meta.com; arc=none Received: from SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) by PH0PR15MB4231.namprd15.prod.outlook.com (2603:10b6:510:23::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13; Tue, 17 Jan 2023 07:05:19 +0000 Received: from SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::3cc9:4d23:d516:59f0]) by SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::3cc9:4d23:d516:59f0%4]) with mapi id 15.20.5986.023; Tue, 17 Jan 2023 07:05:19 +0000 Message-ID: <1135125e-6b8a-7b75-5f0b-3208f6b6e8ae@meta.com> Date: Mon, 16 Jan 2023 23:05:15 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] tools: bpf: Disable stack protector Content-Language: en-US To: Peter Foley , Eduard Zingerman Cc: Quentin Monnet , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Nathan Chancellor , Nick Desaulniers , Tom Rix , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, "Jose E. Marchesi" References: <20230114-bpf-v1-1-f836695a8b62@pefoley.com> <194f38f2dc7d521375e5a660baaf1be31536be9a.camel@gmail.com> From: Yonghong Song In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BY3PR10CA0009.namprd10.prod.outlook.com (2603:10b6:a03:255::14) To SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR1501MB2064:EE_|PH0PR15MB4231:EE_ X-MS-Office365-Filtering-Correlation-Id: 60381fe5-c25b-4cb0-52aa-08daf8593141 X-FB-Source: Internal X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: scCXCikE2w/OET8JsG5HhxXwoI2JkuVZrukSfn+ELXdXXsdw34dVDuwZbxnBu6eqyqLJDmK1Xqk0lFPj1EyYyiXp1p+CCrMGkreg2eP6vQ0iZCx1VQW8hCGSecbApYn5zteUfLla4v691baf6t+U9bWjRVSNlbvhbPkEMo8UANdys+Iv7V4JLoRRhaVgAB54kRmYgOg+W2XLlRB4DxKgQSFQBsB1B+zWMo8A85Uaf8aNM9XMvgJanFTmbmgpyJwnAduprl/aRQemic3vECvSC/G451KhEHXwuIpGXaKfe+orgHoyqxO64XHtNMfgXxHn5RpkGGYiWGkHfaoiC6p9xmmFWG0wVaVWgyfn4QGX40aimjjIDee6zqX6ovAv1tyjWWxWISv73+joOvHOwKHU1+I/+gw7fblkU5edoTPW5qIJCvBtBtyhnyK6wl/RW1b2CQQirUqiWmvkl2Q9g08dgm4STWgK1hrzUTmYUr41oFVlgqaWx1ZrVFcNd0VyJzYs8N0zorHRZxyMxJW4N8J5rdr10HbI45NlEFYFXO1mXSSfw9qZLwNSa9BWe/bbeUk9blsUjCCffRPn/MmECe42jOyZxRpuPkzp4M+MpgCuT2SdqiYkNdbfSJ7MUuABn4xH8pqHjn14NTVq+enAIwfbxmcrh8xQ29+eg8Ucn13eNr/fqli2x7GL1B+i8hE2qKgU8N17nmyICRcWWRBJM6Djde/fa0yvGDKfiVSYPDlZe1M= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR1501MB2064.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(366004)(39860400002)(396003)(346002)(136003)(451199015)(478600001)(6486002)(41300700001)(6512007)(38100700002)(66556008)(186003)(31696002)(316002)(110136005)(54906003)(2616005)(86362001)(66476007)(66946007)(4326008)(53546011)(5660300002)(36756003)(6506007)(7416002)(2906002)(6666004)(31686004)(83380400001)(4744005)(8936002)(8676002)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dldEVzFKOG11S01IUmJLQUM4Y2Q0MndZVzdFbVppZmJRQ3AvQkh5VkV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ZsVGYwMURQcUw5MW1FV1hPa2dRUCtVb2w4Q2w2YUNJQlYzWktp?= =?utf-8?B?ZWlCNGphbSsyM0xUWkw0TzRuSFI2dytiSUZrcytwM2hPQVdTK3ZqaFczclVu?= =?utf-8?B?MitRRlhxNnFHNXJMREJjL1JjT3hqTk9wUnJUazhJNWhMMFF2S3h1T0hwSnp1?= =?utf-8?B?MG1OUEk0cjZpRXZrUHUzd0V4VE9jRlV3a1IwQzNPRGczQlJnZXZyeEprSEtu?= =?utf-8?B?WFhXTGxXSFhNRCtjWXpSKzR1SWtPZDdOZk9jcWJIS09pdEpsQWlQRVFEU3Ru?= =?utf-8?B?R0FlUGNTUDVnTzhyMHU4cDdCaW9SdXR3M1hHRlRwSW5DS2RlRUJsMHpYY2hL?= =?utf-8?B?Tmc9PQ==?= X-OriginatorOrg: meta.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60381fe5-c25b-4cb0-52aa-08daf8593141 X-MS-Exchange-CrossTenant-AuthSource: SN6PR1501MB2064.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2023 07:05:19.0519 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: acareQfEaETFbs0JCZ7fWpX9eD7DPEYBdpn9hGSFUi59gSqGmMgsaJS1mYC2VuS3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR15MB4231 X-Proofpoint-GUID: dzsUfWbzq5L0Kq-ULK1-Cdkmw7YGc7Yw X-Proofpoint-ORIG-GUID: dzsUfWbzq5L0Kq-ULK1-Cdkmw7YGc7Yw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-17_03,2023-01-13_02,2022-06-22_01 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/16/23 2:49 PM, Peter Foley wrote: > On Mon, Jan 16, 2023 at 4:59 AM Eduard Zingerman wrote: >> >> A bit tangential, but since BPF LLVM backend does not support the >> stack protector (should it?) there is also an option to adjust LLVM >> to avoid this instrumentation, WDYT? >> > > That would probably be worth doing, yes. > But given that won't help already released versions of clang, it > should probably happen in addition to this patch. Peter, If I understand correctly (by inspecting clang code), the stack protector is off by default. Do you have link to Gentoo build page to show how they enable stack protector? cmake config or a private patch? Jose, How gcc-bpf handle stack protector? The compiler just disables stack protector for bpf target?