Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp623514pxb; Thu, 19 Nov 2020 09:34:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQvf8LvOTSZ+3jxkz966CWvM0q6+I+AhIo/maAoC9953S3uh6hUjfFdtRz6KhVS2mA6yDe X-Received: by 2002:a50:fd8c:: with SMTP id o12mr3089324edt.22.1605807262402; Thu, 19 Nov 2020 09:34:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605807262; cv=none; d=google.com; s=arc-20160816; b=xIA7s9QD46OCfaji6dUTbkUUGIp9bu+O0HPLFqfE2+GYo6a7YpREZGINI6Jd0T5hdN XvGsuZTbIbEr3maKuAPWXSlb06/ndea1ALX9HLcC2xJ5/xzOpvBIdEQbQrHU7wlsb4rA sPNpwkayOMrw6FdBalPn9tQrWhy8n6owIav710fKxvoNQJvy8rEH8KixgEat6D3z8AlY XIFqwo8uIAXe2XUOe4vi/LKy3K/ZlQRVu1d3uDQwhimvR+yMGHg2Y2+fqavItw39/LpR 0Ce27/sGWT3RWjKgv8/kb2KWHLkjSE3QCLbekhRX/SaCvnaCxHxbPTD7TIlJdjQmdtXj glLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Ze5uy0TjvLyvhbIzJXUeD7r7EhVRoEnrm9FFi2+PEQA=; b=mvZ1Wkhd60UIOdLo2JxF0yEl6oCK0oG+H+YKQzoD/IsRUSMwdBx32fURyQQeL0pzMY rF+YNuWPPqoaqHxrio5EJ5iAVhyq/lAQDAdU4otT8sfse+avJtW255h01WUqfYeWlKl5 kWKCqTukJiXuMuYxMo+vpsPdafoF7leQw87+ow+6hEuJs6uwgTV7BfJVOJgAeHycHr/b HAE+wCGQY+J7Md1fl2ex6nZCCpzePUwvjzQF2dn4t3VgzstDtHrWkBstTn8wWDqogDTa 2v9s3HBBShxTTdj5zR0r5J+Z3mzPcvQkrf2suf3bzkqf1v6BGOnBTtaqpByRu6ovE7ck wLVQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o60si246262eda.61.2020.11.19.09.33.58; Thu, 19 Nov 2020 09:34:22 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728761AbgKSRax (ORCPT + 99 others); Thu, 19 Nov 2020 12:30:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:41080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728255AbgKSRaw (ORCPT ); Thu, 19 Nov 2020 12:30:52 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 888B5208B6; Thu, 19 Nov 2020 17:30:49 +0000 (UTC) Date: Thu, 19 Nov 2020 12:30:47 -0500 From: Steven Rostedt To: Alexei Starovoitov Cc: Segher Boessenkool , Peter Zijlstra , Florian Weimer , Nick Desaulniers , Sami Tolvanen , Mathieu Desnoyers , linux-kernel , Matt Mullins , Ingo Molnar , Alexei Starovoitov , Daniel Borkmann , Dmitry Vyukov , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , netdev , bpf , Kees Cook , Josh Poimboeuf , linux-toolchains@vger.kernel.org Subject: Re: violating function pointer signature Message-ID: <20201119123047.66a22235@gandalf.local.home> In-Reply-To: References: <375636043.48251.1605642440621.JavaMail.zimbra@efficios.com> <20201117153451.3015c5c9@gandalf.local.home> <20201118132136.GJ3121378@hirez.programming.kicks-ass.net> <20201118121730.12ee645b@gandalf.local.home> <20201118181226.GK2672@gate.crashing.org> <87o8jutt2h.fsf@mid.deneb.enyo.de> <20201118135823.3f0d24b7@gandalf.local.home> <20201118191127.GM2672@gate.crashing.org> <20201119083648.GE3121392@hirez.programming.kicks-ass.net> <20201119143735.GU2672@gate.crashing.org> <20201119095951.30269233@gandalf.local.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 Nov 2020 09:04:57 -0800 Alexei Starovoitov wrote: > On Thu, Nov 19, 2020 at 6:59 AM Steven Rostedt wrote: > > Linux obviously > > supports multiple architectures (more than any other OS), but it is pretty > > stuck to gcc as a compiler (with LLVM just starting to work too). > > > > We are fine with being stuck to a compiler if it gives us what we want. > > I beg to disagree. I think you misunderstood. > android, chrome and others changed their kernel builds to > "make LLVM=1" some time ago. > It's absolutely vital for the health of the kernel to be built with > both gcc and llvm. That's what I meant with "LLVM just starting to work too". LLVM has been working hard to make sure that it can do the same tricks that the kernel depends on gcc for. And LLVM appears to be working fine with the nop stub logic (it's already in 5.10-rc with with the static callers). We can easily create a boot up test (config option) that will test it, and if a compiler breaks it, this test would trigger a failure. Again, both static calls and tracepoint callbacks are limited in what they can do. Both return void, and both do are not variadic functions. Although passing in a struct as a parameter is possible, we could add testing to detect this, as that's rather slow to begin with. -- Steve