lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <431dd956-ad31-4da8-ad42-34f7380824bb@app.fastmail.com>
Date: Mon, 19 Feb 2024 07:21:11 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Calvin Owens" <jcalvinowens@...il.com>,
 "Russell King" <linux@...linux.org.uk>
Cc: "Dave Martin" <Dave.Martin@....com>, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org,
 "linux-bcachefs@...r.kernel.org" <linux-bcachefs@...r.kernel.org>,
 "Kent Overstreet" <kent.overstreet@...ux.dev>
Subject: Re: [PATCH] arm: Silence gcc warnings about arch ABI drift

On Mon, Feb 19, 2024, at 05:09, Calvin Owens wrote:
> 32-bit arm builds uniquely emit a lot of spam like this:
>
>     fs/bcachefs/backpointers.c: In function ‘extent_matches_bp’:
>     fs/bcachefs/backpointers.c:15:13: note: parameter passing for 
> argument of type ‘struct bch_backpointer’ changed in GCC 9.1
>
> Apply the arm64 change from commit ebcc5928c5d9 ("arm64: Silence gcc
> warnings about arch ABI drift") to silence them. It seems like Dave's
> original rationale applies here too.
>
> Cc: Dave Martin <Dave.Martin@....com>
> Signed-off-by: Calvin Owens <jcalvinowens@...il.com>
> ---

I think these should be addressed in bcachefs instead.
While it's not the fault of bcachefs that the calling
convention changed between gcc versions, have a look at
the actual structure layout:

struct bch_val {
        __u64           __nothing[0];
};
struct bpos {
        /*
         * Word order matches machine byte order - btree code treats a bpos as a
         * single large integer, for search/comparison purposes
         *
         * Note that wherever a bpos is embedded in another on disk data
         * structure, it has to be byte swabbed when reading in metadata that
         * wasn't written in native endian order:
         */
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
        __u32           snapshot;
        __u64           offset;
        __u64           inode;
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
        __u64           inode;
        __u64           offset;         /* Points to end of extent - sectors */
        __u32           snapshot;
#else
#error edit for your odd byteorder.
#endif
} __packed
struct bch_backpointer {
        struct bch_val          v;
        __u8                    btree_id;
        __u8                    level;
        __u8                    data_type;
        __u64                   bucket_offset:40;
        __u32                   bucket_len;
        struct bpos             pos;
} __packed __aligned(8);

This is not something that should ever be passed by value
into a function.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ