Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3762071pxf; Mon, 22 Mar 2021 14:33:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWrfLmmhgPcT8vtX5/W1aHEf4fis+NkSD5NVog2akjMhsZx35O4NxH3IFlWLnA1w/nro4P X-Received: by 2002:a17:906:6d8e:: with SMTP id h14mr1749799ejt.410.1616448823051; Mon, 22 Mar 2021 14:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616448823; cv=none; d=google.com; s=arc-20160816; b=x6L6koYfcgmWBHTC4kRyAuJr+ARfZNHLTu963qtuLY0fr+oEDGRh/1UABCzaodP7JD GaH+u1L3f+AXhU8Wo1Iphb77NIgdVBRualQTS2T6WTAtnh1oIra88CE11KK5xvu7MHzN Q4pWWT+I6t6Jdnr0JTIZUnIQaSKRRavJhOwpUeNcKbZrj6fs0SG841CfCKIqlWerPcL2 tIMYe9bKytKwModglUU1jzKhsqyNIH94G/sguCRFYXWZCiIUsushOGjrEiNhTAaL3kVr OL9/9Ht3d1AkUwuhvvkzgRCSDM80JSf6p4k3Xv3sgrqHf00wwtZRTFhDHZRSXm/OYjl2 aTJQ== 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=arHWM4Ebun2cJnPMiTI804sJaUUNzJDmKRQOV3hnZLU=; b=ZULtvnRg11cKScvRyi9DWh+e/M4ZiQ201Ac73lMSE4GeGt6ASDisaXfl6ipoLIcm4A Q8eNRf4jqlhQ1XqY6KwyJHITFOcTZ7Plk4zCAF5b6BIxX40M8XpAgYYmkGKKUJfZCLHm zATjz0vAVaLDOR0VS0WODe5jJv8mbRQeAfvZeMuNaQKi7opHYIDxCDCHuxy1rlHqQSje IKCrrmX8tqdD3uiE7WHAMPQqX8LHLDY6Lm2WENZvHuot1TMtO9ZKf92ptfQwraNOXwvE bO97u2uZd7Ddxmot75BJ3nbOZt7y2ffs/p548RMlYqUL5LJbtt6p/qZG7vDiyzixvZR7 qP4A== 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 y61si14123619ede.590.2021.03.22.14.33.20; Mon, 22 Mar 2021 14:33:43 -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; 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 S229764AbhCVV3x (ORCPT + 99 others); Mon, 22 Mar 2021 17:29:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:50866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbhCVV3Y (ORCPT ); Mon, 22 Mar 2021 17:29:24 -0400 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 BBFF16198E; Mon, 22 Mar 2021 21:29:22 +0000 (UTC) Date: Mon, 22 Mar 2021 17:29:21 -0400 From: Steven Rostedt To: Arnd Bergmann Cc: Peter Zijlstra , 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: <20210322172921.56350a69@gandalf.local.home> In-Reply-To: References: <20210322170711.1855115-1-arnd@kernel.org> <20210322153214.25d869b1@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; 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 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. Perhaps this might make a good topic to talk about at the tool chain microconference at Plumbers! -- Steve