From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FA1CC433E6 for ; Tue, 1 Sep 2020 18:02:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E5E92071B for ; Tue, 1 Sep 2020 18:02:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ubDddq84" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729992AbgIASCU (ORCPT ); Tue, 1 Sep 2020 14:02:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726377AbgIASCS (ORCPT ); Tue, 1 Sep 2020 14:02:18 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98E4CC061246 for ; Tue, 1 Sep 2020 11:02:15 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id g29so1096612pgl.2 for ; Tue, 01 Sep 2020 11:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=85apg5NRwahAocGqqv4gi+n4yORybk6Y48nEDadq/2g=; b=ubDddq84UdfD6pp9neg2X/djSllMkEZgfNKHLcl+/8Tqh7gB+v1dXHMnCbcajfMT5r B7/HeT9cdXORcYS9REmjQuFYNKX/+HwMqwfjFIrSj0bnWwsMrw7vrC0SUO/iJmurMuzm +CsE7mT59ZRE14OUZf5ZSXV//2DBLTrM+8uvBGzWpbTeqBZl1ytvNHFJw8W5Gg8v2q3Y 5KDAf5GVHYDlOxIl2Ji6J7BYxCQ1bTXLn463uNqsLhwWqC8XCfeJMcIOMRJrQ9eu5qTq L3SbQ00tnlmCMr6xPqxE9U+UouLTzvhmY2jkp7o2QQgSXT1HsSWTbgmMXHD2Ekx0imif 6JbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=85apg5NRwahAocGqqv4gi+n4yORybk6Y48nEDadq/2g=; b=TB6dbns1NKwInd+Z81YqmZnP8GLepEenbk/iHb9r2KFfLQfnVE5RQtbFPcwycqKlAR FUZ4vWQIo3dW0zLk5u242hhvV1cd9wZpj3idU9650XEaOiJXjm7JRMD0v1b3o2CatDTX 94KATGdZaD0uAh/xZ5TaU9D8rCbKIVk2qknqpnyKr0YlPUJomxDs7OSBEiKvy8GzzTnJ n6DgGtIvP+G8VK3XVAfrsGOZhohFn8M/qMSNoJX02IvTLDdqL9Grsx+3PClmIJ1yjUyl sot0j1bff9UkWDvqpeJbQ51xE0v46uD+ybZ93PcMjWFgnyF9Q9G4nurmvfur7zi59Mlt DH2Q== X-Gm-Message-State: AOAM530J3SLd+pBGxLm333RXpUgExLjdNMzj60wHVvrXPWu+rz4lNULm H4xw/zRD9w1GpDRg23mxag/6W4qYvM3ldlB4ncavjQ== X-Google-Smtp-Source: ABdhPJwkwBKhhro217bYWSqHNomm7qIIAgduwKeGfJHsiyITvjqOPbNbQycIH6PhlZ5uZJRTHxZepZmCUJ4CnKKgUyQ= X-Received: by 2002:a63:9d09:: with SMTP id i9mr2397873pgd.381.1598983334165; Tue, 01 Sep 2020 11:02:14 -0700 (PDT) MIME-Version: 1.0 References: <20200821194310.3089815-1-keescook@chromium.org> <202008311240.9F94A39@keescook> <20200901071133.GA3577996@gmail.com> <20200901075937.GA3602433@gmail.com> <20200901081647.GB3602433@gmail.com> <202009010816.80F4692@keescook> In-Reply-To: <202009010816.80F4692@keescook> From: Nick Desaulniers Date: Tue, 1 Sep 2020 11:02:02 -0700 Message-ID: Subject: Re: [PATCH v6 00/29] Warn on orphan section placement To: Kees Cook , Michael Ellerman , Masahiro Yamada , Nicholas Piggin Cc: Ingo Molnar , Borislav Petkov , Catalin Marinas , Mark Rutland , Ard Biesheuvel , Peter Collingbourne , James Morse , Ingo Molnar , Russell King , Arvind Sankar , Nathan Chancellor , Arnd Bergmann , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , clang-built-linux , linux-arch , linux-efi , Linux ARM , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 1, 2020 at 8:17 AM Kees Cook wrote: > > On Tue, Sep 01, 2020 at 10:16:47AM +0200, Ingo Molnar wrote: > > > > * Ingo Molnar wrote: > > > > > > > > * Ingo Molnar wrote: > > > > > > > > > > > * Kees Cook wrote: > > > > > > > > > On Fri, Aug 21, 2020 at 12:42:41PM -0700, Kees Cook wrote: > > > > > > Hi Ingo, > > > > > > > > > > > > Based on my testing, this is ready to go. I've reviewed the feedback on > > > > > > v5 and made a few small changes, noted below. > > > > > > > > > > If no one objects, I'll pop this into my tree for -next. I'd prefer it > > > > > go via -tip though! :) > > > > > > > > > > Thanks! > > > > > > > > I'll pick it up today, it all looks very good now! > > > > > > One thing I found in testing is that it doesn't handler older LD > > > versions well enough: > > > > > > ld: unrecognized option '--orphan-handling=warn' > > Oh! Uhm, yikes. Thanks for noticing this. > > > > Could we just detect the availability of this flag, and emit a warning > > > if it doesn't exist but otherwise not abort the build? > > Yeah, I'll respin those patches. > > > > This is with: > > > > > > GNU ld version 2.25-17.fc23 > > (At best, this is from 2015 ... but yes, min binutils in 2.23.) Ah, crap! Indeed arch/powerpc/Makefile wraps this in ld-option. Uh oh, the ppc vdso uses cc-ldoption which was removed! (I think by me; let me send patches) How is that not an error? Yes, guilty, officer. commit 055efab3120b ("kbuild: drop support for cc-ldoption"). Did I not know how to use grep, or? No, it is commit f2af201002a8 ("powerpc/build: vdso linker warning for orphan sections") that is wrong. -- Thanks, ~Nick Desaulniers