Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3683860ybk; Tue, 19 May 2020 10:27:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhdZ/Ja7IzCEtBGKsuKuqqY1KskYiT6jLKnezhbh4s31vcXMhoxQRjTxnalSAx7AHa50mm X-Received: by 2002:a17:906:7e43:: with SMTP id z3mr249865ejr.221.1589909226914; Tue, 19 May 2020 10:27:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589909226; cv=none; d=google.com; s=arc-20160816; b=S2aX+P/4tmjkxxERtNPDhFQtR88viuX49eLIWgXg1nRBEk3xQJt34coR0i3TsxsfrS ehil1nzm8C1sa5+WGn68qBWJvCw5X2Wpioty26qvxMZZsr2Tv6VHu5IxxLT8AI+tQ5hU Dwb4CGG8qiF1YQXh7qCl1thWqOjapZBbqFxafRYfGcEnCH07FW/0RdZZoNX9hNWiNqXw yEfhYAKzwptmKAgslW/oPgr/D2jEgqeDrenaeqzlARKGaV1urGqc1k4T0rJGMctL20JB CbwTJmHxcCPDcXMYxh2eA6vCRdpARotnh1CbymJW79uY+j6G1l2fogFg6AT3HkcaRt+d YL8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Xr0IWkc5cd9RFwz8LsU7++TtyuSvnhVK7nv8eOr0z7U=; b=yj2k8QMkQmCji+RjJa4irb+Ib0FAoFAodp8br1mR4uTro2oqNkxMJeqPjqOstGzyBf /5RcxMMzgEyHLYbdjd2ZZ+x3m3MSOZg4BwHNxXRI+QLILmWODAh0G9J3Y9qzXzOJ6fDL iOLnlQ1+td9OKb9XOkxEoYHzN+nvcTODY55zaDSJ6Gi4VmNmRB1sOSpO1bZ5cMhJfFoW wfOC/49Tj/y96HfiXB4NvGQmhN1KBJeMleV2eRc/OpplqHSLb9g46BCZ2+6oVzcmjdch E37nSPfBmTksLvn3ZhV8SsVJEjH4mJpTvCy9YvlAL89tqh7FrVcEXMJ32v43UpClicWu 4GXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KDuBvM5m; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n8si275292ejy.388.2020.05.19.10.26.41; Tue, 19 May 2020 10:27:06 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KDuBvM5m; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729352AbgESRXI (ORCPT + 99 others); Tue, 19 May 2020 13:23:08 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:23213 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729053AbgESRXH (ORCPT ); Tue, 19 May 2020 13:23:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589908986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Xr0IWkc5cd9RFwz8LsU7++TtyuSvnhVK7nv8eOr0z7U=; b=KDuBvM5maDQYd2yaYAoVB9cOJoQ+7PBrLYFocEyHxFiUatoUxx59wdYR+DIgnSdVS2naiO 0XcEHDWZcRGehznei2dODhplFa1I2EApw+aqD2Z8nODGGcwWuWF6Ztxk6pYop2qZm/Kll9 F0CiDrsnfuOWjUNI0SRvgJcUypEzbMg= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-300-Hm2XYAErPx6yKr691wRR9w-1; Tue, 19 May 2020 13:23:02 -0400 X-MC-Unique: Hm2XYAErPx6yKr691wRR9w-1 Received: by mail-ed1-f69.google.com with SMTP id m7so30358edr.5 for ; Tue, 19 May 2020 10:23:01 -0700 (PDT) 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=Xr0IWkc5cd9RFwz8LsU7++TtyuSvnhVK7nv8eOr0z7U=; b=SoUhFBDMByZaJtY6q7Q3TSLIjepzUEGg9pyd16AuUdeBWO/JuAYmOEOesUrYHCXMuA 9B0O58C+nB63fVcuEjaqjHTJRn9G20PSc+O72aC008z0OgVfnt1GEwWod/pyxrwsVFXh l+5PFUoGgwr2EBQXVJAEgZX9BBLx5m4dtOXxOuf1KHIKCmhrYImCPdBt1q5iDp+qaLJl xE+2jjhRN9gzWpqqtGL0mbEZR2w+/dZgibtzK+NzGLFPLi3YjXMIfvdwnE1gMRrm8x6H zTLC3Qzu0lFHdBSCTzUEZQ+sWM9yv3Zmje4j+fW3SyzqhKLRNIGFLV6pEs41auO3yU85 AD3A== X-Gm-Message-State: AOAM533xK4LIcth5dlU3FYuNIhXC5AaQZY6+1dNGEq4CP3fV3LxvVHDG Kir3xNuUVCfIblrSd5kxpibjiIdrXzyw4t5tQyh6ggRSH7bNqh8PL8UP2qPE5EiOgX6EHNvdSwf Hum8grHSuJo1iabNUfHwyNxkZv1ZQsBZtCKq5v1DS X-Received: by 2002:a05:6402:68f:: with SMTP id f15mr28541edy.89.1589908980860; Tue, 19 May 2020 10:23:00 -0700 (PDT) X-Received: by 2002:a05:6402:68f:: with SMTP id f15mr28523edy.89.1589908980585; Tue, 19 May 2020 10:23:00 -0700 (PDT) MIME-Version: 1.0 References: <158955700764.647498.18025770126733698386.stgit@buzz> <20200515162707.GI2978@hirez.programming.kicks-ass.net> <403cc691-4ec5-8b3f-382c-4820736da41d@redhat.com> In-Reply-To: <403cc691-4ec5-8b3f-382c-4820736da41d@redhat.com> From: "Carlos O'Donell" Date: Tue, 19 May 2020 13:22:48 -0400 Message-ID: Subject: Re: [PATCH] futex: send SIGBUS if argument is not aligned on a four-byte boundary To: Peter Zijlstra , Konstantin Khlebnikov Cc: LKML , Thomas Gleixner , Ingo Molnar , Darren Hart , Maxim Samoylov , Linus Torvalds , Linux API 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 Fri, May 15, 2020 at 1:50 PM Carlos O'Donell wrote: > This isn't fixed because this is the older code in pthread_mutex_lock > which we haven't ported to futex-internal.h yet, otherwise we would abort > the process. I filed this upstream as a QoI issue so I don't forget to port the existing code to the newer internal interfaces for futex handling. "Bug 25997 - pthread_mutex_lock QoI issue for unaligned futex." https://sourceware.org/bugzilla/show_bug.cgi?id=25997 I checked that -Wcast-align=strict does warn about this case, but it's rarely used in production code that I've worked with. I'm following up with the compiler people to see if we can consistently warn in these cases and so avoid this kind of code existing in the first place. Cheers, Carlos.