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=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 A4E69C433E1 for ; Tue, 18 Aug 2020 19:59:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 817232076E for ; Tue, 18 Aug 2020 19:59:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="TEZ9FT5U" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726868AbgHRT7Q (ORCPT ); Tue, 18 Aug 2020 15:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726773AbgHRT7H (ORCPT ); Tue, 18 Aug 2020 15:59:07 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8892DC061389 for ; Tue, 18 Aug 2020 12:59:07 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id f5so9704490plr.9 for ; Tue, 18 Aug 2020 12:59:07 -0700 (PDT) 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=UtvEIM7NJb9DV7eM9Gem48qF3l7pVpCdEzxyrXC+k2g=; b=TEZ9FT5UQ0c4hTw4uTo0tXnl21MyitKB/Hm0BA/xD94N+19fOdggAxLE1SHPhZXHqD Rly/Wc9mUw8GyMUu9e4rUX+5GtFA6peIE4GDgziPYwtFtihtofk84dfTXvuz5Z+I5Lt0 XAw8PgnIzVDU+KymMURjkfxZx0R0EvGunb2/w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=UtvEIM7NJb9DV7eM9Gem48qF3l7pVpCdEzxyrXC+k2g=; b=bT8UnwfIm/fw/KYkCUmfbp9gVMio0BHE2lpzWIxjiRRrVokwefpvD6vrede3yfzZjQ pPubz7+itHdNZncLYZ36Sy6TwKEypgoU3M9FXhE/gWQjSU+RjnMlsBLWoH/zL5H8HgGG OmtlYKqgweOj7splRkflggv1Ae2B21M+t6GbFhCgCnfIX51vqw/3Th1znv19Tncd4IYP sjS3o49ltHPGs2Qq/ULzMHw6pazfC/TBhYBJ4DeM5BFD9spuZxBFsrm0CsPR+uJYCXNP PcgTZ/JI+a6Tk1igo97fmIeuYwf+q5VW9fZA656wwLoDb4CBcyNgr5lSCJhcgupyykml cabg== X-Gm-Message-State: AOAM533pNTo1nmCDKUJi9titdDnHlEoL2w0JV6utvc8ccXgHQBIOovgh Z86LB9fjktcH9gE/1CCqA5Xw1imRe5jz3w== X-Google-Smtp-Source: ABdhPJz5S+aFMIAllTf6EeyEL2d4ft+e+kahg8U05QAv6xwSUo7qPqGWeSmxI0LB5EZTcNSgAu3TAg== X-Received: by 2002:a17:902:b20e:: with SMTP id t14mr16722140plr.58.1597780747129; Tue, 18 Aug 2020 12:59:07 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id f17sm26147059pfq.67.2020.08.18.12.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2020 12:59:06 -0700 (PDT) Date: Tue, 18 Aug 2020 12:59:05 -0700 From: Kees Cook To: Christoph Hellwig Cc: Al Viro , Michael Ellerman , x86@kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 08/11] x86: make TASK_SIZE_MAX usable from assembly code Message-ID: <202008181258.CEC4B8B3@keescook> References: <20200817073212.830069-1-hch@lst.de> <20200817073212.830069-9-hch@lst.de> <202008181244.BBDA7DAB@keescook> <20200818195539.GB32691@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200818195539.GB32691@lst.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 18, 2020 at 09:55:39PM +0200, Christoph Hellwig wrote: > On Tue, Aug 18, 2020 at 12:44:49PM -0700, Kees Cook wrote: > > On Mon, Aug 17, 2020 at 09:32:09AM +0200, Christoph Hellwig wrote: > > > For 64-bit the only hing missing was a strategic _AC, and for 32-bit we > > > > typo: thing > > > > > need to use __PAGE_OFFSET instead of PAGE_OFFSET in the TASK_SIZE > > > definition to escape the explicit unsigned long cast. This just works > > > because __PAGE_OFFSET is defined using _AC itself and thus never needs > > > the cast anyway. > > > > Shouldn't this be folded into the prior patch so there's no bisection > > problem? > > I didn't see a problem bisecting, do you have something particular in > mind? Oh, I misunderstood this patch to be a fix for compilation. Is this just a correctness fix? -- Kees Cook