Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1283464ybi; Wed, 3 Jul 2019 12:49:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJ8RRf0PhUeI1qxy62wAM7z46RrlBhXhZAuWx1alXwhVNonFuKrWmD2197wdA+QG92nxox X-Received: by 2002:a17:902:a414:: with SMTP id p20mr42132374plq.187.1562183348429; Wed, 03 Jul 2019 12:49:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562183348; cv=none; d=google.com; s=arc-20160816; b=u9M2RdvF9h1j9FdLFg9SbPLBRSzWQPGA8RaNt9YlextCdgePWPVIerH7tV1tbjzH8e Q7tLLcC+3t3poavyOh3X2IoIePrvllg2Ko3w3ODbpt7mrv/xFYFb1K89sUBnvBNa08VB IMcSKMTrthnhM5jIQkNYwghVfcp/B9LmzDGMlxU1nbRdPsx/pLvU3Yqr6kC8eoXfESNl HnWrkKBxVdlIb5p9abp6v9ryasJeMEJ10fa1hECNZOjrB5jKdNM+BQWQh7VvgBg3QYGf owehrI1SF+1dYaw4G4ifhdM7qQrfMg9wRJZdqAcUQgRvE6oFDaXDqmaiVBZi9TJfUvm6 Lk4A== 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; bh=lu6djyiUlDtpTUUCZPiIMkZuBFC6UZao2Rv1MMbdJQY=; b=wsuX+ox3HEWvgoN5fGwzx2RhskH86dEdqj6khJ0/jOuqmWgVuswJO0s05tmaV/AhfX 0N3Es+RGjuPx2Ih0hPLqGs3CYU45JVXze9wNpPAAheJZjTGa1PjwaQHm7/bRNzfyQgj/ wuDbSf9t6gtCzg+KndkqdwDu1HsU8BtPgUeZEt30ldFdwyR3cpqaZq5rtWz1AD0g872y 5GGGLRvvHKOi0jLz1jdNcShJpTRgd7OevWYI76RytLEibfOWfS/pVM8tBImj8pgfd6XF oiCl/gHRxbNpHl6S3gp0B7wqqh8d3yyPAmZ1L8k+KLK2DPfXV1p8rulHopB/O/0DiiBP edWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t31si2856774pjb.25.2019.07.03.12.48.52; Wed, 03 Jul 2019 12:49:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727027AbfGCTrz (ORCPT + 99 others); Wed, 3 Jul 2019 15:47:55 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:34435 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbfGCTrz (ORCPT ); Wed, 3 Jul 2019 15:47:55 -0400 Received: by mail-qt1-f193.google.com with SMTP id m29so3179844qtu.1 for ; Wed, 03 Jul 2019 12:47:55 -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=lu6djyiUlDtpTUUCZPiIMkZuBFC6UZao2Rv1MMbdJQY=; b=cdLp9xNSAFB8ZwXkLyYuvr9/9s/ufvuWYv1f3zZjCc+MAL1i8BzLkZ4B2qiI5YoBXq TpP525Qt+FVNkPgo5DSr2gQevZGcjIGcdBUg0saYWl4izRPFTyVJvEhu/VZy2lFCV4o2 anJ2n5khLG+zRl+qEJHThFTn8EaqQxn3AxrmCpVpRjo5QrFd23ieCiNUhXx++eD4B3f7 Lth+hBVQlffi4E4JKrcn3w+xdFgVmquFavh7F/oFi9GjdvPKO6f13R9rbOxRYbpvsU35 S6YEp8rIimxLlRqzCCC5BjxT507jco5s/Se024+NQTvvHZJ+yUjFNxR31G5IC9EoCRBB Rs+g== X-Gm-Message-State: APjAAAU1vwblyRn+jy8HD5ujXwWmVNZNlQdEWQwqCg/pva+e8QRza4s5 oiWFwD36mfrRpzd7cpnFdMV50GQp1Omh1gTeC3zikko2cZU= X-Received: by 2002:ac8:5311:: with SMTP id t17mr31341893qtn.304.1562183274631; Wed, 03 Jul 2019 12:47:54 -0700 (PDT) MIME-Version: 1.0 References: <20190703001842.12238-1-alistair.francis@wdc.com> <20190703001842.12238-3-alistair.francis@wdc.com> In-Reply-To: From: Arnd Bergmann Date: Wed, 3 Jul 2019 21:47:36 +0200 Message-ID: Subject: Re: [PATCH 2/2] riscv/include/uapi: Define a custom __SIGINFO struct for RV32 To: Alistair Francis Cc: Alistair Francis , linux-riscv-bounces@lists.infradead.org, Linux Kernel Mailing List 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 Wed, Jul 3, 2019 at 8:45 PM Alistair Francis wrote: > > On Wed, Jul 3, 2019 at 1:41 AM Arnd Bergmann wrote: > > > > On Wed, Jul 3, 2019 at 2:21 AM Alistair Francis > > wrote: > > > > > > The glibc implementation of siginfo_t results in an allignment of 8 bytes > > > for the union _sifields on RV32. The kernel has an allignment of 4 bytes > > > for the _sifields union. This results in information being lost when > > > glibc parses the siginfo_t struct. > > > > I think the problem is that you incorrectly defined clock_t to 64-bit, > > while it is 32 bit in the kernel. You should fix the clock_t definition > > instead, it would otherwise cause additional problems. > > That is the problem. I assume we want to change the kernel to use a > 64-bit clock_t. Certainly not! Doing so would likely involve deprecating all system calls that take a clock_t (anything passing a struct siginfo or struct tms) and replacements based on clock64_t. > What I don't understand though is how that impacted this struct, it > doesn't use clock_t at all, everything in the struct is an int or > void*. si_utime/si_stime in siginfo are clock_t. Arnd