Jerome Brunet [Thu, 8 Aug 2024 13:48:54 +0000 (15:48 +0200)]
ALSA: snd-usb-caiaq: use snd_pcm_rate_to_rate_bit
Use snd_pcm_rate_to_rate_bit() helper provided by Alsa instead
re-implementing it. This reduce code duplication and helps when
changing some Alsa definition is necessary.
Takashi Iwai [Thu, 8 Aug 2024 16:31:27 +0000 (18:31 +0200)]
ALSA: control: Fix power_ref lock order for compat code, too
In the previous change for swapping the power_ref and controls_rwsem
lock order, the code path for the compat layer was forgotten.
This patch covers the remaining code.
Takashi Iwai [Thu, 8 Aug 2024 09:15:12 +0000 (11:15 +0200)]
ALSA: hdsp: Break infinite MIDI input flush loop
The current MIDI input flush on HDSP and HDSPM drivers relies on the
hardware reporting the right value. If the hardware doesn't give the
proper value but returns -1, it may be stuck at an infinite loop.
Add a counter and break if the loop is unexpectedly too long.
Takashi Iwai [Thu, 8 Aug 2024 09:14:42 +0000 (11:14 +0200)]
ALSA: asihpi: Fix potential OOB array access
ASIHPI driver stores some values in the static array upon a response
from the driver, and its index depends on the firmware. We shouldn't
trust it blindly.
This patch adds a sanity check of the array index to fit in the array
size.
Takashi Iwai [Wed, 7 Aug 2024 13:34:44 +0000 (15:34 +0200)]
ALSA: core: Drop snd_print stuff and co
Now that all users of snd_print*() are gone, let's drop the functions
completely. This also makes CONFIG_SND_VERBOSE_PRINTK redundant, and
it's dropped, too.
Takashi Iwai [Wed, 7 Aug 2024 13:34:42 +0000 (15:34 +0200)]
ALSA: asihpi: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
The debug prints with a special macro snd_printddd() are replaced with
the conditional pr_debug(). Unfortunately dev_dbg() can't be applied
well due to the lack of the reference to the device pointer.
Takashi Iwai [Wed, 7 Aug 2024 13:34:41 +0000 (15:34 +0200)]
ALSA: sparc: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:40 +0000 (15:34 +0200)]
ALSA: sh: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:39 +0000 (15:34 +0200)]
ALSA: ppc: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:38 +0000 (15:34 +0200)]
ALSA: pdaudiocf: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:37 +0000 (15:34 +0200)]
ALSA: vxpocket: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:34 +0000 (15:34 +0200)]
ALSA: usx2y: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Some superfluous debug prints are dropped, and some ambiguous messages
are slightly rephrased. The sk.dev pointer is set properly for
allowing to call dev_*() functions, too.
Takashi Iwai [Wed, 7 Aug 2024 13:34:33 +0000 (15:34 +0200)]
ALSA: emux: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Some functions are changed to receive snd_card object for calling
dev_*() functions, too.
Takashi Iwai [Wed, 7 Aug 2024 13:34:32 +0000 (15:34 +0200)]
ALSA: trident: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:28 +0000 (15:34 +0200)]
ALSA: korg1212: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:27 +0000 (15:34 +0200)]
ALSA: riptide: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
The device pointer is stored in struct cmdif for calling dev_*()
functions.
Takashi Iwai [Wed, 7 Aug 2024 13:34:26 +0000 (15:34 +0200)]
ALSA: wss: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:25 +0000 (15:34 +0200)]
ALSA: wavefront: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:24 +0000 (15:34 +0200)]
ALSA: sscape: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
The device pointer is stored in struct soundscape for calling
dev_*().
Takashi Iwai [Wed, 7 Aug 2024 13:34:23 +0000 (15:34 +0200)]
ALSA: sc6000: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Some functions are changed to receive a device pointer to be passed to
dev_*() calls.
Takashi Iwai [Wed, 7 Aug 2024 13:34:20 +0000 (15:34 +0200)]
ALSA: sb: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Some functions are changed to receive snd_card pointer for referring
to the device pointer for dev_*() calls, too.
Takashi Iwai [Wed, 7 Aug 2024 13:34:19 +0000 (15:34 +0200)]
ALSA: opti9xx: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
The card pointer is stored in struct snd_opti9xx and snd_miro to be
referred for dev_*() calls.
Takashi Iwai [Wed, 7 Aug 2024 13:34:18 +0000 (15:34 +0200)]
ALSA: opl3sa2: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
The card pointer is stored in struct snd_opl3sa2 to be referred for
dev_*() calls.
Takashi Iwai [Wed, 7 Aug 2024 13:34:17 +0000 (15:34 +0200)]
ALSA: msnd: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:16 +0000 (15:34 +0200)]
ALSA: gus: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Some commented-out debug prints and dead code are dropped as well.
Takashi Iwai [Wed, 7 Aug 2024 13:34:15 +0000 (15:34 +0200)]
ALSA: es18xx: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
For referring to the device, introduce snd_card pointer to struct
snd_es18xx.
Takashi Iwai [Wed, 7 Aug 2024 13:34:14 +0000 (15:34 +0200)]
ALSA: es1688: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
For referring to the device, introduce snd_card pointer to struct
snd_es1688.
Takashi Iwai [Wed, 7 Aug 2024 13:34:13 +0000 (15:34 +0200)]
ALSA: cs4236: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:12 +0000 (15:34 +0200)]
ALSA: cmi8330: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:11 +0000 (15:34 +0200)]
ALSA: cmi8328: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:10 +0000 (15:34 +0200)]
ALSA: azt2320: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:09 +0000 (15:34 +0200)]
ALSA: als100: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Use the standard print API instead of open-coded printk().
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:06 +0000 (15:34 +0200)]
ALSA: i2c: pt2258: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:05 +0000 (15:34 +0200)]
ALSA: i2c: cs8427: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:04 +0000 (15:34 +0200)]
ALSA: pcsp: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:01 +0000 (15:34 +0200)]
ALSA: vx_core: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:00 +0000 (15:34 +0200)]
ALSA: vx_core: Drop unused dev field
The vx_core.dev field has never been set but referred incorrectly at
firmware loading. Pass the proper device pointer from card->dev at
request_firmware(), and drop the unused dev field from vx_core, too.
Takashi Iwai [Wed, 7 Aug 2024 13:33:59 +0000 (15:33 +0200)]
ALSA: virmidi: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:33:58 +0000 (15:33 +0200)]
ALSA: serial-u16550: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:33:57 +0000 (15:33 +0200)]
ALSA: opl4: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:33:56 +0000 (15:33 +0200)]
ALSA: opl3: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Some debug prints are cleaned up with a macro, too.
Takashi Iwai [Wed, 7 Aug 2024 13:33:55 +0000 (15:33 +0200)]
ALSA: mtpav: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:33:54 +0000 (15:33 +0200)]
ALSA: mpu401_uart: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
The assignment of mpu->rmidi was moved to an earlier place, so that
dev_*() can access to the proper device pointer.
Takashi Iwai [Wed, 7 Aug 2024 13:33:53 +0000 (15:33 +0200)]
ALSA: mpu401: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:33:52 +0000 (15:33 +0200)]
ALSA: mts64: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:33:51 +0000 (15:33 +0200)]
ALSA: portman2x4: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 09:23:01 +0000 (11:23 +0200)]
ALSA: seq: Fix missing seq port info bit return for MIDI 1.0 block
The recent extension added a new ALSA sequencer port info flag bit
SNDRV_SEQ_PORT_FLG_IS_MIDI1, but it's not reported back when
inquired. Fix it to report properly.
Takashi Iwai [Wed, 7 Aug 2024 09:23:00 +0000 (11:23 +0200)]
ALSA: seq: Print MIDI 1.0 specific port in proc output
When a sequencer port assigned to a UMP Group that is specific to MIDI
1.0 among MIDI 2.0 client, mark it explicitly in the proc output, so
that user can see it easily. This is an exceptional case where the
message isn't converted to MIDI 1.0 even if the client is running in
MIDI 2.0 mode.
Takashi Iwai [Wed, 7 Aug 2024 09:22:59 +0000 (11:22 +0200)]
ALSA: usb-audio: Update UMP group attributes for GTB blocks, too
When a FB is created from a GTB instead of UMP FB Info inquiry, we
missed the update of the corresponding UMP Group attributes.
Export the call of updater and let it be called from the USB driver.
Takashi Iwai [Wed, 7 Aug 2024 09:22:58 +0000 (11:22 +0200)]
ALSA: usb-audio: Set MIDI1 flag appropriately for GTB MIDI 1.0 entry
When a MIDI 1.0 protocol is specified in a GTB entry while others are
set in MIDI 2.0, it should be seen as a legacy MIDI 1.0 port. Since
recently we allow drivers to set a flag SNDRV_UMP_BLOCK_IS_MIDI1 to a
FB for that purpose. This patch tries to set that flag when the
device shows such a configuration.
Takashi Iwai [Wed, 7 Aug 2024 09:22:57 +0000 (11:22 +0200)]
ALSA: usb-audio: Accept multiple protocols in GTBs
It's valid to give different protocols via multiple GTBs; e.g. a MIDI
1.0 port is embedded in a MIDI 2.0 device that talks with MIDI 2.0
protocol. However, the current driver implementation assumes only a
single protocol over the whole Endpoint, and it can't handle such a
scenario.
This patch changes the driver's behavior to parse GTBs to accept
multiple protocols. Instead of switching to the last given protocol,
it adds the protocol capability bits now. Meanwhile, the default
protocol is chosen by the first given protocol in GTBs.
Practically seen, this should be a minor issue, as new devices should
specify the protocols properly via UMP Endpoint Info messages, so this
is rather just covering a corner case.
Takashi Iwai [Wed, 7 Aug 2024 09:22:56 +0000 (11:22 +0200)]
ALSA: ump: Choose the protocol when protocol caps are changed
When the protocol capability bits are changed via Endpoint Info update
notification, we should check the validity of the current protocol and
reset it if needed, too.
Takashi Iwai [Tue, 6 Aug 2024 12:46:50 +0000 (14:46 +0200)]
ALSA: usb-audio: Add input value sanity checks for standard types
For an invalid input value that is out of the given range, currently
USB-audio driver corrects the value silently and accepts without
errors. This is no wrong behavior, per se, but the recent kselftest
rather wants to have an error in such a case, hence a different
behavior is expected now.
This patch adds a sanity check at each control put for the standard
mixer types and returns an error if an invalid value is given.
Note that this covers only the standard mixer types. The mixer quirks
that have own control callbacks would need different coverage.
Takashi Iwai [Tue, 6 Aug 2024 07:00:23 +0000 (09:00 +0200)]
ALSA: ump: Handle MIDI 1.0 Function Block in MIDI 2.0 protocol
The UMP v1.1 spec says in the section 6.2.1:
"If a UMP Endpoint declares MIDI 2.0 Protocol but a Function Block
represents a MIDI 1.0 connection, then may optionally be used for
messages to/from that Function Block."
It implies that the driver can (and should) keep MIDI 1.0 CVM
exceptionally for those FBs even if UMP Endpoint is running in MIDI
2.0 protocol, and the current driver lacks of it.
This patch extends the sequencer port info to indicate a MIDI 1.0
port, and tries to send/receive MIDI 1.0 CVM as is when this port is
the source or sink. The sequencer port flag is set by the driver at
parsing FBs and GTBs although application can set it to its own
user-space clients, too.
Takashi Iwai [Thu, 1 Aug 2024 06:48:06 +0000 (08:48 +0200)]
ALSA: memalloc: Let IOMMU handle S/G primarily
The recent changes in IOMMU made the non-contiguous page allocations
as default, hence we can simply use the standard DMA allocation for
the S/G pages as well. In this patch, we simplify the code by trying
the standard DMA allocation at first, instead of
dma_alloc_noncontiguous().
For the case without IOMMU, we still need to manage the S/G pages
manually, so we keep the same fallback routines like before.
The fallback types (SNDRV_DMA_TYPE_DEV_SG_FALLBACK & co) are dropped /
folded into SNDRV_DMA_TYPE_DEV_SG and co now. The allocation via the
standard DMA call overrides the type accordingly, hence we don't have
to have extra fallback types any longer. OTOH, SNDRV_DMA_TYPE_DEV_SG
is no longer an alias but became its own type back again.
Note that this patch requires another prerequisite fix for memmalloc
helper to use the DMA API for WC pages on x86.
Takashi Iwai [Thu, 1 Aug 2024 06:48:05 +0000 (08:48 +0200)]
ALSA: memalloc: Use DMA API for x86 WC page allocations, too
The memalloc helper used a house-made code for allocation of WC pages
on x86, since the standard DMA API doesn't cover it well. Meanwhile,
the manually allocated pages won't work together with IOMMU, resulting
in faults, so we should switch to the DMA API in that case, instead.
This patch tries to switch back to DMA API for WC pages on x86, but
with some additional tweaks that are missing.
The code path for kcontrol accesses have often nested locks of both
card's controls_rwsem and power_ref, and applies in that order.
However, what could take much longer is the latter, power_ref; it
waits for the power state of the device, and it pretty much depends on
the user's action.
This patch swaps the locking order of those locks to a more natural
way, namely, power_ref -> controls_rwsem, in order to shorten the time
of possible nested locks. For consistency, power_ref is taken always
in the top-level caller side (that is, *_user() functions and the
ioctl handler itself).
We want sometimes to keep the runtime PM disabled persistently just
like we did for the PM deny-list in the previous change, e.g. for
testing some buggy device. This patch enhances the existing
pm_blacklist option for achieving it easily.
The default behavior doesn't change -- the driver looks up the deny
list and disables the runtime PM if matches. However, when
pm_blacklist=1 option is set, now the driver disables the runtime PM
completely, just like the deny-list does.
ALSA: hda: Keep PM disablement for deny-listed instance
We have a runtime PM deny-list for the devices that show the problems
(typically click noises) at runtime suspend/resume, and when it
matches, the driver disables the default runtime PM. However, we
still allow the runtime PM changed via power_save module option
dynamically, and the desktop system often tweaks it. This ended up
with a re-enablement of the runtime PM that surprises users, suddenly
suffering from the noises.
This patch changes the driver behavior slightly: when the device is
listed in the deny-list, ignore the power_save option change and keep
the original (that is, off) runtime PM state.
ALSA: ump: Update substream name from assigned FB names
We had a nice name scheme in ALSA sequencer UMP binding for each
sequencer port referring to each assigned Function Block name, while
the legacy rawmidi refers only to the UMP Endpoint name. It's better
to align both.
This patch moves the UMP Group attribute update functions into the
core UMP code from the sequencer binding code, and improve the
substream name of the legacy rawmidi.
ALSA: control: Annotate snd_kcontrol with __counted_by()
struct snd_kcontrol contains a flex array of snd_kcontrol_volatile
objects at its end, and the array size is stored in count field.
This can be annotated gracefully with __counted_by() for catching
possible array overflows.
One additional change is the order of the count field initialization;
The assignment of the count field is moved before assignment of vd[]
elements for avoiding false-positive warnings from compilers.
Merge tag 'kbuild-fixes-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada:
- Fix RPM package build error caused by an incorrect locale setup
- Mark modules.weakdep as ghost in RPM package
- Fix the odd combination of -S and -c in stack protector scripts,
which is an error with the latest Clang
* tag 'kbuild-fixes-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kbuild: Fix '-S -c' in x86 stack protector scripts
kbuild: rpm-pkg: ghost modules.weakdep file
kbuild: rpm-pkg: Fix C locale setup
minmax: simplify and clarify min_t()/max_t() implementation
This simplifies the min_t() and max_t() macros by no longer making them
work in the context of a C constant expression.
That means that you can no longer use them for static initializers or
for array sizes in type definitions, but there were only a couple of
such uses, and all of them were converted (famous last words) to use
MIN_T/MAX_T instead.
Cc: David Laight <David.Laight@aculab.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Commit 3a7e02c040b1 ("minmax: avoid overly complicated constant
expressions in VM code") added the simpler MIN_T/MAX_T macros in order
to avoid some excessive expansion from the rather complicated regular
min/max macros.
The complexity of those macros stems from two issues:
(a) trying to use them in situations that require a C constant
expression (in static initializers and for array sizes)
(b) the type sanity checking
and MIN_T/MAX_T avoids both of these issues.
Now, in the whole (long) discussion about all this, it was pointed out
that the whole type sanity checking is entirely unnecessary for
min_t/max_t which get a fixed type that the comparison is done in.
But that still leaves min_t/max_t unnecessarily complicated due to
worries about the C constant expression case.
However, it turns out that there really aren't very many cases that use
min_t/max_t for this, and we can just force-convert those.
This does exactly that.
Which in turn will then allow for much simpler implementations of
min_t()/max_t(). All the usual "macros in all upper case will evaluate
the arguments multiple times" rules apply.
We should do all the same things for the regular min/max() vs MIN/MAX()
cases, but that has the added complexity of various drivers defining
their own local versions of MIN/MAX, so that needs another level of
fixes first.
kbuild: Fix '-S -c' in x86 stack protector scripts
After a recent change in clang to stop consuming all instances of '-S'
and '-c' [1], the stack protector scripts break due to the kernel's use
of -Werror=unused-command-line-argument to catch cases where flags are
not being properly consumed by the compiler driver:
$ echo | clang -o - -x c - -S -c -Werror=unused-command-line-argument
clang: error: argument unused during compilation: '-c' [-Werror,-Wunused-command-line-argument]
This results in CONFIG_STACKPROTECTOR getting disabled because
CONFIG_CC_HAS_SANE_STACKPROTECTOR is no longer set.
'-c' and '-S' both instruct the compiler to stop at different stages of
the pipeline ('-S' after compiling, '-c' after assembling), so having
them present together in the same command makes little sense. In this
case, the test wants to stop before assembling because it is looking at
the textual assembly output of the compiler for either '%fs' or '%gs',
so remove '-c' from the list of arguments to resolve the error.
All versions of GCC continue to work after this change, along with
versions of clang that do or do not contain the change mentioned above.
Cc: stable@vger.kernel.org Fixes: 4f7fd4d7a791 ("[PATCH] Add the -fstack-protector option to the CFLAGS") Fixes: 60a5317ff0f4 ("x86: implement x86_32 stack protector") Link: https://github.com/llvm/llvm-project/commit/6461e537815f7fa68cef06842505353cf5600e9c Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Merge tag 'v6.11-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull turbostat updates from Len Brown:
- Enable turbostat extensions to add both perf and PMT (Intel
Platform Monitoring Technology) counters via the cmdline
- Demonstrate PMT access with built-in support for Meteor Lake's
Die C6 counter
* tag 'v6.11-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
tools/power turbostat: version 2024.07.26
tools/power turbostat: Include umask=%x in perf counter's config
tools/power turbostat: Document PMT in turbostat.8
tools/power turbostat: Add MTL's PMT DC6 builtin counter
tools/power turbostat: Add early support for PMT counters
tools/power turbostat: Add selftests for added perf counters
tools/power turbostat: Add selftests for SMI, APERF and MPERF counters
tools/power turbostat: Move verbose counter messages to level 2
tools/power turbostat: Move debug prints from stdout to stderr
tools/power turbostat: Fix typo in turbostat.8
tools/power turbostat: Add perf added counter example to turbostat.8
tools/power turbostat: Fix formatting in turbostat.8
tools/power turbostat: Extend --add option with perf counters
tools/power turbostat: Group SMI counter with APERF and MPERF
tools/power turbostat: Add ZERO_ARRAY for zero initializing builtin array
tools/power turbostat: Replace enum rapl_source and cstate_source with counter_source
tools/power turbostat: Remove anonymous union from rapl_counter_info_t
tools/power/turbostat: Switch to new Intel CPU model defines
Merge tag 'cxl-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
Pull CXL updates from Dave Jiang:
"Core:
- A CXL maturity map has been added to the documentation to detail
the current state of CXL enabling.
It provides the status of the current state of various CXL features
to inform current and future contributors of where things are and
which areas need contribution.
- A notifier handler has been added in order for a newly created CXL
memory region to trigger the abstract distance metrics calculation.
This should bring parity for CXL memory to the same level vs
hotplugged DRAM for NUMA abstract distance calculation. The
abstract distance reflects relative performance used for memory
tiering handling.
- An addition for XOR math has been added to address the CXL DPA to
SPA translation.
CXL address translation did not support address interleave math
with XOR prior to this change.
Fixes:
- Fix to address race condition in the CXL memory hotplug notifier
- Add missing MODULE_DESCRIPTION() for CXL modules
- Fix incorrect vendor debug UUID define
Misc:
- A warning has been added to inform users of an unsupported
configuration when mixing CXL VH and RCH/RCD hierarchies
- The ENXIO error code has been replaced with EBUSY for inject poison
limit reached via debugfs and cxl-test support
- Moving the PCI config read in cxl_dvsec_rr_decode() to avoid
unnecessary PCI config reads
- A refactor to a common struct for DRAM and general media CXL
events"
* tag 'cxl-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
cxl/core/pci: Move reading of control register to immediately before usage
cxl: Remove defunct code calculating host bridge target positions
cxl/region: Verify target positions using the ordered target list
cxl: Restore XOR'd position bits during address translation
cxl/core: Fold cxl_trace_hpa() into cxl_dpa_to_hpa()
cxl/test: Replace ENXIO with EBUSY for inject poison limit reached
cxl/memdev: Replace ENXIO with EBUSY for inject poison limit reached
cxl/acpi: Warn on mixed CXL VH and RCH/RCD Hierarchy
cxl/core: Fix incorrect vendor debug UUID define
Documentation: CXL Maturity Map
cxl/region: Simplify cxl_region_nid()
cxl/region: Support to calculate memory tier abstract distance
cxl/region: Fix a race condition in memory hotplug notifier
cxl: add missing MODULE_DESCRIPTION() macros
cxl/events: Use a common struct for DRAM and General Media events
Merge tag 'unicode-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode
Pull unicode update from Gabriel Krisman Bertazi:
"Two small fixes to silence the compiler and static analyzers tools
from Ben Dooks and Jeff Johnson"
* tag 'unicode-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode:
unicode: add MODULE_DESCRIPTION() macros
unicode: make utf8 test count static
In the same way as for other similar files, mark as ghost the new file
generated by depmod for configured weak dependencies for modules,
modules.weakdep, so that although it is not included in the package,
claim the ownership on it.
Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Merge tag '6.11-rc-smb-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6
Pull more smb client updates from Steve French:
- fix for potential null pointer use in init cifs
- additional dynamic trace points to improve debugging of some common
scenarios
- two SMB1 fixes (one addressing reconnect with POSIX extensions, one a
mount parsing error)
* tag '6.11-rc-smb-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
smb3: add dynamic trace point for session setup key expired failures
smb3: add four dynamic tracepoints for copy_file_range and reflink
smb3: add dynamic tracepoint for reflink errors
cifs: mount with "unix" mount option for SMB1 incorrectly handled
cifs: fix reconnect with SMB1 UNIX Extensions
cifs: fix potential null pointer use in destroy_workqueue in init_cifs error path
Merge tag 'block-6.11-20240726' of git://git.kernel.dk/linux
Pull block fixes from Jens Axboe:
- NVMe pull request via Keith:
- Fix request without payloads cleanup (Leon)
- Use new protection information format (Francis)
- Improved debug message for lost pci link (Bart)
- Another apst quirk (Wang)
- Use appropriate sysfs api for printing chars (Markus)
- ublk async device deletion fix (Ming)
- drbd kerneldoc fixups (Simon)
- Fix deadlock between sd removal and release (Yang)
* tag 'block-6.11-20240726' of git://git.kernel.dk/linux:
nvme-pci: add missing condition check for existence of mapped data
ublk: fix UBLK_CMD_DEL_DEV_ASYNC handling
block: fix deadlock between sd_remove & sd_release
drbd: Add peer_device to Kernel doc
nvme-core: choose PIF from QPIF if QPIFS supports and PIF is QTYPE
nvme-pci: Fix the instructions for disabling power management
nvme: remove redundant bdev local variable
nvme-fabrics: Use seq_putc() in __nvmf_concat_opt_tokens()
nvme/pci: Add APST quirk for Lenovo N60z laptop
Merge tag 'vfs-6.11-rc1.fixes.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull vfs fixes from Christian Brauner:
"This contains two fixes for this merge window:
VFS:
- I noticed that it is possible for a privileged user to mount most
filesystems with a non-initial user namespace in sb->s_user_ns.
When fsopen() is called in a non-init namespace the caller's
namespace is recorded in fs_context->user_ns. If the returned file
descriptor is then passed to a process privileged in init_user_ns,
that process can call fsconfig(fd_fs, FSCONFIG_CMD_CREATE*),
creating a new superblock with sb->s_user_ns set to the namespace
of the process which called fsopen().
This is problematic as only filesystems that raise FS_USERNS_MOUNT
are known to be able to support a non-initial s_user_ns. Others may
suffer security issues, on-disk corruption or outright crash the
kernel. Prevent that by restricting such delegation to filesystems
that allow FS_USERNS_MOUNT.
Note, that this delegation requires a privileged process to
actually create the superblock so either the privileged process is
cooperaing or someone must have tricked a privileged process into
operating on a fscontext file descriptor whose origin it doesn't
know (a stupid idea).
The bug dates back to about 5 years afaict.
Misc:
- Fix hostfs parsing when the mount request comes in via the legacy
mount api.
In the legacy mount api hostfs allows to specify the host directory
mount without any key.
Restore that behavior"
* tag 'vfs-6.11-rc1.fixes.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
hostfs: fix the host directory parse when mounting.
fs: don't allow non-init s_user_ns for filesystems without FS_USERNS_MOUNT