Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp5411936imm; Sat, 19 May 2018 01:21:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZri2XMeyFQuYYouggr3+cNWPWZVlx82Xy2tXbUqgqb2ytvGF3AClvoLwgYVXkTuFw12SxCJ X-Received: by 2002:a63:67c1:: with SMTP id b184-v6mr9659646pgc.90.1526718104501; Sat, 19 May 2018 01:21:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526718104; cv=none; d=google.com; s=arc-20160816; b=JKSY+SNz0PDoi54iyD+JXPM2Ms/aBI0pN0bXuE6xqM2Bjaap4RRyNg2TKBsEH3ojYp iduNiahEsQXlT79PUNgnYe9UrKdG+Y8RGt6DkZ5BTUBEULOnOeK30WnDm8hi0EuU7Mm5 4MT9OXYAMD0U83UZ6eVzmzpCk3qklPmyZlv1qIIgbygRa83TpeTb0UEdIT9Xpgm0iUeM 2BL7q16OSszKWfR9rbUcxQ1D6rGT+uo9O/LzHTYa5iN2hwazQffQ7O8Ve5DDnONKD2Bj piWfrdCyyKQcGNc2TncV8+LSRWgSs/xtX/XYoWzU8yITLuFxDXHAnw3goboh7okCI1RG sPig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:arc-authentication-results; bh=qkJsLh2S+qvazCAMK6d2palY1AaWkAm6hjCmkWnklHg=; b=Pl9YclFXBASEvM6I56T9rqH3vbmxk64mdOdddB46cFgcUPu5R4YOiK95qTRvoKdar3 Qs6ZScjBZCarMwJwOBPwIsXi/dAV7OtCp7dIrqX3xSse+yBIySoVNke4YtknHFm6ZX4r Ndnp4pKhj5AkSIBWeJYSWlm8i50CVPCL33U80IcwMN5QXfQwYNiYzo8znCFawniL179a QQn94hvwfoJJcUp5JL8rNEL9dz2cMjpGXAJVkq4qO+j9sxwhNRbZHpTm/TC8zFf3cOhq z1Toy5tJ23GtdRWt8vFA+9b37sMOgz2IeuyqUyneKsIe6++6AsTFWErzX0b9DBcunp4Y axng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9-v6si7305602pgt.5.2018.05.19.01.21.15; Sat, 19 May 2018 01:21:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042AbeESIUR convert rfc822-to-8bit (ORCPT + 99 others); Sat, 19 May 2018 04:20:17 -0400 Received: from terminus.zytor.com ([198.137.202.136]:46405 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751888AbeESIUN (ORCPT ); Sat, 19 May 2018 04:20:13 -0400 Received: from wld62.hos.anvin.org (c-24-5-245-234.hsd1.ca.comcast.net [24.5.245.234] (may be forged)) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id w4J8J7I12748431 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sat, 19 May 2018 01:19:08 -0700 Date: Sat, 19 May 2018 01:18:59 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20180518175136.GB2055@avx2> References: <20180515214337.GA18021@avx2> <20180515222211.ods5hzne46hozojq@treble> <20180515224354.zmygmsnlqj5lrdbo@treble> <20180516033044.odb74pdgcn5nacwb@treble> <20180517134934.eog2fgoby5azq5a7@treble> <20180518071814.GB26358@gmail.com> <20180518175136.GB2055@avx2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH] objtool: Detect assembly code falling through to INT3 padding To: Alexey Dobriyan , Ingo Molnar CC: Josh Poimboeuf , Linus Torvalds , Peter Anvin , kernel test robot , Thomas Gleixner , Andrew Lutomirski , Borislav Petkov , Brian Gerst , Denys Vlasenko , Peter Zijlstra , Linux Kernel Mailing List , tipbuild@zytor.com, LKP From: hpa@zytor.com Message-ID: <84F157C1-AD98-473D-9CF6-2A26A499DECF@zytor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On May 18, 2018 10:51:36 AM PDT, Alexey Dobriyan wrote: >On Fri, May 18, 2018 at 09:18:14AM +0200, Ingo Molnar wrote: >> The concept of built-in kernel tooling working at the machine code >level is just >> so powerful - we should have added our own KCC compiler 20 years ago. > >...for two very serious reasons > >* C as a language moves very slowly, last help from the comittee were > C99 intializers which are OK, but, say, memory model was explictly > rejected. However the project expands and becomes more complex much > faster than C working group sets up meetings. Compiler authors help >with extensions but ultimately can not be relied on (see "inline" >saga). > > Recently everyone was celebrating new and improved min() and max() > macros admiring creativity and knowledge of intricate language details > (me too, don't get this wrong). > > Now this is how it can be done in a language which is not stupid: > > constexpr int min(int a, int b) > { > return a < b ? a : b; > } > > That's literally all. And you can also do > > template > void min(T a, char b) = delete; > > template > void min(char a, T b) = delete; > > because "char" is char. > > Having control over compiler things like that can be addded more > quickly. > > >* insulating the project from the whims of compiler authors who every > once in a while use "undefined behaviour" or other kinds of language > lawyering to do strange things. > > Other serious projects do this too. Database people use O_DIRECT > to insulate themselves from kernel people for the very same reasons. Sounds like you are proposing switching to C++ more than anything else. *Steps aside and grabs popcorn* -- Sent from my Android device with K-9 Mail. Please excuse my brevity.