Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1895696lqz; Tue, 2 Apr 2024 00:18:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVSwAgy40IUbRfLateabubsKUVJtmpdu6oN4Ni2ZgYXK83eyS2DFuInMxxK42wpSG+5xlUkTPiLtYzciO/PBjUCsEw0EM7u3ibip/ct3A== X-Google-Smtp-Source: AGHT+IGyJULhldvH7pnuRNTRPEChng2GnQYutT76zsqdlGijnjRPHndSgYRh3pzedplO+hd9ULTL X-Received: by 2002:a50:d7da:0:b0:568:ab85:d85 with SMTP id m26-20020a50d7da000000b00568ab850d85mr11779457edj.5.1712042314620; Tue, 02 Apr 2024 00:18:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712042314; cv=pass; d=google.com; s=arc-20160816; b=JJDn2BlyzIfvwJem8CM95DYmDtYNC1r7sjpZD2AqDdnobiUwDXIcwXFT4NcOJtWFKW DtoeNR/+smT2IvOo1Nt7xm9zQ05ecAFqUlcMNfgCw1//mmVCYSWSBKm75AF+aHAQj41I ZMR3TQVdVeb2A/0wiVXnXSYvykKRxlm56lSQCJ6NiZNZJuJhwFQ6LpwVzJfaEq9MjUu9 x3pkUWmLl4XXBrtuMEDcuBiBBl+zY/mZqms8SHnC0DT/PZ5zazAJGYnFj4pp7cMAraUC 5dKE7t7i+hc3I0oUKXitEvu5ZKmSsSp8Nk/USwKKDN/ymEdJ46JQSDiEnkObty4iuw+H 2QGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=pb6XqVqSYm0Y30MS/NuMycEiEl6AV1zw1Xdt+GXCe3M=; fh=Ik08WWfVCHetOU/ewJ0D6hPa2Sy6Bq2JKx4mtKWzVwI=; b=vekX2IleGgXUfDTvs1rBNcBKudP575EmPvL7E19m6Ka5j4lcdo+a5UM7XSTroMuFQ3 /C6/lsswTRy+wbvcySX2z6R+a2KAhZwpIyDuqRJlk6GXxK9XvGOC0X37Ytfz41PiVGv+ Qzw1a3CQw//6BH6Rrg9sO9UVdThsg/MKB9W2ljMVWUYdGgKGUwqdQ55lXIqiqRxPu/cw /b7S9U+Ag2qcCPN+3UEzSwA4cqX6zdinvja5cGpAm7FwJAkvE7mfuUb7WPtgMLrnpnNr aO1VYEskvGMxq4XQC8E+znpc3gQeshjEY7zo0dDaguXB6sI5UeHyckvDjoTg/oZsOSi7 4oag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-127499-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127499-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b25-20020a50ccd9000000b0056b849263c3si5550097edj.438.2024.04.02.00.18.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 00:18:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127499-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-127499-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127499-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5B26B1F2061E for ; Tue, 2 Apr 2024 07:18:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB9573A1C5; Tue, 2 Apr 2024 07:18:27 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77DB52C6B3 for ; Tue, 2 Apr 2024 07:18:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712042307; cv=none; b=cxXJlxlxfouHPYwwv0d86AAroLccfPgyj7sT7/anDdLcnS43eLW+MZScH2ji6Kn9QHXscF3UtwEmGkRr9vHTkzKVSGOJZdLugerjJh3KluGjQklShHOkWbev0BOb+m4fcmKL5qaqrzPnm0XYuCCbQR/xQWyIbyf8OCAyEKCnR7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712042307; c=relaxed/simple; bh=Z+zJUqfPOF+jbZ01WAERHLtrTeG63ePwxKaJCB3WiPo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VEDk2PfYeLqOC7LDIA/tXbT2JlZXRAQviZJyLE/SP1KurKvmJEzZRjO5IIIS9SLjfjcw3oIi8Bo7g5mcrYzTD2NYNJHb0zpD3j6MNl8CyyIvxikw2TJIqNa3FQBKkNhqMgRFFqofVb+zKX2zrFFAlBo9v/nbgf722ZuL9hx43HQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF319C433C7; Tue, 2 Apr 2024 07:18:25 +0000 (UTC) Message-ID: Date: Tue, 2 Apr 2024 17:18:23 +1000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] m68k: Avoid CONFIG_COLDFIRE switch in uapi header Content-Language: en-US To: Thomas Huth , Arnd Bergmann , linux-m68k@lists.linux-m68k.org, Geert Uytterhoeven Cc: linux-kernel@vger.kernel.org, Oleg Nesterov References: <20240219160126.510498-1-thuth@redhat.com> <6f3b246e-7417-4455-abe4-ca3b42fdda4c@linux-m68k.org> <4824192b-5573-4246-a47c-ad6249e2900e@app.fastmail.com> From: Greg Ungerer In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Thomas, On 23/2/24 18:13, Thomas Huth wrote: > On 20/02/2024 16.09, Arnd Bergmann wrote: >> On Tue, Feb 20, 2024, at 15:13, Greg Ungerer wrote: >>> On 20/2/24 02:01, Thomas Huth wrote: >>>> We should not use any CONFIG switches in uapi headers since these >>>> only work during kernel compilation; they are not defined for >>>> userspace. Fix it by moving the struct pt_regs to the kernel-internal >>>> header instead - struct pt_regs does not seem to be required for >>>> the userspace headers on m68k at all. >>>> >>>> Suggested-by: Greg Ungerer >>>> Signed-off-by: Thomas Huth >>>> --- >>>>    v2: Move the struct instead of changing the #ifdef >>>> >>>>    See previous discussion here: >>>>    https://lore.kernel.org/lkml/6e3f2a2e-2430-4b4f-9ead-d9a4d5e42713@linux-m68k.org/ >>> >>> I am fine with this. FWIW the following architectures do >>> not define pt_regs in their uapi/ptrace.h header either: >>> arc, arm64, loongarch, nios2, openrisc, riscv, s390, xtensa >>> Though quite a few of them have a user_pt_regs instead. >>> >>> So for me: >>> >>> Acked-by: Greg Ungerer >>> >>> Geert, Arnd, do you have any thoughts on this? >> >> It clearly doesn't change the ABI, so that part is fine. >> >> If asm/ptrace.h is included by some userspace tool to >> get the definition, it might cause a compile-time error >> that needs a trivial source change. >> >> This could be needed for ptrace (gdb, strace) or signal >> handling and setjmp (libc), though it's more likely that these >> already have their own copies. > > If we still feel unsure, we should maybe rather go with v1: > >  https://lore.kernel.org/lkml/20231110103120.387517-1-thuth@redhat.com/ > > ? We have not had much movement on this. So... I am confidant that v2 is good, but lets err on the side of caution first up. I have applied v1 to the m68knommu git tree, for-next branch. Thanks Greg