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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3894C433F5 for ; Thu, 3 Feb 2022 03:18:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343787AbiBCDSG (ORCPT ); Wed, 2 Feb 2022 22:18:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237483AbiBCDSG (ORCPT ); Wed, 2 Feb 2022 22:18:06 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA719C06173B for ; Wed, 2 Feb 2022 19:18:05 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id e28so1059404pfj.5 for ; Wed, 02 Feb 2022 19:18:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4QtPGJsJdjtleT4SCvDltRv0MUxS6HLkC+/jHaWkak0=; b=JGtI0UZ6Ck0rSbexL4Ad25l0q5f+gKaACzYjSkD65cN3hv2n7lC8GRTPAt3pmfHCyb Wf9YGN1zv874GvRTML77HPoG8fJ5LM0e8i2CXvMNyXiPrydyVDfkVz0S+AVM/LzWWTLX o4bOgZ8bo/WHDcNzDyY5pA/pQtGAfaasgfirU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4QtPGJsJdjtleT4SCvDltRv0MUxS6HLkC+/jHaWkak0=; b=4Da8HcdvSKFslZHp5+u9pnLbw3Yqp8O7f011aYMJIShjctJ8F/ygSxGTjV28/y+ph9 hsEs+mPUEeiZJQdBZ0yT36nGvzx+8wKUXpSKL5wm3nQokvk9OZFqf2gawNGge0gANTGA CfF4BY080KEQXdbxgZmqWKWx2snyXqGsVnt0lnmjGycEVe6154L0bX3QesCmVH6pA3DF EIOBrnBAWdtlYD369IvO4SmQ1mMt46ddl5OIfiTw0oFoXvVPq4fSZ+p/IthMKSywof9X ucazZxzOiF4Tt1E6ToZMxz6bBOhPts47Dtmb/NFl/Kv6LGZhr7WcPIr4v1Ih6go0h5n6 1UXg== X-Gm-Message-State: AOAM531KGXH6o8kUViGbRd54FrxkMn738LMzakjgqeDloJ2/JQxSABSk KCIpdhwOfnn2r2rWjfLJLiEJUQ== X-Google-Smtp-Source: ABdhPJw6xMNyvSowwi3MnsmqNRcX44gydSmfXvKKmKbpkqwqzSvA7MVZmoUU5NQNycnkiWAt/5IKCQ== X-Received: by 2002:a65:6d89:: with SMTP id bc9mr26747916pgb.260.1643858285384; Wed, 02 Feb 2022 19:18:05 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id k15sm27170877pff.39.2022.02.02.19.18.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 19:18:05 -0800 (PST) Date: Wed, 2 Feb 2022 19:18:04 -0800 From: Kees Cook To: Nick Desaulniers Cc: Miguel Ojeda , Nathan Chancellor , George Burgess IV , llvm@lists.linux.dev, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH 4/4 v5] fortify: Add Clang support Message-ID: <202202021916.9606A43C88@keescook> References: <20220202003033.704951-1-keescook@chromium.org> <20220202003033.704951-5-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org On Wed, Feb 02, 2022 at 01:27:11PM -0800, Nick Desaulniers wrote: > On Tue, Feb 1, 2022 at 4:30 PM Kees Cook wrote: > > > > +#define BOS const __pass_object_size(1) > > +#define BOS0 const __pass_object_size(0) > > A dumb bikeshed, but would you mind naming these BOS1 and BOS0, and > perhaps consider adding a comment or pointer or link to something that > describes why we use the two different modes? I recognize that the > code already uses the two different modes already without comments, > but this might be a nice place to point folks like myself to so that > in a month or so when I forget what the difference is between modes > (again), we have a shorter trail of breadcrumbs. Sure, I can do that. My expectation was to entirely eliminate mode 0 usage in the future. Though now that things are so close, I'll just do some builds with the last few users switched over. But maybe memcmp() was a pain? I'll go check... -- Kees Cook