Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4047422pxf; Tue, 23 Mar 2021 00:50:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUCYLpwguZUdJoedG80qLAqLo6RAJwzTRi21vtea8TDtCqmjkj6mJGhietIhSjHO8rrt7k X-Received: by 2002:aa7:d1cd:: with SMTP id g13mr3254934edp.369.1616485856753; Tue, 23 Mar 2021 00:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616485856; cv=none; d=google.com; s=arc-20160816; b=XQe/oI/rkx899GLw9BKbtVZyghvYvntrbaKiFwSmsgVRxSjW3ikRj6wFhYSbfbt1cs 7PsBVyqg0XR9zFxDcYVD6xiXoDRM1ZVAkKAn34a+ZX46IaX3t4X76KHP7P/bUbz4HOj7 FA6REj9mHWMQLS/+yBwdJzjgt9rfnNr8Fll8bsnXPJpOCuagxt/59jV2lyZxtEW0Z7Vl 4nG0zaxcI9iPegoLul4G7tcn67oQXfaJmzNy3OePnKYCPwcyfOZFxa/YfpRL9Hbkmk0U LOxyZlx7p0l1Dba5wCtE8zId5NSrYb5+9Vq16i+b0CHZsEJeyTzy3AhMMWJxKaUiKJJ4 IYYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=G4mKOqnYLS5aisPRhWh1adzyNjnyD9ytIXDxcLbdvrI=; b=qD/427UWZkduJqJLC4RNDHwxYC0JS+uNIPoveUPTbkddviQVPHZH11UrdASU7Sjj4Z FfYewvDOYwPjvX5vlQSC6SoCAZ9ncONEogosdScfeg0nATmDNu4AkzIbuHZs0v9khKyz Q335Bo9XqdHEgpcd/7SG/U4dDVTZPHbz1n6VEMs+7JZIo0k8ayAG33OoF7pbYEtOxNXu Sp5u1/RZ+UfBCA+pV0eWmePN4cva36+L6usb0Pa8uyuR5LvZEx74M/uuBYMWiY/QqUzZ B3cWOA1YNmJT70oBRZBSBKERh0FUos/GyogLneaobx4bOqJArkHtrUSZWIQaz5Lzl/zM w8KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ZJ4PXU1Y; 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 me5si14035618ejb.166.2021.03.23.00.50.34; Tue, 23 Mar 2021 00:50:56 -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=@infradead.org header.s=casper.20170209 header.b=ZJ4PXU1Y; 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 S229669AbhCWHtH (ORCPT + 99 others); Tue, 23 Mar 2021 03:49:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbhCWHtE (ORCPT ); Tue, 23 Mar 2021 03:49:04 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EBB7C061574 for ; Tue, 23 Mar 2021 00:49:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=G4mKOqnYLS5aisPRhWh1adzyNjnyD9ytIXDxcLbdvrI=; b=ZJ4PXU1YPJMi984UIuN8NuXFRX tP239BNgy8mfay0WeOLu1yzBworA5ecPTYbjGNZPcMU4fWQh2n71ympTJmvqq9jdxhJyDxLzhBol0 fVLHQmAV6x1GKLmHvXY/6X3loL2Am/4s0mu6P71PtnU0vGStckfJdAySA8H6gJtTw3TAfsw9G8Iui vbWgcrpall8K+6FO8xWflSZpu1UWDmCndRMIgWD6s1Y26WC09M1x8wHqph2aJPE5Rs+Nat8lhkNsW NqonrdlXCgDeIPkInrdA5fkpONF7NSJXp+2nw1V6GKAglvzzOH0ZK5n0AioDuYuB3JkzznmKidSB3 yggpVzpw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lOblX-009jsb-IV; Tue, 23 Mar 2021 07:47:58 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id EB662300F7A; Tue, 23 Mar 2021 08:47:50 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CF7F12BCFBCCE; Tue, 23 Mar 2021 08:47:50 +0100 (CET) Date: Tue, 23 Mar 2021 08:47:50 +0100 From: Peter Zijlstra To: Steven Rostedt Cc: Arnd Bergmann , Josh Poimboeuf , Jason Baron , Ingo Molnar , Juri Lelli , Vincent Guittot , Ard Biesheuvel , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Frederic Weisbecker , Linux Kernel Mailing List Subject: Re: [PATCH] static_call: fix function type mismatch Message-ID: References: <20210322170711.1855115-1-arnd@kernel.org> <20210322153214.25d869b1@gandalf.local.home> <20210322172921.56350a69@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210322172921.56350a69@gandalf.local.home> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 22, 2021 at 05:29:21PM -0400, Steven Rostedt wrote: > On Mon, 22 Mar 2021 22:18:17 +0100 > Arnd Bergmann wrote: > > > I think the code works correctly on all architectures we support because > > both 'int' and 'long' are returned in a register with any unused bits cleared. > > It is however undefined behavior in C because 'int' and 'long' are not > > compatible types, and the calling conventions don't have to allow this. > > Static calls (and so do tracepoints) currently rely on these kind of > "undefined behavior" in C. This isn't the only UB that it relies on. Right, most of the kernel lives in UB. That's what we have -fwrapv -fno-strict-aliassing and lots of other bits for, to 'fix' the stupid C standard. This is one more of them, so just ignore the warning and make it go away: -Wno-cast-function-type seems to be the magic knob.